[no subject]

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Any ideas?

------=_NextPart_000_0013_01D02555.FB4BA170
Content-Type: application/octet-stream;
	name="wm.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="wm.diff"

diff --git a/src/x/xdisplay.c b/src/x/xdisplay.c=0A=
index d985964..70d869c 100644=0A=
--- a/src/x/xdisplay.c=0A=
+++ b/src/x/xdisplay.c=0A=
@@ -14,6 +14,8 @@=0A=
 #include "allegro5/internal/aintern_xwindow.h"=0A=
 #include "allegro5/platform/aintxglx.h"=0A=
 =0A=
+#include <X11/Xatom.h>=0A=
+=0A=
 ALLEGRO_DEBUG_CHANNEL("display")=0A=
 =0A=
 static ALLEGRO_DISPLAY_INTERFACE xdpy_vt;=0A=
@@ -216,6 +218,49 @@ static bool =
xdpy_create_display_window(ALLEGRO_SYSTEM_XGLX *system,=0A=
 =0A=
    _al_xwin_set_size_hints(display, x_off, y_off);=0A=
 =0A=
+   const long _NET_WM_BYPASS_COMPOSITOR_HINT_ON =3D 1;=0A=
+   Atom _NET_WM_BYPASS_COMPOSITOR;=0A=
+   Atom _NET_WM_WINDOW_TYPE;=0A=
+   Atom _NET_WM_WINDOW_TYPE_NORMAL;=0A=
+=0A=
+   /* Let the window manager know we're a "normal" window */=0A=
+   _NET_WM_WINDOW_TYPE =3D XInternAtom(=0A=
+      system->x11display,=0A=
+      "_NET_WM_WINDOW_TYPE",=0A=
+      False=0A=
+   );=0A=
+   _NET_WM_WINDOW_TYPE_NORMAL =3D XInternAtom(=0A=
+      system->x11display,=0A=
+      "_NET_WM_WINDOW_TYPE_NORMAL",=0A=
+      False=0A=
+   );=0A=
+   XChangeProperty(=0A=
+      system->x11display,=0A=
+      d->window,=0A=
+      _NET_WM_WINDOW_TYPE,=0A=
+      XA_ATOM,=0A=
+      32,=0A=
+      PropModeReplace,=0A=
+      (unsigned char *)&_NET_WM_WINDOW_TYPE_NORMAL,=0A=
+      1=0A=
+   );=0A=
+=0A=
+   _NET_WM_BYPASS_COMPOSITOR =3D XInternAtom(=0A=
+      system->x11display,=0A=
+      "_NET_WM_BYPASS_COMPOSITOR",=0A=
+      False=0A=
+   );=0A=
+   XChangeProperty(=0A=
+      system->x11display,=0A=
+      d->window,=0A=
+      _NET_WM_BYPASS_COMPOSITOR,=0A=
+      XA_CARDINAL,=0A=
+      32,=0A=
+      PropModeReplace,=0A=
+      (unsigned char *)&_NET_WM_BYPASS_COMPOSITOR_HINT_ON,=0A=
+      1=0A=
+   );=0A=
+=0A=
    /* listen for touchscreen events */=0A=
    XIEventMask event_mask;=0A=
    event_mask.deviceid =3D XIAllMasterDevices;=0A=
@@ -1064,6 +1109,7 @@ static void =
xdpy_set_window_title_default(ALLEGRO_DISPLAY *display, const char *=0A=
          &property);=0A=
       XSetTextProperty(system->x11display, glx->window, &property, =
WM_NAME);=0A=
       XSetTextProperty(system->x11display, glx->window, &property, =
_NET_WM_NAME);=0A=
+      XSetTextProperty(system->x11display, glx->window, &property, =
XA_WM_NAME);=0A=
       XFree(property.value);=0A=
    }=0A=
    {=0A=
@@ -1072,10 +1118,12 @@ static void =
xdpy_set_window_title_default(ALLEGRO_DISPLAY *display, const char *=0A=
          /* There's no need to use strdup here at all, and doing so =
would cause=0A=
           * a memory leak.=0A=
           */=0A=
-         hint->res_name =3D (char *) title;=0A=
-         hint->res_class =3D (char *) title;=0A=
+         ALLEGRO_PATH *exepath =3D =
al_get_standard_path(ALLEGRO_EXENAME_PATH);=0A=
+         hint->res_name =3D (char *)al_get_path_basename(exepath);=0A=
+         hint->res_class =3D (char *)al_get_path_basename(exepath);=0A=
          XSetClassHint(system->x11display, glx->window, hint);=0A=
          XFree(hint);=0A=
+         al_destroy_path(exepath);=0A=
       }=0A=
    }=0A=
    _al_mutex_unlock(&system->lock);=0A=

------=_NextPart_000_0013_01D02555.FB4BA170--





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/