Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37792367
en ru br
Репозитории ALT

Группа :: Игры/Прочее
Пакет: xteddy

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xteddy-2.0.1-visual.patch
Скачать


Imlib picks visual with highest possible depth, which are ARGB visuals in
case Composite extensions are in use, and which it can not handle. Use the
default, RGB, instead.
Lubomir Rintel <lkundrak@v3.sk>
diff -up xteddy-2.0.1/xteddy.c.visual xteddy-2.0.1/xteddy.c
--- xteddy-2.0.1/xteddy.c.visual	2008-12-04 12:30:18.000000000 +0100
+++ xteddy-2.0.1/xteddy.c	2008-12-04 12:30:21.000000000 +0100
@@ -122,6 +122,8 @@ int main(int argc, char **argv)
   Cursor               cursor;
   char                *teddy;
   char                *file;
+  ImlibInitParams      params;
+  Visual              *visual;
 
   /* Window movement variables */
   XWindowChanges       winchanges;
@@ -172,7 +174,12 @@ int main(int argc, char **argv)
   display_width  = DisplayWidth(display, screen_num);
   display_height = DisplayHeight(display, screen_num);
 
-  if ( !(id=Imlib_init(display)) ) return -1;
+  /* Determine the correct visual */
+  visual = DefaultVisual(display, screen_num);
+  params.flags = PARAMS_VISUALID;
+  params.visualid = visual->visualid;
+
+  if ( !(id=Imlib_init_with_params(display, &params)) ) return -1;
   if ( !(file = InitTeddy(teddy)) ) {
     fprintf(stderr, "Can not find any image with name %s.\n", teddy);
     return -1;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin