winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
937 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Add an option to disable pointer grabs.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 4d358bfee3ac087405a7609ecde0fd6e2d0c9353 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4d358bfee3ac087405a7609ec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 5 11:00:09 2011 +0200 winex11: Add an option to disable pointer grabs. --- dlls/winex11.drv/mouse.c | 29 ++++++++++++++++------------- dlls/winex11.drv/x11drv.h | 1 + dlls/winex11.drv/x11drv_main.c | 4 ++++ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 2b793e1..fe9f716 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -938,22 +938,25 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) return TRUE; /* don't clip in the desktop process */ - TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); - wine_tsx11_lock(); - XUnmapWindow( display, clip_window ); - XMoveResizeWindow( display, clip_window, - clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, - clip->right - clip->left, clip->bottom - clip->top ); - XMapWindow( display, clip_window ); - if (!XGrabPointer( display, clip_window, False, - PointerMotionMask | ButtonPressMask | ButtonReleaseMask, - GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) + if (grab_pointer) { + TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); + wine_tsx11_lock(); + XUnmapWindow( display, clip_window ); + XMoveResizeWindow( display, clip_window, + clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, + clip->right - clip->left, clip->bottom - clip->top ); + XMapWindow( display, clip_window ); + if (!XGrabPointer( display, clip_window, False, + PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) + { + wine_tsx11_unlock(); + clip_rect = *clip; + return TRUE; + } wine_tsx11_unlock(); - clip_rect = *clip; - return TRUE; } - wine_tsx11_unlock(); } /* release the grab if any */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index a746d08..0a1e3d9 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -598,6 +598,7 @@ extern int use_take_focus; extern int use_primary_selection; extern int use_system_cursors; extern int show_systray; +extern int grab_pointer; 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 606bc28..cc38be2 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -84,6 +84,7 @@ int use_take_focus = 1; int use_primary_selection = 0; int use_system_cursors = 1; int show_systray = 1; +int grab_pointer = 1; 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, "ShowSystray", buffer, sizeof(buffer) )) show_systray = IS_OPTION_TRUE( buffer[0] ); + if (!get_config_key( hkey, appkey, "GrabPointer", buffer, sizeof(buffer) )) + grab_pointer = IS_OPTION_TRUE( buffer[0] ); + screen_depth = 0; if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) )) screen_depth = atoi(buffer);
1
0
0
0
Alexandre Julliard : winex11: Implement cursor clipping using a pointer grab.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: ae2b356361be4d9d25d82bc62d0fbb130aea4f0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae2b356361be4d9d25d82bc62…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 5 11:50:45 2011 +0200 winex11: Implement cursor clipping using a pointer grab. --- dlls/winex11.drv/desktop.c | 1 + dlls/winex11.drv/mouse.c | 56 +++++++++++++++++++++++++++++++++++- dlls/winex11.drv/window.c | 34 +++++++++++++++++++-- dlls/winex11.drv/winex11.drv.spec | 1 + dlls/winex11.drv/x11drv.h | 1 + 5 files changed, 87 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 4a36e46..eefc74c 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -258,6 +258,7 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height ) virtual_screen_rect.right - virtual_screen_rect.left, virtual_screen_rect.bottom - virtual_screen_rect.top, SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE ); + X11DRV_ClipCursor( NULL ); SendMessageTimeoutW( HWND_BROADCAST, WM_DISPLAYCHANGE, screen_bpp, MAKELPARAM( width, height ), SMTO_ABORTIFHUNG, 2000, NULL ); } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 1a2d618..2b793e1 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -95,6 +95,7 @@ static const UINT button_up_flags[NB_BUTTONS] = static HWND cursor_window; static DWORD last_time_modified; static XContext cursor_context; +static RECT clip_rect; static Cursor create_cursor( HANDLE handle ); @@ -216,11 +217,18 @@ void sync_window_cursor( struct x11drv_win_data *data ) static void send_mouse_input( HWND hwnd, UINT flags, Window window, int x, int y, unsigned int state, DWORD mouse_data, Time time ) { - struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); + struct x11drv_win_data *data; POINT pt; INPUT input; - if (!data) return; + if (!hwnd && window == clip_window) + { + pt.x = x + clip_rect.left; + pt.y = y + clip_rect.top; + goto done; + } + + if (!(data = X11DRV_get_win_data( hwnd ))) return; if (window == data->whole_window) { @@ -270,6 +278,7 @@ static void send_mouse_input( HWND hwnd, UINT flags, Window window, int x, int y SERVER_END_REQ; } +done: input.type = INPUT_MOUSE; input.u.mi.dx = pt.x; input.u.mi.dy = pt.y; @@ -911,6 +920,49 @@ BOOL CDECL X11DRV_GetCursorPos(LPPOINT pos) return ret; } +/*********************************************************************** + * ClipCursor (X11DRV.@) + */ +BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ) +{ + Display *display = thread_init_display(); + + if (!clip_window) return TRUE; + + /* we are clipping if the clip rectangle is smaller than the screen */ + if (clip && (clip->left > virtual_screen_rect.left || + clip->right < virtual_screen_rect.right || + clip->top > virtual_screen_rect.top || + clip->bottom < virtual_screen_rect.bottom)) + { + if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) + return TRUE; /* don't clip in the desktop process */ + + TRACE( "clipping to %s\n", wine_dbgstr_rect(clip) ); + wine_tsx11_lock(); + XUnmapWindow( display, clip_window ); + XMoveResizeWindow( display, clip_window, + clip->left - virtual_screen_rect.left, clip->top - virtual_screen_rect.top, + clip->right - clip->left, clip->bottom - clip->top ); + XMapWindow( display, clip_window ); + if (!XGrabPointer( display, clip_window, False, + PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime )) + { + wine_tsx11_unlock(); + clip_rect = *clip; + return TRUE; + } + wine_tsx11_unlock(); + } + + /* release the grab if any */ + TRACE( "no longer clipping\n" ); + wine_tsx11_lock(); + XUnmapWindow( display, clip_window ); + wine_tsx11_unlock(); + return TRUE; +} /*********************************************************************** * X11DRV_ButtonPress diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index e2ffccc..1fcadb5 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -68,6 +68,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); #define SWP_AGG_NOPOSCHANGE (SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOZORDER) +/* cursor clipping window */ +Window clip_window = 0; + /* X context to associate a hwnd to an X window */ XContext winContext = 0; @@ -82,6 +85,7 @@ static const char foreign_window_prop[] = "__wine_x11_foreign_window"; static const char whole_window_prop[] = "__wine_x11_whole_window"; static const char client_window_prop[]= "__wine_x11_client_window"; static const char icon_window_prop[] = "__wine_x11_icon_window"; +static const char clip_window_prop[] = "__wine_x11_clip_window"; static const char fbconfig_id_prop[] = "__wine_x11_fbconfig_id"; static const char gl_drawable_prop[] = "__wine_x11_gl_drawable"; static const char pixmap_prop[] = "__wine_x11_pixmap"; @@ -1962,13 +1966,35 @@ BOOL CDECL X11DRV_CreateDesktopWindow( HWND hwnd ) */ BOOL CDECL X11DRV_CreateWindow( HWND hwnd ) { - if (hwnd == GetDesktopWindow() && root_window != DefaultRootWindow( gdi_display )) + Display *display = thread_init_display(); + + if (hwnd == GetDesktopWindow()) { - Display *display = thread_init_display(); + XSetWindowAttributes attr; + + if (root_window != DefaultRootWindow( gdi_display )) + { + /* the desktop win data can't be created lazily */ + if (!create_desktop_win_data( display, hwnd )) return FALSE; + } - /* the desktop win data can't be created lazily */ - if (!create_desktop_win_data( display, hwnd )) return FALSE; + /* create the cursor clipping window */ + attr.override_redirect = TRUE; + attr.event_mask = StructureNotifyMask; + wine_tsx11_lock(); + clip_window = XCreateWindow( display, root_window, 0, 0, 1, 1, 0, 0, + InputOnly, visual, CWOverrideRedirect | CWEventMask, &attr ); + wine_tsx11_unlock(); + SetPropA( hwnd, clip_window_prop, (HANDLE)clip_window ); } + else if (!clip_window) + { + clip_window = (Window)GetPropA( GetDesktopWindow(), clip_window_prop ); + wine_tsx11_lock(); + XSelectInput( display, clip_window, StructureNotifyMask ); + wine_tsx11_unlock(); + } + return TRUE; } diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 85177c5..f5c45d1 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -77,6 +77,7 @@ @ cdecl SetCursor(long) X11DRV_SetCursor @ cdecl GetCursorPos(ptr) X11DRV_GetCursorPos @ cdecl SetCursorPos(long long) X11DRV_SetCursorPos +@ cdecl ClipCursor(ptr) X11DRV_ClipCursor @ cdecl GetScreenSaveActive() X11DRV_GetScreenSaveActive @ cdecl SetScreenSaveActive(long) X11DRV_SetScreenSaveActive @ cdecl ChangeDisplaySettingsEx(ptr ptr long long long) X11DRV_ChangeDisplaySettingsEx diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index e51a614..a746d08 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -585,6 +585,7 @@ static inline size_t get_property_size( int format, unsigned long count ) extern Visual *visual; extern Window root_window; +extern Window clip_window; extern unsigned int screen_width; extern unsigned int screen_height; extern unsigned int screen_bpp;
1
0
0
0
Alexandre Julliard : server: Post a message to the desktop window when the cursor clip rectangle changes .
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 21e86f60ec44bbb61c87b97abb6fa7a9843e42b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21e86f60ec44bbb61c87b97ab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 31 20:27:29 2011 +0200 server: Post a message to the desktop window when the cursor clip rectangle changes. --- dlls/user32/cursoricon.c | 3 ++- dlls/user32/message.c | 6 ++++++ dlls/user32/user_private.h | 1 + dlls/winex11.drv/xinerama.c | 1 - include/wine/server_protocol.h | 4 +++- programs/explorer/desktop.c | 1 + server/protocol.def | 1 + server/queue.c | 25 ++++++++++++++++++++----- server/request.h | 3 ++- server/trace.c | 1 + server/user.h | 1 + 11 files changed, 38 insertions(+), 9 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 7a9c78a..476aa51 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1717,7 +1717,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH ClipCursor( const RECT *rect ) SERVER_START_REQ( set_cursor ) { - req->flags = SET_CURSOR_CLIP; + req->flags = SET_CURSOR_CLIP; + req->clip_msg = WM_WINE_CLIPCURSOR; if (rect) { req->clip.left = rect->left; diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 59f2e49..51691ab 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -1869,6 +1869,12 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR return call_current_hook( h_extra->handle, HC_ACTION, wparam, h_extra->lparam ); } + case WM_WINE_CLIPCURSOR: + { + RECT rect; + GetClipCursor( &rect ); + return USER_Driver->pClipCursor( &rect ); + } default: if (msg >= WM_WINE_FIRST_DRIVER_MSG && msg <= WM_WINE_LAST_DRIVER_MSG) return USER_Driver->pWindowMessage( hwnd, msg, wparam, lparam ); diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 6d668ba..bd7d39e 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -47,6 +47,7 @@ enum wine_internal_message WM_WINE_SETACTIVEWINDOW, WM_WINE_KEYBOARD_LL_HOOK, WM_WINE_MOUSE_LL_HOOK, + WM_WINE_CLIPCURSOR, WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */ WM_WINE_LAST_DRIVER_MSG = 0x80001fff }; diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index 2a66df5..b2014ed 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -197,7 +197,6 @@ void xinerama_init( unsigned int width, unsigned int height ) wine_dbgstr_rect(&rect), screen_width, screen_height ); wine_tsx11_unlock(); - ClipCursor( NULL ); /* reset the cursor clip rectangle */ } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 70e539b..d321a80 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -4798,6 +4798,8 @@ struct set_cursor_request int x; int y; rectangle_t clip; + unsigned int clip_msg; + char __pad_52[4]; }; struct set_cursor_reply { @@ -5561,6 +5563,6 @@ union generic_reply struct set_cursor_reply set_cursor_reply; }; -#define SERVER_PROTOCOL_VERSION 418 +#define SERVER_PROTOCOL_VERSION 419 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 78ff389..b2f7730 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -334,6 +334,7 @@ void manage_desktop( WCHAR *arg ) if (name) set_desktop_window_title( hwnd, name ); SystemParametersInfoA( SPI_SETDESKPATTERN, -1, NULL, FALSE ); SetDeskWallPaper( (LPSTR)-1 ); + ClipCursor( NULL ); initialize_display_settings( hwnd ); initialize_appbar(); initialize_systray( using_root ); diff --git a/server/protocol.def b/server/protocol.def index f8fc82b..8aaf2d3 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -3318,6 +3318,7 @@ enum coords_relative int x; /* cursor position */ int y; rectangle_t clip; /* cursor clip rectangle */ + unsigned int clip_msg; /* message to post on cursor clip changes */ @REPLY user_handle_t prev_handle; /* previous handle */ int prev_count; /* previous show count */ diff --git a/server/queue.c b/server/queue.c index 35448e5..14086eb 100644 --- a/server/queue.c +++ b/server/queue.c @@ -318,11 +318,23 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_ return 1; } +/* set the cursor clip rectangle */ +static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect ) +{ + rectangle_t top_rect, new_rect; + + get_top_window_rectangle( desktop, &top_rect ); + if (!rect || !intersect_rect( &new_rect, &top_rect, rect )) new_rect = top_rect; + if (!memcmp( &desktop->cursor.clip, &new_rect, sizeof(new_rect) )) return; + desktop->cursor.clip = new_rect; + if (desktop->cursor.clip_msg) post_desktop_message( desktop, desktop->cursor.clip_msg, 0, 0 ); +} + /* change the foreground input and reset the cursor clip rect */ static void set_foreground_input( struct desktop *desktop, struct thread_input *input ) { if (desktop->foreground_input == input) return; - get_top_window_rectangle( desktop, &desktop->cursor.clip ); + set_clip_rectangle( desktop, NULL ); desktop->foreground_input = input; } @@ -2620,10 +2632,13 @@ DECL_HANDLER(set_cursor) } if (req->flags & SET_CURSOR_CLIP) { - rectangle_t top_rect; - get_top_window_rectangle( input->desktop, &top_rect ); - if (!intersect_rect( &input->desktop->cursor.clip, &top_rect, &req->clip )) - input->desktop->cursor.clip = top_rect; + struct desktop *desktop = input->desktop; + + /* only the desktop owner can set the message */ + if (req->clip_msg && get_top_window_owner(desktop) == current->process) + desktop->cursor.clip_msg = req->clip_msg; + + set_clip_rectangle( desktop, &req->clip ); } reply->new_x = input->desktop->cursor.x; diff --git a/server/request.h b/server/request.h index c2104e9..0133af7 100644 --- a/server/request.h +++ b/server/request.h @@ -2097,7 +2097,8 @@ C_ASSERT( FIELD_OFFSET(struct set_cursor_request, show_count) == 20 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_request, x) == 24 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_request, y) == 28 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_request, clip) == 32 ); -C_ASSERT( sizeof(struct set_cursor_request) == 48 ); +C_ASSERT( FIELD_OFFSET(struct set_cursor_request, clip_msg) == 48 ); +C_ASSERT( sizeof(struct set_cursor_request) == 56 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_reply, prev_handle) == 8 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_reply, prev_count) == 12 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_reply, new_x) == 16 ); diff --git a/server/trace.c b/server/trace.c index 553ba4d..06fe545 100644 --- a/server/trace.c +++ b/server/trace.c @@ -3896,6 +3896,7 @@ static void dump_set_cursor_request( const struct set_cursor_request *req ) fprintf( stderr, ", x=%d", req->x ); fprintf( stderr, ", y=%d", req->y ); dump_rectangle( ", clip=", &req->clip ); + fprintf( stderr, ", clip_msg=%08x", req->clip_msg ); } static void dump_set_cursor_reply( const struct set_cursor_reply *req ) diff --git a/server/user.h b/server/user.h index 2a3f369..9b86031 100644 --- a/server/user.h +++ b/server/user.h @@ -56,6 +56,7 @@ struct global_cursor int x; /* cursor position */ int y; rectangle_t clip; /* cursor clip rectangle */ + unsigned int clip_msg; /* message to post for cursor clip changes */ unsigned int last_change; /* time of last position change */ };
1
0
0
0
Alexandre Julliard : server: Add a more general way of posting messages to the desktop window.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 85358b10f35e829ba42da8f46a40a8fd7eee6f9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85358b10f35e829ba42da8f46…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 31 20:25:45 2011 +0200 server: Add a more general way of posting messages to the desktop window. --- server/user.h | 3 ++- server/window.c | 7 ++++--- server/winstation.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/user.h b/server/user.h index cc603cf..2a3f369 100644 --- a/server/user.h +++ b/server/user.h @@ -143,7 +143,8 @@ extern int rect_in_region( struct region *region, const rectangle_t *rect ); extern struct process *get_top_window_owner( struct desktop *desktop ); extern void get_top_window_rectangle( struct desktop *desktop, rectangle_t *rect ); -extern void close_desktop_window( struct desktop *desktop ); +extern void post_desktop_message( struct desktop *desktop, unsigned int message, + lparam_t wparam, lparam_t lparam ); extern void destroy_window( struct window *win ); extern void destroy_thread_windows( struct thread *thread ); extern int is_child_window( user_handle_t parent, user_handle_t child ); diff --git a/server/window.c b/server/window.c index 0fbce24..3465eba 100644 --- a/server/window.c +++ b/server/window.c @@ -402,11 +402,12 @@ void get_top_window_rectangle( struct desktop *desktop, rectangle_t *rect ) else *rect = win->window_rect; } -/* attempt to close the desktop window when the last process using it is gone */ -void close_desktop_window( struct desktop *desktop ) +/* post a message to the desktop window */ +void post_desktop_message( struct desktop *desktop, unsigned int message, + lparam_t wparam, lparam_t lparam ) { struct window *win = desktop->top_window; - if (win && win->thread) post_message( win->handle, WM_CLOSE, 0, 0 ); + if (win && win->thread) post_message( win->handle, message, wparam, lparam ); } /* create a new window structure (note: the window is not linked in the window tree) */ diff --git a/server/winstation.c b/server/winstation.c index 7b01919..20656aa 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -376,7 +376,7 @@ static void close_desktop_timeout( void *private ) desktop->close_timeout = NULL; unlink_named_object( &desktop->obj ); /* make sure no other process can open it */ - close_desktop_window( desktop ); /* and signal the owner to quit */ + post_desktop_message( desktop, WM_CLOSE, 0, 0 ); /* and signal the owner to quit */ } /* close the desktop of a given process */
1
0
0
0
Alexandre Julliard : server: Don' t run low-level hooks in debugged processes.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 437a838470af2f1ba57c7cce16618d0bfc9fdf19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=437a838470af2f1ba57c7cce1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 5 11:12:57 2011 +0200 server: Don't run low-level hooks in debugged processes. --- server/hook.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/server/hook.c b/server/hook.c index c9df5d3..180ddf1 100644 --- a/server/hook.c +++ b/server/hook.c @@ -191,19 +191,6 @@ static inline struct hook *get_first_hook( struct hook_table *table, int index ) return elem ? HOOK_ENTRY( elem ) : NULL; } -/* check if a given hook should run in the current thread */ -static inline int run_hook_in_current_thread( struct hook *hook ) -{ - if ((!hook->process || hook->process == current->process) && - (!(hook->flags & WINEVENT_SKIPOWNPROCESS) || hook->process != current->process)) - { - if ((!hook->thread || hook->thread == current) && - (!(hook->flags & WINEVENT_SKIPOWNTHREAD) || hook->thread != current)) - return 1; - } - return 0; -} - /* check if a given hook should run in the owner thread instead of the current thread */ static inline int run_hook_in_owner_thread( struct hook *hook ) { @@ -213,6 +200,18 @@ static inline int run_hook_in_owner_thread( struct hook *hook ) return 0; } +/* check if a given hook should run in the current thread */ +static inline int run_hook_in_current_thread( struct hook *hook ) +{ + if (hook->process && hook->process != current->process) return 0; + if ((hook->flags & WINEVENT_SKIPOWNPROCESS) && hook->process == current->process) return 0; + if (hook->thread && hook->thread != current) return 0; + if ((hook->flags & WINEVENT_SKIPOWNTHREAD) && hook->thread == current) return 0; + /* don't run low-level hooks in debugged processes */ + if (run_hook_in_owner_thread( hook ) && hook->owner->process->debugger) return 0; + return 1; +} + /* find the first non-deleted hook in the chain */ static inline struct hook *get_first_valid_hook( struct hook_table *table, int index, int event, user_handle_t win,
1
0
0
0
Dmitry Timoshkov : user32: DefDlgProc on WM_QUIT should repost it and terminate the dialog message loop .
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: bb411cfb6560c9fb0e38bbfb11493c5d8e8093b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb411cfb6560c9fb0e38bbfb1…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Mon Apr 4 20:40:58 2011 +0900 user32: DefDlgProc on WM_QUIT should repost it and terminate the dialog message loop. --- dlls/user32/dialog.c | 8 +++++++- dlls/user32/tests/msg.c | 6 +----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 052fbff..b7b3cce 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -805,7 +805,13 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner ) /* No message present -> send ENTERIDLE and wait */ SendMessageW( ownerMsg, WM_ENTERIDLE, MSGF_DIALOGBOX, (LPARAM)hwnd ); } - if (!GetMessageW( &msg, 0, 0, 0 )) break; + GetMessageW( &msg, 0, 0, 0 ); + } + + if (msg.message == WM_QUIT) + { + PostQuitMessage( msg.wParam ); + dlgInfo->flags |= DF_END; } if (!IsWindow( hwnd )) return 0; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 65e417a..4be4c38 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -10124,19 +10124,15 @@ static void test_quit_message(void) flush_events(); flush_sequence(); ret = DialogBoxParam(GetModuleHandle(0), "TEST_EMPTY_DIALOG", 0, wm_quit_dlg_proc, 0); -todo_wine ok(ret == 1, "expected 1, got %d\n", ret); - ok_sequence(WmQuitDialogSeq, "WmQuitDialogSeq", TRUE); + ok_sequence(WmQuitDialogSeq, "WmQuitDialogSeq", FALSE); memset(&msg, 0xab, sizeof(msg)); ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); -todo_wine ok(ret, "PeekMessage failed\n"); -if (ret) { ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); ok(msg.wParam == 0x1234, "wParam was 0x%lx instead of 0x1234\n", msg.wParam); ok(msg.lParam == 0, "lParam was 0x%lx instead of 0\n", msg.lParam); } -} static const struct message WmMouseHoverSeq[] = { { WM_MOUSEACTIVATE, sent|optional }, /* we can get those when moving the mouse in focus-follow-mouse mode under X11 */
1
0
0
0
Dmitry Timoshkov : user32: Add a test for WM_QUIT handling by DefDlgProc.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 1a65e209f8c638fde7d7b3b8928fdc365a7379f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a65e209f8c638fde7d7b3b89…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Mon Apr 4 20:40:42 2011 +0900 user32: Add a test for WM_QUIT handling by DefDlgProc. --- dlls/user32/tests/msg.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 712f564..65e417a 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -10026,6 +10026,50 @@ done: flush_events(); } +static INT_PTR CALLBACK wm_quit_dlg_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) +{ + struct recvd_message msg; + + if (ignore_message( message )) return 0; + + msg.hwnd = hwnd; + msg.message = message; + msg.flags = sent|wparam|lparam; + msg.wParam = wp; + msg.lParam = lp; + msg.descr = "dialog"; + add_message(&msg); + + switch (message) + { + case WM_INITDIALOG: + PostMessage(hwnd, WM_QUIT, 0x1234, 0x5678); + PostMessage(hwnd, WM_USER, 0xdead, 0xbeef); + return 0; + + case WM_GETDLGCODE: + return 0; + + case WM_USER: + EndDialog(hwnd, 0); + break; + } + + return 1; +} + +static const struct message WmQuitDialogSeq[] = { + { HCBT_CREATEWND, hook }, + { WM_SETFONT, sent }, + { WM_INITDIALOG, sent }, + { WM_CHANGEUISTATE, sent|optional }, + { HCBT_DESTROYWND, hook }, + { 0x0090, sent|optional }, /* Vista */ + { WM_DESTROY, sent }, + { WM_NCDESTROY, sent }, + { 0 } +}; + static void test_quit_message(void) { MSG msg; @@ -10076,6 +10120,22 @@ static void test_quit_message(void) ret = GetMessage(&msg, NULL, 0, 0); ok(ret > 0, "GetMessage failed with error %d\n", GetLastError()); ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message); + + flush_events(); + flush_sequence(); + ret = DialogBoxParam(GetModuleHandle(0), "TEST_EMPTY_DIALOG", 0, wm_quit_dlg_proc, 0); +todo_wine + ok(ret == 1, "expected 1, got %d\n", ret); + ok_sequence(WmQuitDialogSeq, "WmQuitDialogSeq", TRUE); + memset(&msg, 0xab, sizeof(msg)); + ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); +todo_wine + ok(ret, "PeekMessage failed\n"); +if (ret) { + ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); + ok(msg.wParam == 0x1234, "wParam was 0x%lx instead of 0x1234\n", msg.wParam); + ok(msg.lParam == 0, "lParam was 0x%lx instead of 0\n", msg.lParam); +} } static const struct message WmMouseHoverSeq[] = {
1
0
0
0
Frédéric Delanoy : po: Update French translation.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 6fcad42e9a9982c4fdfb8a69051100a04cf1556e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6fcad42e9a9982c4fdfb8a690…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Mon Apr 4 21:48:21 2011 +0200 po: Update French translation. --- po/fr.po | 21 ++++++--------------- 1 files changed, 6 insertions(+), 15 deletions(-) diff --git a/po/fr.po b/po/fr.po index a71f74f..3c67a9f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -91,14 +91,12 @@ msgstr "" "l'installation d'un fichier corrompu." #: avifil32.rc:27 -#, fuzzy msgid "Waveform: %s" -msgstr "Waveform : %s" +msgstr "Forme d'onde : %s" #: avifil32.rc:28 -#, fuzzy msgid "Waveform" -msgstr "Waveform" +msgstr "Forme d'onde" #: avifil32.rc:29 msgid "All multimedia files" @@ -2025,13 +2023,12 @@ msgid "Default MidiOut Device" msgstr "Périphérique MidiOut par défaut" #: dxdiagn.rc:25 -#, fuzzy msgid "Regional Setting" -msgstr "Paramètres par défaut" +msgstr "Paramètres régionaux" #: dxdiagn.rc:26 msgid "%uMB used, %uMB available" -msgstr "" +msgstr "%u MB utilisés, %u MB disponibles" #: hhctrl.rc:67 hhctrl.rc:47 wordpad.rc:155 msgid "Options" @@ -5851,13 +5848,8 @@ msgid "Type the path where the file is located, and then click OK." msgstr "Saisissez le chemin du fichier, puis cliquez sur OK." #: shdoclc.rc:36 -#, fuzzy msgid "Default" -msgstr "" -"#-#-#-#-# fr.po (Wine) #-#-#-#-#\n" -"Standard\n" -"#-#-#-#-# fr.po (Wine) #-#-#-#-#\n" -"Par défaut" +msgstr "Standard" #: shdoclc.rc:39 msgid "F&orward" @@ -8539,9 +8531,8 @@ msgid "Could not stop service %s\n" msgstr "Impossible d'arrêter le service %s\n" #: net.rc:32 -#, fuzzy msgid "Could not get handle to service control manager.\n" -msgstr "Impossible d'obtenir le gestionnaire de contrôle de service.\n" +msgstr "Impossible d'accéder au gestionnaire de contrôle de services.\n" #: net.rc:33 msgid "Could not get handle to service.\n"
1
0
0
0
Jerome Leclanche : mscms: Move MSCMS_dbgstr_tag outside of the HAVE_LCMS conditional.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: 41838721fc565ce88aacc67dd78a2a3db0a80352 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41838721fc565ce88aacc67dd…
Author: Jerome Leclanche <adys.wh(a)gmail.com> Date: Tue Apr 5 08:44:49 2011 +0100 mscms: Move MSCMS_dbgstr_tag outside of the HAVE_LCMS conditional. --- dlls/mscms/mscms_priv.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mscms/mscms_priv.h b/dlls/mscms/mscms_priv.h index 479148b..e48193e 100644 --- a/dlls/mscms/mscms_priv.h +++ b/dlls/mscms/mscms_priv.h @@ -109,6 +109,6 @@ extern void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header ); extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile ); -extern const char *MSCMS_dbgstr_tag(DWORD); - #endif /* HAVE_LCMS */ + +extern const char *MSCMS_dbgstr_tag(DWORD);
1
0
0
0
Gerald Pfeifer : quartz: Properly set a parameter by reference in Parser_OutputPin_DecideAllocator.
by Alexandre Julliard
05 Apr '11
05 Apr '11
Module: wine Branch: master Commit: a3d8e7b369b244303a94109fcf11c473ad1fc51c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3d8e7b369b244303a94109fc…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Tue Apr 5 00:48:01 2011 +0200 quartz: Properly set a parameter by reference in Parser_OutputPin_DecideAllocator. --- dlls/quartz/parser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 354d78f..9d7baa0 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -582,7 +582,7 @@ static HRESULT WINAPI Parser_OutputPin_DecideAllocator(BaseOutputPin *iface, IMe Parser_OutputPin *This = (Parser_OutputPin *)iface; HRESULT hr; - pAlloc = NULL; + *pAlloc = NULL; if (This->alloc) hr = IMemInputPin_NotifyAllocator(pPin, This->alloc, This->readonly);
1
0
0
0
← Newer
1
...
80
81
82
83
84
85
86
...
94
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Results per page:
10
25
50
100
200