From: Dana Jansens Date: Tue, 24 Apr 2007 01:00:27 +0000 (+0000) Subject: add the PointerMotionHintMask everywhere, we dont need every mouse event X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=a488360f48abbfd6e67576a1844d792b28e6065c;p=chaz%2Fopenbox add the PointerMotionHintMask everywhere, we dont need every mouse event --- diff --git a/openbox/client.c b/openbox/client.c index 08d316c4..f2feefdf 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -52,7 +52,7 @@ #define CLIENT_EVENTMASK (PropertyChangeMask | StructureNotifyMask) #define CLIENT_NOPROPAGATEMASK (ButtonPressMask | ButtonReleaseMask | \ - ButtonMotionMask) + ButtonMotionMask | PointerMotionHintMask) typedef struct { diff --git a/openbox/dock.c b/openbox/dock.c index 2e191f1c..8433c260 100644 --- a/openbox/dock.c +++ b/openbox/dock.c @@ -41,7 +41,7 @@ static void dock_app_grab_button(ObDockApp *app, gboolean grab) grab_button_full(config_dock_app_move_button, config_dock_app_move_modifiers, app->icon_win, ButtonPressMask | ButtonReleaseMask | - ButtonMotionMask, + ButtonMotionMask | PointerMotionHintMask, GrabModeAsync, OB_CURSOR_MOVE); } else { ungrab_button(config_dock_app_move_button, diff --git a/openbox/frame.c b/openbox/frame.c index eb223f64..41859206 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -34,7 +34,7 @@ #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \ ButtonPressMask | ButtonReleaseMask) #define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \ - ButtonMotionMask | \ + ButtonMotionMask | PointerMotionHintMask \ EnterWindowMask | LeaveWindowMask) #define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \ diff --git a/openbox/grab.c b/openbox/grab.c index e7bd41d9..a382c1ad 100644 --- a/openbox/grab.c +++ b/openbox/grab.c @@ -27,7 +27,8 @@ #include #include -#define GRAB_PTR_MASK (ButtonPressMask | ButtonReleaseMask | PointerMotionMask) +#define GRAB_PTR_MASK (ButtonPressMask | ButtonReleaseMask | \ + PointerMotionMask | PointerMotionHintMask) #define GRAB_KEY_MASK (KeyPressMask | KeyReleaseMask) #define MASK_LIST_SIZE 8 diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 4cb2083d..c6a333a9 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -31,8 +31,9 @@ #define SEPARATOR_HEIGHT 3 #define MAX_MENU_WIDTH 400 -#define FRAME_EVENTMASK (ButtonPressMask |ButtonMotionMask | EnterWindowMask |\ - LeaveWindowMask) +#define FRAME_EVENTMASK (ButtonPressMask |ButtonMotionMask | \ + PointerMotionHintMask | \ + EnterWindowMask | LeaveWindowMask) #define ENTRY_EVENTMASK (EnterWindowMask | LeaveWindowMask | \ ButtonPressMask | ButtonReleaseMask) diff --git a/openbox/mouse.c b/openbox/mouse.c index 27172d52..55f1bf53 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -106,7 +106,8 @@ void mouse_grab_for_client(ObClient *client, gboolean grab) if (FRAME_CONTEXT(i, client)) { win = client->frame->window; mode = GrabModeAsync; - mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask; + mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask | + PointerMotionHintMask; } else if (CLIENT_CONTEXT(i, client)) { win = client->frame->plate; mode = GrabModeSync; /* this is handled in event */ diff --git a/openbox/screen.c b/openbox/screen.c index 74b8e71d..e8ef3857 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -47,7 +47,8 @@ #define ROOT_EVENTMASK (StructureNotifyMask | PropertyChangeMask | \ EnterWindowMask | LeaveWindowMask | \ SubstructureRedirectMask | FocusChangeMask | \ - ButtonPressMask | ButtonReleaseMask | ButtonMotionMask) + ButtonPressMask | ButtonReleaseMask | \ + ButtonMotionMask | PointerMotionHintMask) guint screen_num_desktops; guint screen_num_monitors;