]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
export if the keyboard and pointer are currently grabbed or not
[chaz/openbox] / openbox / event.c
index 483050fa9b49498a4ee57f0e44ddcb084f095e61..d3e5ad72d4d1ea44b8ffd0d44a29b5bfd3cdea30 100644 (file)
@@ -1,3 +1,21 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   event.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 "debug.h"
 #include "openbox.h"
 #include "dock.h"
@@ -385,7 +403,9 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
                            use it */
                         event_process(&fe, &d);
                         if (!d.ignored) {
+#ifdef DEBUG_FOCUS
                             ob_debug("FocusIn was OK, so don't fallback\n");
+#endif
                             fallback = FALSE;
                             break;
                         }
@@ -521,9 +541,14 @@ static void event_process(const XEvent *ec, gpointer data)
             event_handle_menu(e);
         else {
             if (!keyboard_process_interactive_grab(e, &client)) {
-                if (moveresize_in_progress)
+                if (moveresize_in_progress) {
                     moveresize_event(e);
 
+                    /* make further actions work on the client being
+                       moved/resized */
+                    client = moveresize_client;
+                }
+
                 menu_can_hide = FALSE;
                 ob_main_loop_timeout_add(ob_main_loop,
                                          G_USEC_PER_SEC / 4,
@@ -538,8 +563,7 @@ static void event_process(const XEvent *ec, gpointer data)
                        causes the window which appears to be focused to be
                        the one on which the actions will be executed */
                     keyboard_event((focus_cycle_target ?
-                                    focus_cycle_target :
-                                    (client ? client : focus_client)), e);
+                                    focus_cycle_target : client), e);
             }
         }
     }
@@ -552,7 +576,7 @@ static void event_handle_root(XEvent *e)
     switch(e->type) {
     case SelectionClear:
         ob_debug("Another WM has requested to replace us. Exiting.\n");
-        ob_exit();
+        ob_exit(0);
         break;
 
     case ClientMessage:
This page took 0.024972 seconds and 4 git commands to generate.