summaryrefslogtreecommitdiff
path: root/openbox/frame.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-24 20:39:59 +0000
committerDana Jansens <danakj@orodu.net>2007-04-24 20:39:59 +0000
commit79cd7b4b2c21c975c441831760708d4919208f6d (patch)
tree7a911bad498b0123886cd9727d1f01d296d1c53a /openbox/frame.c
parentd19c184b2d83e3f129a085dee721d3fd22b003f1 (diff)
dont cause focus change with enter events when youre already in the window
Diffstat (limited to 'openbox/frame.c')
-rw-r--r--openbox/frame.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index eb223f64..cdacf101 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -36,6 +36,12 @@
#define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \
ButtonMotionMask | \
EnterWindowMask | LeaveWindowMask)
+/* The inner window does not need enter/leave events.
+ If it does get them, then it needs its own context for enter events
+ because sloppy focus will focus the window when you enter the inner window
+ from the frame. */
+#define INNER_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \
+ ButtonMotionMask)
#define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \
f->cbwidth_y)
@@ -100,7 +106,7 @@ ObFrame *frame_new(ObClient *client)
self->window = createWindow(RootWindow(ob_display, ob_screen), visual,
mask, &attrib);
- attrib.event_mask = ELEMENT_EVENTMASK;
+ attrib.event_mask = INNER_EVENTMASK;
self->inner = createWindow(self->window, visual, mask, &attrib);
mask &= ~CWEventMask;