diff options
author | Olivier Fourdan <fourdan.olivier@wanadoo.fr> | 2004-06-17 17:25:34 +0000 |
---|---|---|
committer | Olivier Fourdan <fourdan.olivier@wanadoo.fr> | 2004-06-17 17:25:34 +0000 |
commit | 2d4374b5a8641449fd269cf236ce6f7211d774fe (patch) | |
tree | 6a35519f4fff0b9fa490a6edda85d0ecddbbbf45 /src/misc.c | |
parent | 3706192895c152ec45eb71ab8b22d25edd8a9d44 (diff) | |
download | xfwm4-2d4374b5a8641449fd269cf236ce6f7211d774fe.tar.gz |
Change internals,
Plug another segfault.
(Old svn revision: 11793)
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/misc.c b/src/misc.c index b0406dba5..8e3944718 100644 --- a/src/misc.c +++ b/src/misc.c @@ -41,8 +41,6 @@ #include "client.h" #include "misc.h" -static int xgrabcount = 0; - void getMouseXY (ScreenInfo *screen_info, Window w, int *x2, int *y2) { @@ -117,36 +115,6 @@ sendClientMessage (ScreenInfo *screen_info, Window w, Atom a, Atom x, Time times XSendEvent (myScreenGetXDisplay (screen_info), w, FALSE, 0L, (XEvent *)&ev); } -void -myXGrabServer (ScreenInfo *screen_info) -{ - DBG ("entering myXGrabServer"); - if (xgrabcount == 0) - { - DBG ("grabbing server"); - XGrabServer (myScreenGetXDisplay (screen_info)); - } - xgrabcount++; - DBG ("grabs : %i", xgrabcount); -} - -void -myXUngrabServer (ScreenInfo *screen_info) -{ - DBG ("entering myXUngrabServer"); - if (--xgrabcount < 0) /* should never happen */ - { - xgrabcount = 0; - } - if (xgrabcount == 0) - { - DBG ("ungrabbing server"); - XUngrabServer (myScreenGetXDisplay (screen_info)); - XFlush (myScreenGetXDisplay (screen_info)); - } - DBG ("grabs : %i", xgrabcount); -} - /* * it's safer to grab the display before calling this routine * Returns true if the given window is present and mapped on root @@ -154,7 +122,7 @@ myXUngrabServer (ScreenInfo *screen_info) gboolean checkWindowOnRoot(ScreenInfo *screen_info, Window w) { - DisplayInfo *display_info; + DisplayInfo *display_info = NULL; Window dummy_root, parent; Window *wins = NULL; unsigned int count; |