summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-12 05:25:34 +0000
committerDana Jansens <danakj@orodu.net>2007-03-12 05:25:34 +0000
commitc018e212200dfece62b49c6ed385d379eb4e45e9 (patch)
tree671ce461ff859aa32594be2e79937c12e7e1ea84 /openbox/client.c
parent310ea89e0ebb53e27550440960305ffc446ae8ce (diff)
i rewrote handling of focus events. this is pretty much based on blackbox's current form, as well as reading the xlib programming manual at:
http://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html this may break for people. that'd be nice to hear about, so it can be fixed. but hopefully this is more robust. it sure is a lot more simple.
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 37c7f40b..e4bef71d 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -45,8 +45,7 @@
#include <X11/Xutil.h>
/*! The event mask to grab on client windows */
-#define CLIENT_EVENTMASK (PropertyChangeMask | FocusChangeMask | \
- StructureNotifyMask)
+#define CLIENT_EVENTMASK (PropertyChangeMask | StructureNotifyMask)
#define CLIENT_NOPROPAGATEMASK (ButtonPressMask | ButtonReleaseMask | \
ButtonMotionMask)
@@ -555,7 +554,8 @@ void client_unmanage(ObClient *self)
guint j;
GSList *it;
- ob_debug("Unmanaging window: %lx (%s)\n", self->window, self->class);
+ ob_debug("Unmanaging window: %lx (%s) (%s)\n", self->window, self->class,
+ self->title ? self->title : "");
g_assert(self != NULL);
@@ -2613,6 +2613,9 @@ void client_kill(ObClient *self)
void client_hilite(ObClient *self, gboolean hilite)
{
+ if (self->demands_attention == hilite)
+ return; /* no change */
+
/* don't allow focused windows to hilite */
self->demands_attention = hilite && !client_focused(self);
if (self->demands_attention)
@@ -2942,6 +2945,8 @@ gboolean client_focus(ObClient *self)
return FALSE;
}
+ ob_debug("Focusing client \"%s\" at time %u\n", self->title, event_curtime);
+
if (self->can_focus) {
/* RevertToPointerRoot causes much more headache than RevertToNone, so
I choose to use it always, hopefully to find errors quicker, if any