random crap
authorMikael Magnusson <mikael.magnusson@sony.com>
Fri, 11 Oct 2019 15:41:37 +0000 (17:41 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Wed, 13 Apr 2022 22:43:35 +0000 (00:43 +0200)
openbox/event.c
openbox/keyboard.c
openbox/moveresize.c
tools/obxprop/obxprop.c

index 6af88dc49c69dc2a7a7468a574a4418cb84bc7d2..0b6061de83ef3b15470f1c1caf95ba7cf7737d59 100644 (file)
@@ -995,10 +995,12 @@ static void event_handle_client(ObClient *client, XEvent *e)
             py = e->xbutton.y;
 
             pcon = frame_context(client, e->xbutton.window, px, py);
+            ob_debug("now the context is %d", pcon);
             pcon = mouse_button_frame_context(pcon, e->xbutton.button,
                                               e->xbutton.state);
         }
     case ButtonRelease:
+        ob_debug("hello i am a button %i %i", e->xbutton.button, pcon);
         /* Wheel buttons don't draw because they are an instant click, so it
            is a waste of resources to go drawing it.
            if the user is doing an interactive thing, or has a menu open then
index 5861361599a538ec2376a62252b2505c6fcee14c..c1b6e405f2bd990135f46d20acda0a0ef86a1742 100644 (file)
@@ -34,6 +34,7 @@
 #include "popup.h"
 #include "gettext.h"
 #include "obt/keyboard.h"
+#include "debug.h"
 
 #include <glib.h>
 
index 75f2de1a579630bd251af78f13b64ccd051f113f..49c03315fb30b9098b0edfae56e6a3d37dd2fc47 100644 (file)
@@ -224,7 +224,7 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr)
         g_assert_not_reached();
 
     /* keep the pointer bounded to the screen for move/resize */
-    if (!grab_pointer(FALSE, TRUE, cur))
+    if (!grab_pointer(TRUE, TRUE, cur))
         return;
     if (!grab_keyboard()) {
         ungrab_pointer();
index 1f6e3539adf5fa035bf20b326e35ad36566589e2..f903ba1147c04fdf3446665ed8d589a40aaf78ce 100644 (file)
@@ -171,7 +171,7 @@ gchar* read_atoms(Display *d, guchar *val, guint n)
 
     ret = NULL;
     for (i = 0; i < n; ++i)
-        ret = append_string(ret, XGetAtomName(d, ((guint32*)val)[i]), FALSE);
+        ret = ((guint32*)val)[i] ? append_string(ret, XGetAtomName(d, ((guint32*)val)[i]), FALSE) : 0;
     if (ret)
         return g_string_free(ret, FALSE);
     return NULL;