]> Dogcows Code - chaz/openbox/blobdiff - openbox/grab.c
add a 'Switch to...' entry to empty desktops in the client-list-menu
[chaz/openbox] / openbox / grab.c
index 5df654c62a6c3dc6eb6179341b5dc562ed558432..de2efd9afa1e36689193839f5583819f383e8692 100644 (file)
@@ -1,6 +1,26 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   grab.c for the Openbox window manager
+   Copyright (c) 2003        Ben Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
+#include "grab.h"
 #include "openbox.h"
 #include "event.h"
 #include "xerror.h"
+#include "screen.h"
 
 #include <glib.h>
 #include <X11/Xlib.h>
@@ -41,7 +61,7 @@ gboolean grab_pointer(gboolean grab, ObCursor cur)
 
     if (grab) {
         if (pgrabs++ == 0)
-            ret = XGrabPointer(ob_display, RootWindow(ob_display, ob_screen),
+            ret = XGrabPointer(ob_display, screen_support_win,
                                False, GRAB_PTR_MASK, GrabModeAsync,
                                GrabModeAsync, FALSE,
                                ob_cursor(cur), event_lasttime) == Success;
@@ -76,7 +96,7 @@ gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
     return ret;
 }
 
-int grab_server(gboolean grab)
+gint grab_server(gboolean grab)
 {
     static guint sgrabs = 0;
     if (grab) {
@@ -93,10 +113,12 @@ int grab_server(gboolean grab)
     return sgrabs;
 }
 
-void grab_startup()
+void grab_startup(gboolean reconfig)
 {
     guint i = 0;
 
+    if (reconfig) return;
+
     mask_list[i++] = 0;
     mask_list[i++] = LockMask;
     mask_list[i++] = NumLockMask;
@@ -108,8 +130,10 @@ void grab_startup()
     g_assert(i == MASK_LIST_SIZE);
 }
 
-void grab_shutdown()
+void grab_shutdown(gboolean reconfig)
 {
+    if (reconfig) return;
+
     while (grab_keyboard(FALSE));
     while (grab_pointer(FALSE, OB_CURSOR_NONE));
     while (grab_pointer_window(FALSE, OB_CURSOR_NONE, None));
This page took 0.021771 seconds and 4 git commands to generate.