From d87c1b7865dd2b821aa8c8c83df13a0ed2baed20 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 11 Oct 2019 17:41:37 +0200 Subject: [PATCH] random crap --- openbox/event.c | 2 ++ openbox/keyboard.c | 1 + openbox/moveresize.c | 2 +- tools/obxprop/obxprop.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index 6af88dc4..0b6061de 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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 diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 58613615..c1b6e405 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -34,6 +34,7 @@ #include "popup.h" #include "gettext.h" #include "obt/keyboard.h" +#include "debug.h" #include diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 75f2de1a..49c03315 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -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(); diff --git a/tools/obxprop/obxprop.c b/tools/obxprop/obxprop.c index 1f6e3539..f903ba11 100644 --- a/tools/obxprop/obxprop.c +++ b/tools/obxprop/obxprop.c @@ -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; -- 2.34.1