Alexandre Julliard : winex11: Add an option to automatically clip the pointer in desktop and multi-monitor modes .

Alexandre Julliard julliard at winehq.org
Wed May 11 13:02:55 CDT 2011


Module: wine
Branch: master
Commit: ae52a8c2cb0cbca1496e86956a59e5d7160ca5a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ae52a8c2cb0cbca1496e86956a59e5d7160ca5a2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 11 13:07:34 2011 +0200

winex11: Add an option to automatically clip the pointer in desktop and multi-monitor modes.

---

 dlls/winex11.drv/mouse.c       |    7 +++++--
 dlls/winex11.drv/x11drv.h      |    1 +
 dlls/winex11.drv/x11drv_main.c |    4 ++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index a4b846b..3e1a78f 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -518,8 +518,11 @@ BOOL clip_fullscreen_window( HWND hwnd )
     if (!is_window_rect_fullscreen( &data->whole_rect )) return FALSE;
     if (GetTickCount() - x11drv_thread_data()->clip_reset < 1000) return FALSE;
     SetRect( &rect, 0, 0, screen_width, screen_height );
-    if (!EqualRect( &rect, &virtual_screen_rect )) return FALSE;
-    if (root_window != DefaultRootWindow( gdi_display )) return FALSE;
+    if (!grab_fullscreen)
+    {
+        if (!EqualRect( &rect, &virtual_screen_rect )) return FALSE;
+        if (root_window != DefaultRootWindow( gdi_display )) return FALSE;
+    }
     TRACE( "win %p clipping fullscreen\n", hwnd );
     return grab_clipping_window( &rect, TRUE );
 }
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index b7011da..fc6902b 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -601,6 +601,7 @@ extern int use_primary_selection;
 extern int use_system_cursors;
 extern int show_systray;
 extern int grab_pointer;
+extern int grab_fullscreen;
 extern int usexcomposite;
 extern int managed_mode;
 extern int decorated_mode;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index cb6d793..8e0a784 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -84,6 +84,7 @@ int use_primary_selection = 0;
 int use_system_cursors = 1;
 int show_systray = 1;
 int grab_pointer = 1;
+int grab_fullscreen = 0;
 int managed_mode = 1;
 int decorated_mode = 1;
 int private_color_map = 0;
@@ -426,6 +427,9 @@ static void setup_options(void)
     if (!get_config_key( hkey, appkey, "GrabPointer", buffer, sizeof(buffer) ))
         grab_pointer = IS_OPTION_TRUE( buffer[0] );
 
+    if (!get_config_key( hkey, appkey, "GrabFullscreen", buffer, sizeof(buffer) ))
+        grab_fullscreen = IS_OPTION_TRUE( buffer[0] );
+
     screen_depth = 0;
     if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) ))
         screen_depth = atoi(buffer);




More information about the wine-cvs mailing list