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
Rob Shearman : advapi32: Add more tests for SetEntriesInAcl.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: 261bf8dad5c23e5ba0883510e237d42601b613df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=261bf8dad5c23e5ba0883510e…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Jan 22 15:36:04 2008 +0000 advapi32: Add more tests for SetEntriesInAcl. --- dlls/advapi32/tests/security.c | 90 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 87 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 217d89c..2e9024f 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1973,8 +1973,13 @@ static void test_impersonation_level(void) static void test_SetEntriesInAcl(void) { - ACL *acl = (ACL*)0xdeadbeef; DWORD res; + PSID EveryoneSid = NULL, UsersSid = NULL; + PACL OldAcl = NULL, NewAcl; + SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY }; + SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; + EXPLICIT_ACCESSW ExplicitAccess; + static const WCHAR wszEveryone[] = {'E','v','e','r','y','o','n','e',0}; if (!pSetEntriesInAclW) { @@ -1982,14 +1987,93 @@ static void test_SetEntriesInAcl(void) return; } - res = pSetEntriesInAclW(0, NULL, NULL, &acl); + NewAcl = (PACL)0xdeadbeef; + res = pSetEntriesInAclW(0, NULL, NULL, &NewAcl); if(res == ERROR_CALL_NOT_IMPLEMENTED) { skip("SetEntriesInAclW is not implemented\n"); return; } ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(acl == NULL, "acl=%p, expected NULL\n", acl); + ok(NewAcl == NULL, "NewAcl=%p, expected NULL\n", NewAcl); + + OldAcl = HeapAlloc(GetProcessHeap(), 0, 256); + res = InitializeAcl(OldAcl, 256, ACL_REVISION); + if(!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + skip("ACLs not implemented - skipping tests\n"); + HeapFree(GetProcessHeap(), 0, OldAcl); + return; + } + ok(res, "InitializeAcl failed with error %d\n", GetLastError()); + + res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); + ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + + res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); + ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); + + res = AddAccessAllowedAce(OldAcl, ACL_REVISION, KEY_READ, UsersSid); + ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); + + ExplicitAccess.grfAccessPermissions = KEY_WRITE; + ExplicitAccess.grfAccessMode = GRANT_ACCESS; + ExplicitAccess.grfInheritance = NO_INHERITANCE; + ExplicitAccess.Trustee.pMultipleTrustee = NULL; + ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; + ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; + ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; + ExplicitAccess.Trustee.ptstrName = (LPWSTR)EveryoneSid; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + todo_wine + ok(NewAcl != NULL, "returned acl was NULL\n"); + LocalFree(NewAcl); + + ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_USER; + ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszEveryone; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + todo_wine + ok(NewAcl != NULL, "returned acl was NULL\n"); + LocalFree(NewAcl); + + ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_BAD_FORM; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + todo_wine + ok(res == ERROR_INVALID_PARAMETER, "SetEntriesInAclW failed: %u\n", res); + ok(NewAcl == NULL, "returned acl wasn't NULL: %p\n", NewAcl); + LocalFree(NewAcl); + + ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_USER; + ExplicitAccess.Trustee.MultipleTrusteeOperation = TRUSTEE_IS_IMPERSONATE; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + todo_wine + ok(res == ERROR_INVALID_PARAMETER, "SetEntriesInAclW failed: %u\n", res); + ok(NewAcl == NULL, "returned acl wasn't NULL: %p\n", NewAcl); + LocalFree(NewAcl); + + ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; + ExplicitAccess.grfAccessMode = SET_ACCESS; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + todo_wine + ok(NewAcl != NULL, "returned acl was NULL\n"); + LocalFree(NewAcl); + + ExplicitAccess.grfAccessMode = REVOKE_ACCESS; + ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; + ExplicitAccess.Trustee.ptstrName = (LPWSTR)UsersSid; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + todo_wine + ok(NewAcl != NULL, "returned acl was NULL\n"); + LocalFree(NewAcl); + + LocalFree(UsersSid); + LocalFree(EveryoneSid); + HeapFree(GetProcessHeap(), 0, OldAcl); } static void test_GetNamedSecurityInfoA(void)
1
0
0
0
Alexandre Julliard : winex11: Leave it up to explorer to specify the correct size and position for the desktop .
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: a76abc032270afbc458e4698f3558fb09bbaa6b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a76abc032270afbc458e4698f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 23 11:31:07 2008 +0100 winex11: Leave it up to explorer to specify the correct size and position for the desktop. --- dlls/winex11.drv/window.c | 4 ---- programs/explorer/desktop.c | 11 ++++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 3948b1a..3334e61 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1234,10 +1234,6 @@ static void get_desktop_xwin( Display *display, struct x11drv_win_data *data ) SetPropA( data->hwnd, visual_id_prop, (HANDLE)visualid ); set_initial_wm_hints( display, data ); } - SetWindowPos( data->hwnd, 0, virtual_screen_rect.left, virtual_screen_rect.top, - virtual_screen_rect.right - virtual_screen_rect.left, - virtual_screen_rect.bottom - virtual_screen_rect.top, - SWP_NOZORDER | SWP_NOACTIVATE ); } /********************************************************************** diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 8d03094..224f0de 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -181,17 +181,14 @@ void manage_desktop( char *arg ) xwin = create_desktop( "Default", width, height ); } - if (!xwin) /* using the root window */ - { - using_root = TRUE; - width = GetSystemMetrics(SM_CXSCREEN); - height = GetSystemMetrics(SM_CYSCREEN); - } + if (!xwin) using_root = TRUE; /* using the root window */ /* create the desktop window */ hwnd = CreateWindowExW( 0, DESKTOP_CLASS_ATOM, NULL, WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, - 0, 0, width, height, 0, 0, 0, NULL ); + GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN), + GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN), + 0, 0, 0, NULL ); if (hwnd == GetDesktopWindow()) { SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)desktop_wnd_proc );
1
0
0
0
Alexandre Julliard : winex11: Move resetting of the cursor clip rectangle into xinerama_init().
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: dbfe24c33cfd2ab7e2fceb810926ad193aa0b7ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dbfe24c33cfd2ab7e2fceb810…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 23 10:30:42 2008 +0100 winex11: Move resetting of the cursor clip rectangle into xinerama_init(). --- dlls/winex11.drv/winpos.c | 1 - dlls/winex11.drv/x11drv_main.c | 1 - dlls/winex11.drv/xinerama.c | 1 + 3 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 94dca2b..e19c919 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -964,7 +964,6 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height ) resize_data.old_virtual_rect = virtual_screen_rect; xinerama_init( width, height ); - ClipCursor(NULL); if (!(data = X11DRV_get_win_data( hwnd ))) { diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index a84c65b..f2bf12c 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -543,7 +543,6 @@ static BOOL process_attach(void) X11DRV_XComposite_Init(); #endif - X11DRV_ClipCursor( NULL ); X11DRV_InitKeyboard(); X11DRV_InitClipboard(); diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index 8602151..782c779 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -169,6 +169,7 @@ void xinerama_init( unsigned int width, unsigned int height ) wine_dbgstr_rect(&virtual_screen_rect), screen_width, screen_height ); wine_tsx11_unlock(); + ClipCursor( NULL ); /* reset the cursor clip rectangle */ }
1
0
0
0
Alexandre Julliard : winex11: Move the window bits according to the valid rects instead of invalidating.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: 235dd63fdc96ca22234d584fead6464290fd56fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=235dd63fdc96ca22234d584fe…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 22 20:34:11 2008 +0100 winex11: Move the window bits according to the valid rects instead of invalidating. --- dlls/winex11.drv/winpos.c | 69 +++++++++++++++++++++++++++++++++------------ 1 files changed, 51 insertions(+), 18 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 86ad445..94dca2b 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -237,20 +237,59 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO * move_window_bits * * Move the window bits when a window is moved. - * FIXME: currently we don't move anything, we just invalidate the new position. */ static void move_window_bits( struct x11drv_win_data *data, const RECT *old_rect, const RECT *new_rect, const RECT *window_rect, const RECT *whole_rect, const RECT *client_rect ) { - RECT invalid_rect = *new_rect; - UINT flags = RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN; - - /* make it relative to the client area */ - OffsetRect( &invalid_rect, -client_rect->left, -client_rect->top ); - if (invalid_rect.left < 0 || invalid_rect.top < 0 || - invalid_rect.right > client_rect->right - client_rect->left || - invalid_rect.bottom > client_rect->bottom - client_rect->top) flags |= RDW_FRAME; - RedrawWindow( data->hwnd, &invalid_rect, NULL, flags ); + RECT src_rect = *old_rect; + RECT dst_rect = *new_rect; + HDC hdc_src, hdc_dst; + INT code; + HRGN rgn = 0; + HWND parent = 0; + + if (!data->whole_window) + { + OffsetRect( &dst_rect, -window_rect->left, -window_rect->top ); + parent = GetAncestor( data->hwnd, GA_PARENT ); + hdc_src = GetDCEx( parent, 0, DCX_CACHE ); + hdc_dst = GetDCEx( data->hwnd, 0, DCX_CACHE | DCX_WINDOW ); + } + else + { + OffsetRect( &dst_rect, -whole_rect->left, -whole_rect->top ); + /* make src rect relative to the old position of the window */ + OffsetRect( &src_rect, -data->whole_rect.left, -data->whole_rect.top ); + if (dst_rect.left == src_rect.left && dst_rect.top == src_rect.top) return; + /* now make them relative to window rect for DCX_WINDOW */ + OffsetRect( &dst_rect, whole_rect->left - window_rect->left, + whole_rect->top - window_rect->top ); + OffsetRect( &src_rect, whole_rect->left - window_rect->left, + whole_rect->top - window_rect->top ); + hdc_src = hdc_dst = GetDCEx( data->hwnd, 0, DCX_CACHE | DCX_WINDOW ); + } + + code = X11DRV_START_EXPOSURES; + ExtEscape( hdc_dst, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL ); + + TRACE( "copying bits for win %p/%lx %s -> %s\n", + data->hwnd, data->whole_window, wine_dbgstr_rect(&src_rect), wine_dbgstr_rect(&dst_rect) ); + BitBlt( hdc_dst, dst_rect.left, dst_rect.top, + dst_rect.right - dst_rect.left, dst_rect.bottom - dst_rect.top, + hdc_src, src_rect.left, src_rect.top, SRCCOPY ); + + code = X11DRV_END_EXPOSURES; + ExtEscape( hdc_dst, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, sizeof(rgn), (LPSTR)&rgn ); + + ReleaseDC( data->hwnd, hdc_dst ); + if (hdc_src != hdc_dst) ReleaseDC( parent, hdc_src ); + + if (rgn) + { + OffsetRgn( rgn, window_rect->left - client_rect->left, window_rect->top - client_rect->top ); + RedrawWindow( data->hwnd, NULL, rgn, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ALLCHILDREN ); + DeleteObject( rgn ); + } } /*********************************************************************** @@ -403,14 +442,8 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, rectWindow, &new_whole_rect, rectClient ); } else - { - /* check if the offset corresponds to what the X server will move */ - if (!data->whole_window || - x_offset != valid_rects[1].left - valid_rects[0].left || - y_offset != valid_rects[1].top - valid_rects[0].top) - move_window_bits( data, &valid_rects[1], &valid_rects[0], - rectWindow, &new_whole_rect, rectClient ); - } + move_window_bits( data, &valid_rects[1], &valid_rects[0], + rectWindow, &new_whole_rect, rectClient ); }
1
0
0
0
Alexandre Julliard : winex11: Properly invalidate moved child windows instead of forcing SWP_NOCOPYBITS.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: b90baa11276d06531390c14912622a850cf52286 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b90baa11276d06531390c1491…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 22 20:30:04 2008 +0100 winex11: Properly invalidate moved child windows instead of forcing SWP_NOCOPYBITS. Add a move_window_bits() function where the missing functionality of moving the window contents should go. --- dlls/winex11.drv/winpos.c | 60 ++++++++++++++++++++++++++++++++------------ 1 files changed, 43 insertions(+), 17 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index ff9997b..86ad445 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -234,6 +234,26 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO /*********************************************************************** + * move_window_bits + * + * Move the window bits when a window is moved. + * FIXME: currently we don't move anything, we just invalidate the new position. + */ +static void move_window_bits( struct x11drv_win_data *data, const RECT *old_rect, const RECT *new_rect, + const RECT *window_rect, const RECT *whole_rect, const RECT *client_rect ) +{ + RECT invalid_rect = *new_rect; + UINT flags = RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN; + + /* make it relative to the client area */ + OffsetRect( &invalid_rect, -client_rect->left, -client_rect->top ); + if (invalid_rect.left < 0 || invalid_rect.top < 0 || + invalid_rect.right > client_rect->right - client_rect->left || + invalid_rect.bottom > client_rect->bottom - client_rect->top) flags |= RDW_FRAME; + RedrawWindow( data->hwnd, &invalid_rect, NULL, flags ); +} + +/*********************************************************************** * set_server_window_pos * * Set the window pos on the server side only. Helper for SetWindowPos. @@ -312,8 +332,6 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, old_style = GetWindowLongW( hwnd, GWL_STYLE ); - if (!data->whole_window) swp_flags |= SWP_NOCOPYBITS; /* we can't rely on X11 to move the bits */ - if ((ret = set_server_window_pos( hwnd, insert_after, rectWindow, rectClient, swp_flags, valid_rects, &visible_rect ))) { @@ -366,24 +384,32 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, if (!IsRectEmpty( &valid_rects[0] )) { - int x_offset = 0, y_offset = 0; - - if (data->whole_window) + int x_offset = data->whole_rect.left - new_whole_rect.left; + int y_offset = data->whole_rect.top - new_whole_rect.top; + + /* if all that happened is that the whole window moved, copy everything */ + if (!(swp_flags & SWP_FRAMECHANGED) && + data->whole_rect.right - new_whole_rect.right == x_offset && + data->whole_rect.bottom - new_whole_rect.bottom == y_offset && + data->client_rect.left - rectClient->left == x_offset && + data->client_rect.right - rectClient->right == x_offset && + data->client_rect.top - rectClient->top == y_offset && + data->client_rect.bottom - rectClient->bottom == y_offset && + !memcmp( &valid_rects[0], rectClient, sizeof(RECT) )) { - /* the X server will move the bits for us */ - x_offset = data->whole_rect.left - new_whole_rect.left; - y_offset = data->whole_rect.top - new_whole_rect.top; + /* if we have an X window the bits will be moved by the X server */ + if (!data->whole_window) + move_window_bits( data, &data->whole_rect, &new_whole_rect, + rectWindow, &new_whole_rect, rectClient ); } - - if (x_offset != valid_rects[1].left - valid_rects[0].left || - y_offset != valid_rects[1].top - valid_rects[0].top) + else { - /* FIXME: should copy the window bits here */ - RECT invalid_rect = valid_rects[0]; - - /* invalid_rects are relative to the client area */ - OffsetRect( &invalid_rect, -rectClient->left, -rectClient->top ); - RedrawWindow( hwnd, &invalid_rect, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN ); + /* check if the offset corresponds to what the X server will move */ + if (!data->whole_window || + x_offset != valid_rects[1].left - valid_rects[0].left || + y_offset != valid_rects[1].top - valid_rects[0].top) + move_window_bits( data, &valid_rects[1], &valid_rects[0], + rectWindow, &new_whole_rect, rectClient ); } }
1
0
0
0
Alexandre Julliard : winex11: Make the client rect relative to the parent window for consistency with the server side .
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: f1a0348b4e17170a9e6406869fbbd3db8b368597 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1a0348b4e17170a9e6406869…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 22 20:08:56 2008 +0100 winex11: Make the client rect relative to the parent window for consistency with the server side. --- dlls/winex11.drv/window.c | 1 - dlls/winex11.drv/winpos.c | 18 +++++++++--------- dlls/winex11.drv/x11drv.h | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 9ed5e1f..3948b1a 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -965,7 +965,6 @@ void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data old_client_rect = data->client_rect; data->client_rect = *new_client_rect; - OffsetRect( &data->client_rect, -data->whole_rect.left, -data->whole_rect.top ); if (data->gl_drawable) update_gl_drawable(display, data, &old_client_rect); diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index e975e5e..ff9997b 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -96,8 +96,8 @@ void X11DRV_Expose( HWND hwnd, XEvent *xev ) if (!(data = X11DRV_get_win_data( hwnd ))) return; - rect.left = event->x; - rect.top = event->y; + rect.left = data->whole_rect.left + event->x; + rect.top = data->whole_rect.top + event->y; rect.right = rect.left + event->width; rect.bottom = rect.top + event->height; @@ -112,15 +112,15 @@ void X11DRV_Expose( HWND hwnd, XEvent *xev ) SERVER_START_REQ( update_window_zorder ) { req->window = hwnd; - req->rect.left = rect.left + data->whole_rect.left; - req->rect.top = rect.top + data->whole_rect.top; - req->rect.right = rect.right + data->whole_rect.left; - req->rect.bottom = rect.bottom + data->whole_rect.top; + req->rect.left = rect.left; + req->rect.top = rect.top; + req->rect.right = rect.right; + req->rect.bottom = rect.bottom; wine_server_call( req ); } SERVER_END_REQ; - /* make position relative to client area instead of window */ + /* make position relative to client area instead of parent */ OffsetRect( &rect, -data->client_rect.left, -data->client_rect.top ); RedrawWindow( hwnd, &rect, 0, flags ); } @@ -191,8 +191,8 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO if (!data->managed) return; - if (data->client_rect.left <= 0 && data->client_rect.right >= screen_width && - data->client_rect.top <= 0 && data->client_rect.bottom >= screen_height) + if (data->whole_rect.left <= 0 && data->whole_rect.right >= screen_width && + data->whole_rect.top <= 0 && data->whole_rect.bottom >= screen_height) new_state |= (1 << WM_STATE_FULLSCREEN); ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index d74dd59..3bff7ef 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -669,7 +669,7 @@ struct x11drv_win_data Pixmap pixmap; /* Base pixmap for if gl_drawable is a GLXPixmap */ RECT window_rect; /* USER window rectangle relative to parent */ RECT whole_rect; /* X window rectangle for the whole window relative to parent */ - RECT client_rect; /* client area relative to whole window */ + RECT client_rect; /* client area relative to parent */ XIC xic; /* X input context */ XWMHints *wm_hints; /* window manager hints */ BOOL managed; /* is window managed? */
1
0
0
0
Alexandre Julliard : winex11: Abstract the server part of SetWindowPos into a separate function.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: 5df4e62312f3d9990b79dae36e4ef5758cd4ff16 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5df4e62312f3d9990b79dae36…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 22 20:07:50 2008 +0100 winex11: Abstract the server part of SetWindowPos into a separate function. --- dlls/winex11.drv/winpos.c | 109 +++++++++++++++++++++++--------------------- 1 files changed, 57 insertions(+), 52 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 37c36ec..e975e5e 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -234,6 +234,55 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO /*********************************************************************** + * set_server_window_pos + * + * Set the window pos on the server side only. Helper for SetWindowPos. + */ +static BOOL set_server_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow, + const RECT *rectClient, UINT swp_flags, const RECT *valid_rects, + RECT *visible_rect ) +{ + WND *win; + BOOL ret; + + if (!(win = WIN_GetPtr( hwnd ))) return FALSE; + if (win == WND_DESKTOP || win == WND_OTHER_PROCESS) return FALSE; + + SERVER_START_REQ( set_window_pos ) + { + req->handle = hwnd; + req->previous = insert_after; + req->flags = swp_flags; + req->window.left = rectWindow->left; + req->window.top = rectWindow->top; + req->window.right = rectWindow->right; + req->window.bottom = rectWindow->bottom; + req->client.left = rectClient->left; + req->client.top = rectClient->top; + req->client.right = rectClient->right; + req->client.bottom = rectClient->bottom; + if (!IsRectEmpty( &valid_rects[0] )) + wine_server_add_data( req, valid_rects, 2 * sizeof(*valid_rects) ); + if ((ret = !wine_server_call( req ))) + { + win->dwStyle = reply->new_style; + win->dwExStyle = reply->new_ex_style; + win->rectWindow = *rectWindow; + win->rectClient = *rectClient; + visible_rect->left = reply->visible.left; + visible_rect->top = reply->visible.top; + visible_rect->right = reply->visible.right; + visible_rect->bottom = reply->visible.bottom; + } + } + SERVER_END_REQ; + + WIN_ReleasePtr( win ); + return ret; +} + + +/*********************************************************************** * SetWindowPos (X11DRV.@) */ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, @@ -241,9 +290,8 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, { Display *display = thread_display(); struct x11drv_win_data *data; - RECT new_whole_rect, old_client_rect, visible_rect; - WND *win; - DWORD old_style, new_style, new_ex_style; + RECT new_whole_rect, visible_rect; + DWORD old_style, new_style; BOOL ret, make_managed = FALSE; if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE; @@ -262,56 +310,20 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, } } - old_client_rect = data->client_rect; + old_style = GetWindowLongW( hwnd, GWL_STYLE ); if (!data->whole_window) swp_flags |= SWP_NOCOPYBITS; /* we can't rely on X11 to move the bits */ - if (!(win = WIN_GetPtr( hwnd ))) return FALSE; - if (win == WND_DESKTOP || win == WND_OTHER_PROCESS) - { - if (IsWindow( hwnd )) ERR( "cannot set rectangles of other process window %p\n", hwnd ); - return FALSE; - } - SERVER_START_REQ( set_window_pos ) - { - req->handle = hwnd; - req->previous = insert_after; - req->flags = swp_flags; - req->window.left = rectWindow->left; - req->window.top = rectWindow->top; - req->window.right = rectWindow->right; - req->window.bottom = rectWindow->bottom; - req->client.left = rectClient->left; - req->client.top = rectClient->top; - req->client.right = rectClient->right; - req->client.bottom = rectClient->bottom; - if (!IsRectEmpty( &valid_rects[0] )) - wine_server_add_data( req, valid_rects, 2 * sizeof(*valid_rects) ); - if ((ret = !wine_server_call( req ))) - { - new_style = reply->new_style; - new_ex_style = reply->new_ex_style; - visible_rect.left = reply->visible.left; - visible_rect.top = reply->visible.top; - visible_rect.right = reply->visible.right; - visible_rect.bottom = reply->visible.bottom; - } - } - SERVER_END_REQ; - - if (ret) + if ((ret = set_server_window_pos( hwnd, insert_after, rectWindow, rectClient, swp_flags, + valid_rects, &visible_rect ))) { if (data->whole_window == DefaultRootWindow(gdi_display)) { data->whole_rect = data->client_rect = data->window_rect = *rectWindow; - win->rectWindow = *rectWindow; - win->rectClient = *rectClient; - win->dwStyle = new_style; - win->dwExStyle = new_ex_style; - WIN_ReleasePtr( win ); return TRUE; } + new_style = GetWindowLongW( hwnd, GWL_STYLE ); new_whole_rect = *rectWindow; X11DRV_window_to_X_rect( data, &new_whole_rect ); if (memcmp( &visible_rect, &new_whole_rect, sizeof(RECT) )) @@ -337,17 +349,10 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, (swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW))) { RECT rect; - UnionRect( &rect, rectWindow, &win->rectWindow ); + UnionRect( &rect, rectWindow, &data->window_rect ); invalidate_dce( hwnd, &rect ); } - win->rectWindow = *rectWindow; - win->rectClient = *rectClient; - old_style = win->dwStyle; - win->dwStyle = new_style; - win->dwExStyle = new_ex_style; - data->window_rect = *rectWindow; - TRACE( "win %p window %s client %s style %08x\n", hwnd, wine_dbgstr_rect(rectWindow), wine_dbgstr_rect(rectClient), new_style ); @@ -403,6 +408,7 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, } } + data->window_rect = *rectWindow; X11DRV_sync_window_position( display, data, swp_flags, rectClient, &new_whole_rect ); if (data->whole_window && !data->lock_changes) @@ -440,7 +446,6 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, } } } - WIN_ReleasePtr( win ); return ret; }
1
0
0
0
Alexandre Julliard : server: Invalidate the correct region when custom valid rects are specified.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: 2921f5c156b368b4ce6e615eb61dad5c5f423bf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2921f5c156b368b4ce6e615eb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 22 20:06:35 2008 +0100 server: Invalidate the correct region when custom valid rects are specified. --- server/window.c | 44 ++++++++++++++++++++++++-------------------- 1 files changed, 24 insertions(+), 20 deletions(-) diff --git a/server/window.c b/server/window.c index 6c1b816..3c067b6 100644 --- a/server/window.c +++ b/server/window.c @@ -1500,42 +1500,46 @@ static void set_window_pos( struct window *win, struct window *previous, client_changed = (client_rect->left - old_client_rect.left != x_offset || client_rect->right - old_client_rect.right != x_offset || client_rect->top - old_client_rect.top != y_offset || - client_rect->bottom - old_client_rect.bottom != y_offset); + client_rect->bottom - old_client_rect.bottom != y_offset || + !valid_rects || + memcmp( &valid_rects[0], client_rect, sizeof(*client_rect) )); } if (frame_changed || client_changed) { - struct region *tmp = create_empty_region(); + struct region *win_rgn = old_vis_rgn; /* reuse previous region */ - if (tmp) + set_region_rect( win_rgn, window_rect ); + if (valid_rects) { /* subtract the valid portion of client rect from the total region */ - if (!client_changed) - set_region_rect( tmp, client_rect ); - else if (valid_rects) - set_region_rect( tmp, &valid_rects[0] ); - - set_region_rect( old_vis_rgn, window_rect ); - if (!subtract_region( tmp, old_vis_rgn, tmp )) free_region( tmp ); - else + struct region *tmp = create_empty_region(); + if (tmp) { - if (!is_desktop_window(win)) - offset_region( tmp, -client_rect->left, -client_rect->top ); - if (exposed_rgn) - { - union_region( exposed_rgn, exposed_rgn, tmp ); - free_region( tmp ); - } - else exposed_rgn = tmp; + set_region_rect( tmp, &valid_rects[0] ); + if (subtract_region( tmp, win_rgn, tmp )) win_rgn = tmp; + else free_region( tmp ); } } + if (!is_desktop_window(win)) + offset_region( win_rgn, -client_rect->left, -client_rect->top ); + if (exposed_rgn) + { + union_region( exposed_rgn, exposed_rgn, win_rgn ); + if (win_rgn != old_vis_rgn) free_region( win_rgn ); + } + else + { + exposed_rgn = win_rgn; + if (win_rgn == old_vis_rgn) old_vis_rgn = NULL; + } } if (exposed_rgn) redraw_window( win, exposed_rgn, 1, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN ); done: - free_region( old_vis_rgn ); + if (old_vis_rgn) free_region( old_vis_rgn ); if (exposed_rgn) free_region( exposed_rgn ); clear_error(); /* we ignore out of memory errors once the new rects have been set */ }
1
0
0
0
Alexandre Julliard : server: Add a separate request to set the window visible rect.
by Alexandre Julliard
23 Jan '08
23 Jan '08
Module: wine Branch: master Commit: 2f69329a370954188af401f8270c89e626c5b3fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f69329a370954188af401f82…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jan 22 20:01:21 2008 +0100 server: Add a separate request to set the window visible rect. --- dlls/winex11.drv/winpos.c | 53 ++++++++++++++++--------- include/wine/server_protocol.h | 20 +++++++++- server/protocol.def | 9 ++++ server/request.h | 2 + server/trace.c | 15 ++++++- server/window.c | 86 ++++++++++++++++++++++++++++++++-------- 6 files changed, 147 insertions(+), 38 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2f69329a370954188af40…
1
0
0
0
Alexander Nicolaysen Sørnes : Fix queue links/count for maintainers
by Chris Morgan
22 Jan '08
22 Jan '08
Module: appdb Branch: master Commit: dd6f0109bf6dab7bd543db957ff5227ab07790d6 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=dd6f0109bf6dab7bd543db95…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Wed Jan 23 00:31:47 2008 +0100 Fix queue links/count for maintainers --- include/appData.php | 1 - include/screenshot.php | 4 ++-- include/sidebar_maintainer_admin.php | 19 +++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/include/appData.php b/include/appData.php index 9174a34..2b0c137 100644 --- a/include/appData.php +++ b/include/appData.php @@ -341,7 +341,6 @@ class appData appVersion, appFamily WHERE appFamily.appId = appVersion.appId AND - AND appMaintainers.state = 'accepted' AND appMaintainers.userId = '?' diff --git a/include/screenshot.php b/include/screenshot.php index 6b91d37..b0c6ca2 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -652,10 +652,10 @@ class screenshot function objectGetEntries($sState, $iRows = 0, $iStart = 0) { return appData::objectGetEntries($sState, $iRows, $iStart, - "screenshot"); + 'screenshot'); } - function objectGetEntriesCount($sState, $iRows = 0, $iStart = 0) + function objectGetEntriesCount($sState) { return appData::objectGetEntriesCount($sState, 'screenshot'); } diff --git a/include/sidebar_maintainer_admin.php b/include/sidebar_maintainer_admin.php index 468a294..9006ee3 100644 --- a/include/sidebar_maintainer_admin.php +++ b/include/sidebar_maintainer_admin.php @@ -7,16 +7,15 @@ function global_maintainer_admin_menu() { $g = new htmlmenu("Maintainer Admin"); - $g->add("View Version Queue (".version::objectGetEntriesCount(true, false).")", - BASE."objectManager.php?sClass=version_queue&bIsQueue=true&sTitle=". - "Version%20Queue"); - $g->add("View Screenshot Queue (".appData::objectGetEntriesCount("true", - false, "screenshot").")", - BASE."objectManager.php?sClass=screenshot&bIsQueue=true&sTitle=". - "Screenshot%20Queue"); - $g->add("View Test Results Queue (".testData::objectGetEntriesCount(true, false).")", - BASE."objectManager.php?sClass=testData_queue&bIsQueue=true&sTitle=". - "Test%20Results%20Queue"); + $g->add('View Version Queue ('.version::objectGetEntriesCount('queued').')', + BASE.'objectManager.php?sClass=version_queue&sState=queued&sTitle='. + 'Version%20Queue'); + $g->add('View Screenshot Queue ('.screenshot::objectGetEntriesCount('queued').')', + BASE.'objectManager.php?sClass=screenshot&sState=queued&sTitle='. + 'Screenshot%20Queue'); + $g->add('View Test Results Queue ('.testData::objectGetEntriesCount('queued').')', + BASE.'objectManager.php?sClass=testData_queue&sState=queued&sTitle='. + 'Test%20Results%20Queue'); $g->done(); }
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
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