add prop.[ch] to the libobt, but they are not used yet. add a global obt_display...
[dana/openbox.git] / openbox / mouse.c
index 97abf70..5a9fe17 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "openbox.h"
 #include "config.h"
-#include "xerror.h"
 #include "actions.h"
 #include "event.h"
 #include "client.h"
@@ -29,6 +28,7 @@
 #include "translate.h"
 #include "mouse.h"
 #include "gettext.h"
+#include "obt/display.h"
 
 #include <glib.h>
 
@@ -142,21 +142,21 @@ static void grab_all_clients(gboolean grab)
         mouse_grab_for_client(it->data, grab);
 }
 
-void mouse_unbind_all()
+void mouse_unbind_all(void)
 {
     gint i;
     GSList *it;
-    
+
     for(i = 0; i < OB_FRAME_NUM_CONTEXTS; ++i) {
         for (it = bound_contexts[i]; it; it = g_slist_next(it)) {
             ObMouseBinding *b = it->data;
             gint j;
 
             for (j = 0; j < OB_NUM_MOUSE_ACTIONS; ++j) {
-                GSList *it;
+                GSList *jt;
 
-                for (it = b->actions[j]; it; it = g_slist_next(it))
-                    actions_act_unref(it->data);
+                for (jt = b->actions[j]; jt; jt = g_slist_next(jt))
+                    actions_act_unref(jt->data);
                 g_slist_free(b->actions[j]);
             }
             g_free(b);
@@ -257,10 +257,10 @@ void mouse_event(ObClient *client, XEvent *e)
             Window wjunk;
             guint ujunk, b, w, h;
             /* this can cause errors to occur when the window closes */
-            xerror_set_ignore(TRUE);
+            obt_display_ignore_errors(TRUE);
             junk1 = XGetGeometry(ob_display, e->xbutton.window,
                                  &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk);
-            xerror_set_ignore(FALSE);
+            obt_display_ignore_errors(FALSE);
             if (junk1) {
                 if (e->xbutton.x >= (signed)-b &&
                     e->xbutton.y >= (signed)-b &&