user32: Notify the user driver about window extended style changes too.
This commit is contained in:
parent
54d920ae91
commit
2f11213168
|
@ -388,7 +388,7 @@ static void nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nulldrv_SetWindowStyle( HWND hwnd, DWORD old_style )
|
static void nulldrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -723,9 +723,9 @@ static void loaderdrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
|
||||||
load_driver()->pSetWindowIcon( hwnd, type, icon );
|
load_driver()->pSetWindowIcon( hwnd, type, icon );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void loaderdrv_SetWindowStyle( HWND hwnd, DWORD old_style )
|
static void loaderdrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
|
||||||
{
|
{
|
||||||
load_driver()->pSetWindowStyle( hwnd, old_style );
|
load_driver()->pSetWindowStyle( hwnd, offset, style );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
|
static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
|
||||||
|
|
|
@ -153,7 +153,7 @@ typedef struct tagUSER_DRIVER {
|
||||||
void (*pSetParent)(HWND,HWND,HWND);
|
void (*pSetParent)(HWND,HWND,HWND);
|
||||||
int (*pSetWindowRgn)(HWND,HRGN,BOOL);
|
int (*pSetWindowRgn)(HWND,HRGN,BOOL);
|
||||||
void (*pSetWindowIcon)(HWND,UINT,HICON);
|
void (*pSetWindowIcon)(HWND,UINT,HICON);
|
||||||
void (*pSetWindowStyle)(HWND,DWORD);
|
void (*pSetWindowStyle)(HWND,INT,STYLESTRUCT*);
|
||||||
void (*pSetWindowText)(HWND,LPCWSTR);
|
void (*pSetWindowText)(HWND,LPCWSTR);
|
||||||
UINT (*pShowWindow)(HWND,INT,RECT*,UINT);
|
UINT (*pShowWindow)(HWND,INT,RECT*,UINT);
|
||||||
LRESULT (*pSysCommand)(HWND,WPARAM,LPARAM);
|
LRESULT (*pSysCommand)(HWND,WPARAM,LPARAM);
|
||||||
|
|
|
@ -536,7 +536,7 @@ HWND WIN_SetOwner( HWND hwnd, HWND owner )
|
||||||
ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits )
|
ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits )
|
||||||
{
|
{
|
||||||
BOOL ok;
|
BOOL ok;
|
||||||
ULONG new_style, old_style = 0;
|
STYLESTRUCT style;
|
||||||
WND *win = WIN_GetPtr( hwnd );
|
WND *win = WIN_GetPtr( hwnd );
|
||||||
|
|
||||||
if (!win || win == WND_DESKTOP) return 0;
|
if (!win || win == WND_DESKTOP) return 0;
|
||||||
|
@ -547,32 +547,33 @@ ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits )
|
||||||
set_bits, clear_bits, hwnd );
|
set_bits, clear_bits, hwnd );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
new_style = (win->dwStyle | set_bits) & ~clear_bits;
|
style.styleOld = win->dwStyle;
|
||||||
if (new_style == win->dwStyle)
|
style.styleNew = (win->dwStyle | set_bits) & ~clear_bits;
|
||||||
|
if (style.styleNew == style.styleOld)
|
||||||
{
|
{
|
||||||
WIN_ReleasePtr( win );
|
WIN_ReleasePtr( win );
|
||||||
return new_style;
|
return style.styleNew;
|
||||||
}
|
}
|
||||||
SERVER_START_REQ( set_window_info )
|
SERVER_START_REQ( set_window_info )
|
||||||
{
|
{
|
||||||
req->handle = hwnd;
|
req->handle = hwnd;
|
||||||
req->flags = SET_WIN_STYLE;
|
req->flags = SET_WIN_STYLE;
|
||||||
req->style = new_style;
|
req->style = style.styleNew;
|
||||||
req->extra_offset = -1;
|
req->extra_offset = -1;
|
||||||
if ((ok = !wine_server_call( req )))
|
if ((ok = !wine_server_call( req )))
|
||||||
{
|
{
|
||||||
old_style = reply->old_style;
|
style.styleOld = reply->old_style;
|
||||||
win->dwStyle = new_style;
|
win->dwStyle = style.styleNew;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
WIN_ReleasePtr( win );
|
WIN_ReleasePtr( win );
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
USER_Driver->pSetWindowStyle( hwnd, old_style );
|
USER_Driver->pSetWindowStyle( hwnd, GWL_STYLE, &style );
|
||||||
if ((old_style ^ new_style) & WS_VISIBLE) invalidate_dce( hwnd, NULL );
|
if ((style.styleOld ^ style.styleNew) & WS_VISIBLE) invalidate_dce( hwnd, NULL );
|
||||||
}
|
}
|
||||||
return old_style;
|
return style.styleOld;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2131,10 +2132,11 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B
|
||||||
|
|
||||||
if (!ok) return 0;
|
if (!ok) return 0;
|
||||||
|
|
||||||
if (offset == GWL_STYLE) USER_Driver->pSetWindowStyle( hwnd, retval );
|
|
||||||
|
|
||||||
if (offset == GWL_STYLE || offset == GWL_EXSTYLE)
|
if (offset == GWL_STYLE || offset == GWL_EXSTYLE)
|
||||||
|
{
|
||||||
|
USER_Driver->pSetWindowStyle( hwnd, offset, &style );
|
||||||
SendMessageW( hwnd, WM_STYLECHANGED, offset, (LPARAM)&style );
|
SendMessageW( hwnd, WM_STYLECHANGED, offset, (LPARAM)&style );
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1455,16 +1455,15 @@ void X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
|
||||||
*
|
*
|
||||||
* Update the X state of a window to reflect a style change
|
* Update the X state of a window to reflect a style change
|
||||||
*/
|
*/
|
||||||
void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style )
|
void X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
|
||||||
{
|
{
|
||||||
struct x11drv_win_data *data;
|
struct x11drv_win_data *data;
|
||||||
DWORD new_style, changed;
|
DWORD changed;
|
||||||
|
|
||||||
if (hwnd == GetDesktopWindow()) return;
|
if (hwnd == GetDesktopWindow()) return;
|
||||||
new_style = GetWindowLongW( hwnd, GWL_STYLE );
|
changed = style->styleNew ^ style->styleOld;
|
||||||
changed = new_style ^ old_style;
|
|
||||||
|
|
||||||
if ((changed & WS_VISIBLE) && (new_style & WS_VISIBLE))
|
if (offset == GWL_STYLE && (changed & WS_VISIBLE) && (style->styleNew & WS_VISIBLE))
|
||||||
{
|
{
|
||||||
/* we don't unmap windows, that causes trouble with the window manager */
|
/* we don't unmap windows, that causes trouble with the window manager */
|
||||||
if (!(data = X11DRV_get_win_data( hwnd )) &&
|
if (!(data = X11DRV_get_win_data( hwnd )) &&
|
||||||
|
@ -1474,17 +1473,17 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style )
|
||||||
{
|
{
|
||||||
Display *display = thread_display();
|
Display *display = thread_display();
|
||||||
set_wm_hints( display, data );
|
set_wm_hints( display, data );
|
||||||
if (!data->mapped) map_window( display, data, new_style );
|
if (!data->mapped) map_window( display, data, style->styleNew );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed & WS_DISABLED)
|
if (offset == GWL_STYLE && (changed & WS_DISABLED))
|
||||||
{
|
{
|
||||||
data = X11DRV_get_win_data( hwnd );
|
data = X11DRV_get_win_data( hwnd );
|
||||||
if (data && data->wm_hints)
|
if (data && data->wm_hints)
|
||||||
{
|
{
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
data->wm_hints->input = !(new_style & WS_DISABLED);
|
data->wm_hints->input = !(style->styleNew & WS_DISABLED);
|
||||||
XSetWMHints( thread_display(), data->whole_window, data->wm_hints );
|
XSetWMHints( thread_display(), data->whole_window, data->wm_hints );
|
||||||
wine_tsx11_unlock();
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
@ cdecl SetParent(long long long) X11DRV_SetParent
|
@ cdecl SetParent(long long long) X11DRV_SetParent
|
||||||
@ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon
|
@ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon
|
||||||
@ cdecl SetWindowRgn(long long long) X11DRV_SetWindowRgn
|
@ cdecl SetWindowRgn(long long long) X11DRV_SetWindowRgn
|
||||||
@ cdecl SetWindowStyle(ptr long) X11DRV_SetWindowStyle
|
@ cdecl SetWindowStyle(ptr long ptr) X11DRV_SetWindowStyle
|
||||||
@ cdecl SetWindowText(long wstr) X11DRV_SetWindowText
|
@ cdecl SetWindowText(long wstr) X11DRV_SetWindowText
|
||||||
@ cdecl ShowWindow(long long ptr long) X11DRV_ShowWindow
|
@ cdecl ShowWindow(long long ptr long) X11DRV_ShowWindow
|
||||||
@ cdecl SysCommand(long long long) X11DRV_SysCommand
|
@ cdecl SysCommand(long long long) X11DRV_SysCommand
|
||||||
|
|
Loading…
Reference in New Issue