[Commits] SDL: commit a7d7af2a419b453188ffe87386455fc26c1306fa

libsdl.org revision control commits-owner at libsdl.org
Fri Jul 3 09:18:17 PDT 2015


details:   https://hg.libsdl.org/SDL/rev/025e28f516ce
changeset: 9793:025e28f516ce
user:      Sam Lantinga <slouken at libsdl.org>
date:      Fri Jul 03 09:17:24 2015 -0700
description:
commit a7d7af2a419b453188ffe87386455fc26c1306fa
Author: Benoit Pierre <benoit.pierre at gmail.com>
Date:   Fri Jul 3 02:17:10 2015 +0200

    fix 14dd48ae5bc43b61b2a0dd0b3177d22edec707ef regression

    The window manager detection code in X11_HasWindowManager does not work
    with Awesome (http://awesome.naquadah.org/). Remove it, and reuse the
    result of the more correct checks in X11_CheckWindowManager.

diffstat:

 src/video/x11/SDL_x11window.c |  20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

diffs (37 lines):

diff -r 0569d87c68fc -r 025e28f516ce src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Thu Jul 02 20:11:40 2015 +0200
+++ b/src/video/x11/SDL_x11window.c	Fri Jul 03 09:17:24 2015 -0700
@@ -884,24 +884,6 @@
     X11_XCheckIfEvent(display, &event, &isMapNotify, (XPointer)&data->xwindow);
 }
 
-static SDL_bool
-X11_HasWindowManager(const SDL_WindowData *data)
-{
-    const SDL_DisplayData *displaydata =
-        (SDL_DisplayData *) SDL_GetDisplayForWindow(data->window)->driverdata;
-    Display *display = data->videodata->display;
-    const int screen  = displaydata->screen;
-    char atomname[16];
-    Atom atom;
-
-    /* Compliments to Chromium for this technique.
-        Window Managers are supposed to own "WM_Sx" selections, where
-        "x" is the screen number (ICCCM 2.8). */
-    SDL_snprintf(atomname, sizeof (atomname), "WM_S%d", screen);
-    atom = X11_XInternAtom(display, atomname, True);
-    return ((atom != None) && (X11_XGetSelectionOwner(display, atom) != None));
-}
-
 void
 X11_ShowWindow(_THIS, SDL_Window * window)
 {
@@ -918,7 +900,7 @@
         X11_XFlush(display);
     }
 
-    if (!X11_HasWindowManager(data)) {
+    if (SDL_TRUE != data->videodata->net_wm) {
         /* no WM means no FocusIn event, which confuses us. Force it. */
         X11_XSetInputFocus(display, data->xwindow, RevertToNone, CurrentTime);
         X11_XFlush(display);


More information about the commits mailing list