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
January 2008
----- 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
699 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Catch DIB memory accesses that touch the last page beyond the DIB bits end .
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: a7cdf6e110e8d5caaafd59e4f8eba117fbc3cd12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7cdf6e110e8d5caaafd59e4f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 24 10:21:17 2008 +0100 winex11: Catch DIB memory accesses that touch the last page beyond the DIB bits end. --- dlls/winex11.drv/dib.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index fc71c24..a95783e 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include <X11/Xlib.h> #ifdef HAVE_LIBXXSHM @@ -4302,6 +4303,7 @@ static LONG CALLBACK X11DRV_DIB_FaultHandler( PEXCEPTION_POINTERS ep ) BOOL found = FALSE; BYTE *addr; struct list *ptr; + const size_t pagemask = getpagesize() - 1; if (ep->ExceptionRecord->ExceptionCode != EXCEPTION_ACCESS_VIOLATION) return EXCEPTION_CONTINUE_SEARCH; @@ -4312,7 +4314,8 @@ static LONG CALLBACK X11DRV_DIB_FaultHandler( PEXCEPTION_POINTERS ep ) LIST_FOR_EACH( ptr, &dibs_list ) { physBitmap = LIST_ENTRY( ptr, X_PHYSBITMAP, entry ); - if ((physBitmap->base <= addr) && (addr < physBitmap->base + physBitmap->size)) + if ((physBitmap->base <= addr) && + (addr < physBitmap->base + ((physBitmap->size + pagemask) & ~pagemask))) { found = TRUE; break; @@ -4322,6 +4325,9 @@ static LONG CALLBACK X11DRV_DIB_FaultHandler( PEXCEPTION_POINTERS ep ) if (!found) return EXCEPTION_CONTINUE_SEARCH; + if (addr >= physBitmap->base + physBitmap->size) + WARN( "%p: access to %p beyond the end of the DIB\n", physBitmap->hbitmap, addr ); + X11DRV_DIB_Lock( physBitmap, DIB_Status_None ); if (ep->ExceptionRecord->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT) { /* the app tried to write the DIB bits */
1
0
0
0
Alexandre Julliard : winex11: Check for need to make window managed when WS_VISIBLE is set outside of SetWindowPos .
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: 8913182b89d542633678d1c3abcfe00e28be8e6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8913182b89d542633678d1c3a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 24 10:21:07 2008 +0100 winex11: Check for need to make window managed when WS_VISIBLE is set outside of SetWindowPos. --- dlls/winex11.drv/desktop.c | 1 + dlls/winex11.drv/window.c | 2 ++ dlls/winex11.drv/winpos.c | 10 +++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 23a6675..96d050a 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -108,6 +108,7 @@ static LONG X11DRV_desktop_SetCurrentMode(int mode) void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) { root_window = win; + managed_mode = 0; /* no managed windows in desktop mode */ max_width = screen_width; max_height = screen_height; xinerama_init( width, height ); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index c21836d..2177e10 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -79,6 +79,8 @@ BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) { DWORD style, ex_style; + if (!managed_mode) return FALSE; + /* child windows are not managed */ style = GetWindowLongW( hwnd, GWL_STYLE ); if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE; diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index e5d16ee..13b73f3 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -148,6 +148,12 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style ) X11DRV_set_wm_hints( display, data ); if (!data->mapped) { + if (!data->managed && is_window_managed( hwnd, SWP_NOACTIVATE, &data->window_rect )) + { + TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); + data->managed = TRUE; + SetPropA( hwnd, managed_prop, (HANDLE)1 ); + } TRACE( "mapping win %p\n", hwnd ); X11DRV_sync_window_style( display, data ); wine_tsx11_lock(); @@ -368,9 +374,7 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, } /* check if we need to switch the window to managed */ - if (!data->managed && data->whole_window && managed_mode && - root_window == DefaultRootWindow( display ) && - is_window_managed( hwnd, swp_flags, rectWindow )) + if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, rectWindow )) { TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); data->managed = TRUE;
1
0
0
0
Alexandre Julliard : winex11: Create the window data structure lazily, once the window is made visible.
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: 026974f5be4c71a275117388b94cd7e94a95a4fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=026974f5be4c71a275117388b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 24 10:20:51 2008 +0100 winex11: Create the window data structure lazily, once the window is made visible. --- dlls/winex11.drv/window.c | 66 ++++++++++++++++++++++++++++++-------------- dlls/winex11.drv/winpos.c | 17 ++++++++--- dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 58 insertions(+), 26 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 73f9659..c21836d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -312,7 +312,8 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id ) HWND next_hwnd; int w, h; - if (!(data = X11DRV_get_win_data(hwnd))) return FALSE; + if (!(data = X11DRV_get_win_data(hwnd)) && + !(data = X11DRV_create_win_data(hwnd))) return FALSE; wine_tsx11_lock(); @@ -651,7 +652,8 @@ void X11DRV_make_systray_window( HWND hwnd ) struct x11drv_win_data *data; Window systray_window; - if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!(data = X11DRV_get_win_data( hwnd )) && + !(data = X11DRV_create_win_data( hwnd ))) return; wine_tsx11_lock(); if (!systray_atom) @@ -1315,26 +1317,10 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) BOOL ret = FALSE; INT cx = cs->cx, cy = cs->cy; - if (hwnd == GetDesktopWindow()) + if (hwnd == GetDesktopWindow() && root_window != DefaultRootWindow( display )) { - if (root_window != DefaultRootWindow( display )) - { - if (!create_desktop_win_data( display, hwnd )) return FALSE; - } - } - else - { - struct x11drv_win_data *data; - - if (!(data = alloc_win_data( display, hwnd ))) return FALSE; - - /* create an X window if it's a top level window */ - if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) - { - if (!create_whole_window( display, data )) goto failed; - } - /* get class or window DC if needed */ - alloc_window_dce( data ); + /* the desktop win data can't be created lazily */ + if (!create_desktop_win_data( display, hwnd )) return FALSE; } /* Call the WH_CBT hook */ @@ -1467,6 +1453,44 @@ struct x11drv_win_data *X11DRV_get_win_data( HWND hwnd ) /*********************************************************************** + * X11DRV_create_win_data + * + * Create an X11 data window structure for an existing window. + */ +struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd ) +{ + Display *display = thread_display(); + struct x11drv_win_data *data; + HWND parent; + + if (!(parent = GetAncestor( hwnd, GA_PARENT ))) return NULL; /* desktop */ + if (!(data = alloc_win_data( display, hwnd ))) return NULL; + + GetWindowRect( hwnd, &data->window_rect ); + MapWindowPoints( 0, parent, (POINT *)&data->window_rect, 2 ); + data->whole_rect = data->window_rect; + GetClientRect( hwnd, &data->client_rect ); + MapWindowPoints( hwnd, parent, (POINT *)&data->client_rect, 2 ); + + if (parent == GetDesktopWindow()) + { + if (!create_whole_window( display, data )) + { + HeapFree( GetProcessHeap(), 0, data ); + return NULL; + } + TRACE( "win %p/%lx window %s whole %s client %s\n", + hwnd, data->whole_window, wine_dbgstr_rect( &data->window_rect ), + wine_dbgstr_rect( &data->whole_rect ), wine_dbgstr_rect( &data->client_rect )); + } + + /* get class or window DC if needed */ + alloc_window_dce( data ); + return data; +} + + +/*********************************************************************** * X11DRV_get_whole_window * * Return the X window associated with the full area of a window diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 1489ebe..e5d16ee 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -134,13 +134,14 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style ) DWORD new_style, changed; if (hwnd == GetDesktopWindow()) return; - if (!(data = X11DRV_get_win_data( hwnd ))) return; - new_style = GetWindowLongW( hwnd, GWL_STYLE ); changed = new_style ^ old_style; if (changed & WS_VISIBLE) { + if (!(data = X11DRV_get_win_data( hwnd )) && + !(data = X11DRV_create_win_data( hwnd ))) return; + if (data->whole_window && (new_style & WS_VISIBLE) && X11DRV_is_window_rect_mapped( &data->window_rect )) { @@ -161,7 +162,8 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style ) if (changed & WS_DISABLED) { - if (data->whole_window && data->wm_hints) + data = X11DRV_get_win_data( hwnd ); + if (data && data->wm_hints) { wine_tsx11_lock(); data->wm_hints->input = !(new_style & WS_DISABLED); @@ -357,7 +359,13 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, valid_rects, &visible_rect )) return FALSE; - if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; + new_style = GetWindowLongW( hwnd, GWL_STYLE ); + if (!(data = X11DRV_get_win_data( hwnd ))) + { + /* create the win data if the window is being made visible */ + if (!(new_style & WS_VISIBLE)) return TRUE; + if (!(data = X11DRV_create_win_data( hwnd ))) return FALSE; + } /* check if we need to switch the window to managed */ if (!data->managed && data->whole_window && managed_mode && @@ -376,7 +384,6 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, } } - new_style = GetWindowLongW( hwnd, GWL_STYLE ); old_window_rect = data->window_rect; old_whole_rect = data->whole_rect; old_client_rect = data->client_rect; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 5bcd76a..71ea670 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -682,6 +682,7 @@ struct x11drv_win_data }; extern struct x11drv_win_data *X11DRV_get_win_data( HWND hwnd ); +extern struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd ); extern Window X11DRV_get_whole_window( HWND hwnd ); extern XID X11DRV_get_fbconfig_id( HWND hwnd ); extern Drawable X11DRV_get_gl_drawable( HWND hwnd );
1
0
0
0
Alexandre Julliard : winex11: Don' t create a win_data structure for the root window in non-desktop mode.
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: b6cc7f9bccb77eae43a598c67ba7fd67e251081d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6cc7f9bccb77eae43a598c67…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 24 10:20:11 2008 +0100 winex11: Don't create a win_data structure for the root window in non-desktop mode. --- dlls/winex11.drv/window.c | 71 ++++++++++++++++++++------------------------ dlls/winex11.drv/winpos.c | 11 +------ 2 files changed, 34 insertions(+), 48 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index da6efab..73f9659 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -875,7 +875,6 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) if (data->hwnd == GetDesktopWindow()) { - if (data->whole_window == DefaultRootWindow(display)) return; /* force some styles for the desktop to get the correct decorations */ style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; owner = 0; @@ -947,7 +946,7 @@ void X11DRV_set_iconic_state( HWND hwnd ) BOOL iconic = (style & WS_MINIMIZE) != 0; if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (!data->whole_window || data->whole_window == DefaultRootWindow(display)) return; + if (!data->whole_window) return; GetWindowRect( hwnd, &rect ); @@ -1155,8 +1154,7 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data if (thread_data->cursor_window == data->whole_window) thread_data->cursor_window = None; wine_tsx11_lock(); XDeleteContext( display, data->whole_window, winContext ); - if (data->whole_window != DefaultRootWindow(display)) - XDestroyWindow( display, data->whole_window ); + XDestroyWindow( display, data->whole_window ); data->whole_window = 0; if (data->xic) { @@ -1242,22 +1240,22 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd ) /* initialize the desktop window id in the desktop manager process */ -static void get_desktop_xwin( Display *display, struct x11drv_win_data *data ) +static struct x11drv_win_data *create_desktop_win_data( Display *display, HWND hwnd ) { - data->whole_window = root_window; - if (root_window != DefaultRootWindow( display )) - { - VisualID visualid; + struct x11drv_win_data *data; + VisualID visualid; - wine_tsx11_lock(); - visualid = XVisualIDFromVisual(visual); - wine_tsx11_unlock(); - data->managed = TRUE; - SetPropA( data->hwnd, managed_prop, (HANDLE)1 ); - SetPropA( data->hwnd, whole_window_prop, (HANDLE)root_window ); - SetPropA( data->hwnd, visual_id_prop, (HANDLE)visualid ); - set_initial_wm_hints( display, data ); - } + if (!(data = alloc_win_data( display, hwnd ))) return NULL; + wine_tsx11_lock(); + visualid = XVisualIDFromVisual(visual); + wine_tsx11_unlock(); + data->whole_window = root_window; + data->managed = TRUE; + SetPropA( data->hwnd, managed_prop, (HANDLE)1 ); + SetPropA( data->hwnd, whole_window_prop, (HANDLE)root_window ); + SetPropA( data->hwnd, visual_id_prop, (HANDLE)visualid ); + set_initial_wm_hints( display, data ); + return data; } /********************************************************************** @@ -1309,7 +1307,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) { Display *display = thread_display(); WND *wndPtr; - struct x11drv_win_data *data; HWND insert_after; RECT rect; DWORD style; @@ -1318,21 +1315,28 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) BOOL ret = FALSE; INT cx = cs->cx, cy = cs->cy; - if (!(data = alloc_win_data( display, hwnd ))) return FALSE; - - if (hwnd == GetDesktopWindow()) get_desktop_xwin( display, data ); + if (hwnd == GetDesktopWindow()) + { + if (root_window != DefaultRootWindow( display )) + { + if (!create_desktop_win_data( display, hwnd )) return FALSE; + } + } else { + struct x11drv_win_data *data; + + if (!(data = alloc_win_data( display, hwnd ))) return FALSE; + /* create an X window if it's a top level window */ if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) { if (!create_whole_window( display, data )) goto failed; } + /* get class or window DC if needed */ + alloc_window_dce( data ); } - /* get class or window DC if needed */ - alloc_window_dce( data ); - /* Call the WH_CBT hook */ /* the window style passed to the hook must be the real window style, @@ -1379,11 +1383,11 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) } /* make sure the window is still valid */ - if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; - if (data->whole_window) X11DRV_sync_window_style( display, data ); + if (!(wndPtr = WIN_GetPtr(hwnd))) return FALSE; /* send WM_NCCALCSIZE */ - rect = data->window_rect; + rect = wndPtr->rectWindow; + WIN_ReleasePtr( wndPtr ); SendMessageW( hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rect ); if (!(wndPtr = WIN_GetPtr(hwnd))) return FALSE; @@ -1393,17 +1397,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) X11DRV_SetWindowPos( hwnd, insert_after, &wndPtr->rectWindow, &rect, SWP_NOACTIVATE, NULL ); - TRACE( "win %p window %d,%d,%d,%d client %d,%d,%d,%d whole %d,%d,%d,%d X client %d,%d,%d,%d xwin %x\n", - hwnd, wndPtr->rectWindow.left, wndPtr->rectWindow.top, - wndPtr->rectWindow.right, wndPtr->rectWindow.bottom, - wndPtr->rectClient.left, wndPtr->rectClient.top, - wndPtr->rectClient.right, wndPtr->rectClient.bottom, - data->whole_rect.left, data->whole_rect.top, - data->whole_rect.right, data->whole_rect.bottom, - data->client_rect.left, data->client_rect.top, - data->client_rect.right, data->client_rect.bottom, - (unsigned int)data->whole_window ); - WIN_ReleasePtr( wndPtr ); if (unicode) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 08baa65..1489ebe 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -353,17 +353,11 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, RECT old_window_rect, old_whole_rect, old_client_rect, visible_rect; DWORD new_style; - if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; - if (!set_server_window_pos( hwnd, insert_after, rectWindow, rectClient, swp_flags, valid_rects, &visible_rect )) return FALSE; - if (data->whole_window == DefaultRootWindow(gdi_display)) - { - data->whole_rect = data->client_rect = data->window_rect = *rectWindow; - return TRUE; - } + if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; /* check if we need to switch the window to managed */ if (!data->managed && data->whole_window && managed_mode && @@ -933,7 +927,6 @@ static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam void X11DRV_resize_desktop( unsigned int width, unsigned int height ) { HWND hwnd = GetDesktopWindow(); - struct x11drv_win_data *data; struct desktop_resize_data resize_data; SetRect( &resize_data.old_screen_rect, 0, 0, screen_width, screen_height ); @@ -941,7 +934,7 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height ) xinerama_init( width, height ); - if (!(data = X11DRV_get_win_data( hwnd ))) + if (GetWindowThreadProcessId( hwnd, NULL ) != GetCurrentThreadId()) { SendMessageW( hwnd, WM_X11DRV_RESIZE_DESKTOP, 0, MAKELPARAM( width, height ) ); }
1
0
0
0
Alexandre Julliard : user32: Menus should be top-most windows.
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: 4a753f90cf61be5ed6d93d336b1ace01e9ca75b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a753f90cf61be5ed6d93d336…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 23 21:42:46 2008 +0100 user32: Menus should be top-most windows. --- dlls/user32/menu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index cb60ffc..99c4933 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -1834,7 +1834,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id, /* Display the window */ - SetWindowPos( menu->hWnd, HWND_TOP, 0, 0, 0, 0, + SetWindowPos( menu->hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE ); UpdateWindow( menu->hWnd ); return TRUE;
1
0
0
0
Alexandre Julliard : comctl32: Tooltips should be top-most windows.
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: e85f7ed79ea6e74674d92136a0cbb084aafd133f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e85f7ed79ea6e74674d92136a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 23 21:42:33 2008 +0100 comctl32: Tooltips should be top-most windows. --- dlls/comctl32/tooltips.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index f976ce9..7661ffa 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -752,7 +752,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr, BOOL track_activate) * it is no longer needed */ } - SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, + SetWindowPos (hwnd, HWND_TOPMOST, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_SHOWWINDOW | SWP_NOACTIVATE);
1
0
0
0
Alexandre Julliard : winex11: Export a function to dock a window into the system tray, and get rid of the WS_EX_TRAYWINDOW style.
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: cbdf1294e6474ae5254a2fe9cb900b08a89b8b1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbdf1294e6474ae5254a2fe9c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 23 21:40:45 2008 +0100 winex11: Export a function to dock a window into the system tray, and get rid of the WS_EX_TRAYWINDOW style. --- dlls/winex11.drv/window.c | 18 +++++++----------- dlls/winex11.drv/winex11.drv.spec | 3 +++ include/winuser.h | 3 --- programs/explorer/systray.c | 8 +++++++- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1715b0c..da6efab 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -79,9 +79,6 @@ BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) { DWORD style, ex_style; - /* tray window is always managed */ - ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); - if (ex_style & WS_EX_TRAYWINDOW) return TRUE; /* child windows are not managed */ style = GetWindowLongW( hwnd, GWL_STYLE ); if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE; @@ -91,6 +88,7 @@ BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) /* windows with caption are managed */ if ((style & WS_CAPTION) == WS_CAPTION) return TRUE; /* tool windows are not managed */ + ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); if (ex_style & WS_EX_TOOLWINDOW) return FALSE; /* windows with thick frame are managed */ if (style & WS_THICKFRAME) return TRUE; @@ -642,15 +640,19 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data, HICO } /*********************************************************************** - * systray_dock_window + * wine_make_systray_window (X11DRV.@) * * Docks the given X window with the NETWM system tray. */ -static void systray_dock_window( Display *display, struct x11drv_win_data *data ) +void X11DRV_make_systray_window( HWND hwnd ) { static Atom systray_atom; + Display *display = thread_display(); + struct x11drv_win_data *data; Window systray_window; + if (!(data = X11DRV_get_win_data( hwnd ))) return; + wine_tsx11_lock(); if (!systray_atom) { @@ -1449,12 +1451,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) newPos.right, newPos.bottom, swFlag ); } - /* Dock system tray windows. */ - /* Dock after the window is created so we don't have problems calling - * SetWindowPos. */ - if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_TRAYWINDOW) - systray_dock_window( display, data ); - return TRUE; failed: diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 87db841..7fbdfff 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -128,6 +128,9 @@ # Desktop @ cdecl wine_create_desktop(long long) X11DRV_create_desktop +# System tray +@ cdecl wine_make_systray_window(long) X11DRV_make_systray_window + # XIM @ cdecl ForceXIMReset(long) X11DRV_ForceXIMReset diff --git a/include/winuser.h b/include/winuser.h index 3a6a42c..aec4a83 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -3217,9 +3217,6 @@ typedef struct tagMINIMIZEDMETRICS { #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE|WS_EX_CLIENTEDGE) #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST) -/* WINE internal... */ -#define WS_EX_TRAYWINDOW 0x80000000L - #endif /* NOWINSTYLES */ /* Window scrolling */ diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index a5535ff..06347d4 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -220,6 +220,7 @@ static void modify_icon(NOTIFYICONDATAW *nid, BOOL modify_tooltip) static void add_icon(NOTIFYICONDATAW *nid) { + HMODULE x11drv = GetModuleHandleA( "winex11.drv" ); RECT rect; struct icon *icon; static const WCHAR adaptor_windowname[] = /* Wine System Tray Adaptor */ {'W','i','n','e',' ','S','y','s','t','e','m',' ','T','r','a','y',' ','A','d','a','p','t','o','r',0}; @@ -250,13 +251,18 @@ static void add_icon(NOTIFYICONDATAW *nid) AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CAPTION, FALSE); /* create the adaptor window */ - icon->window = CreateWindowEx(WS_EX_TRAYWINDOW, adaptor_classname, + icon->window = CreateWindowEx(0, adaptor_classname, adaptor_windowname, WS_CLIPSIBLINGS | WS_CAPTION, CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, icon); + if (x11drv) + { + void (*make_systray_window)(HWND) = (void *)GetProcAddress( x11drv, "wine_make_systray_window" ); + if (make_systray_window) make_systray_window( icon->window ); + } if (!hide_systray) ShowWindow(icon->window, SW_SHOWNA);
1
0
0
0
Alexandre Julliard : winex11: Remove obsolete code to set Z-order for child windows.
by Alexandre Julliard
24 Jan '08
24 Jan '08
Module: wine Branch: master Commit: d147e02087d03e0c87e7cc995ab9af932b44874d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d147e02087d03e0c87e7cc995…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 23 21:39:32 2008 +0100 winex11: Remove obsolete code to set Z-order for child windows. --- dlls/winex11.drv/window.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index c52d13a..1715b0c 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1086,7 +1086,7 @@ void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data * * Create the whole X window for a given window */ -static Window create_whole_window( Display *display, struct x11drv_win_data *data, DWORD style ) +static Window create_whole_window( Display *display, struct x11drv_win_data *data ) { int cx, cy, mask; XSetWindowAttributes attr; @@ -1114,14 +1114,6 @@ static Window create_whole_window( Display *display, struct x11drv_win_data *dat return 0; } XSaveContext( display, data->whole_window, winContext, (char *)data->hwnd ); - - /* non-maximized child must be at bottom of Z order */ - if ((style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD) - { - XWindowChanges changes; - changes.stack_mode = Below; - XConfigureWindow( display, data->whole_window, CWStackMode, &changes ); - } wine_tsx11_unlock(); xim = x11drv_thread_data()->xim; @@ -1332,7 +1324,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode ) /* create an X window if it's a top level window */ if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) { - if (!create_whole_window( display, data, cs->style )) goto failed; + if (!create_whole_window( display, data )) goto failed; } } @@ -1586,7 +1578,7 @@ void X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent ) else /* new top level window */ { /* FIXME: we ignore errors since we can't really recover anyway */ - create_whole_window( display, data, GetWindowLongW( hwnd, GWL_STYLE ) ); + create_whole_window( display, data ); } }
1
0
0
0
Francois Gouget : Assorted spelling fixes.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: d0794c4aeb0be5f14ccd5394e004389a8ca485bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0794c4aeb0be5f14ccd5394e…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jan 23 15:16:30 2008 +0100 Assorted spelling fixes. --- dlls/cabinet/fci.c | 2 +- dlls/crypt32/tests/encode.c | 2 +- dlls/ddraw/tests/d3d.c | 2 +- dlls/ddraw/viewport.c | 2 +- dlls/gdi32/printdrv.c | 2 +- dlls/kernel32/tests/drive.c | 2 +- dlls/kernel32/tests/resource.c | 12 ++++++------ dlls/msxml3/domimpl.c | 2 +- dlls/twain_32/README | 2 +- dlls/winealsa.drv/midi.c | 2 +- dlls/winecoreaudio.drv/midi.c | 2 +- dlls/wined3d/basetexture.c | 6 +++--- dlls/wined3d/context.c | 2 +- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/directx.c | 2 +- dlls/wined3d/resource.c | 2 +- dlls/wined3d/state.c | 10 +++++----- dlls/wined3d/vertexbuffer.c | 2 +- dlls/wineoss.drv/midi.c | 2 +- tools/widl/typelib_struct.h | 2 +- tools/wrc/parser.y | 2 +- 21 files changed, 33 insertions(+), 33 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d0794c4aeb0be5f14ccd5…
1
0
0
0
Rob Shearman : credui: Return the state of the dialog' s save checkbox to CredUIPromptForCredentials.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: 8bee6946cc7c969efb9b41ee12334231eb9dfe2d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8bee6946cc7c969efb9b41ee1…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Jan 23 16:33:13 2008 +0000 credui: Return the state of the dialog's save checkbox to CredUIPromptForCredentials. --- dlls/credui/credui_main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c index 342e701..42316d6 100644 --- a/dlls/credui/credui_main.c +++ b/dlls/credui/credui_main.c @@ -462,6 +462,8 @@ static void CredDialogCommandOk(HWND hwndDlg, struct cred_dialog_params *params) GetDlgItemTextW(hwndDlg, IDC_PASSWORD, params->pszPassword, params->ulPasswordMaxChars); + params->fSave = IsDlgButtonChecked(hwndDlg, IDC_SAVE) == BST_CHECKED; + EndDialog(hwndDlg, IDOK); }
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
70
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
Results per page:
10
25
50
100
200