[openbox] followMouse and resized windows

Mikael Magnusson mangosoft at comhem.se
Sat Mar 1 10:50:31 EST 2008


On Sat, 1 Mar 2008, Mike Hokenson wrote:

> Hi,
>
> With followMouse=yes and focusNew=no, should openbox focus a window if
> it's resized to an area large enough that the mouse pointer falls on
> the window? I don't see this alot, usually with gmplayer's video window
> on larger resolution movies.
>
> Attached is a small gtk example that creates a 50px window and resizes
> to 2000px, compile with:
>
> gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` test.c

Ah hm, it seems the code that handles app resizes unconditionally ignores 
the enters, I think this patch will help

diff --git a/openbox/client.c b/openbox/client.c
index 816fa92..9db4e9f 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -3042,7 +3042,7 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
      /* adjust the frame */
      if (fmoved || fresized) {
          gulong ignore_start;
-        if (!user)
+        if (!user && !config_under_mouse)
              ignore_start = event_start_ignore_all_enters();

          /* replay pending pointer event before move the window, in case it
@@ -3051,7 +3051,7 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,

          frame_adjust_area(self->frame, fmoved, fresized, FALSE);

-        if (!user)
+        if (!user && !config_under_mouse)
              event_end_ignore_all_enters(ignore_start);
      }



--
Mikael Magnusson



More information about the openbox mailing list