Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2f112131
Commit
2f112131
authored
Sep 12, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Notify the user driver about window extended style changes too.
parent
54d920ae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
25 deletions
+26
-25
driver.c
dlls/user32/driver.c
+3
-3
user_private.h
dlls/user32/user_private.h
+1
-1
win.c
dlls/user32/win.c
+14
-12
window.c
dlls/winex11.drv/window.c
+7
-8
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-1
No files found.
dlls/user32/driver.c
View file @
2f112131
...
...
@@ -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
);
}
static
void
loaderdrv_SetWindowStyle
(
HWND
hwnd
,
DWORD
old_
style
)
static
void
loaderdrv_SetWindowStyle
(
HWND
hwnd
,
INT
offset
,
STYLESTRUCT
*
style
)
{
load_driver
()
->
pSetWindowStyle
(
hwnd
,
o
ld_
style
);
load_driver
()
->
pSetWindowStyle
(
hwnd
,
o
ffset
,
style
);
}
static
void
loaderdrv_SetWindowText
(
HWND
hwnd
,
LPCWSTR
text
)
...
...
dlls/user32/user_private.h
View file @
2f112131
...
...
@@ -153,7 +153,7 @@ typedef struct tagUSER_DRIVER {
void
(
*
pSetParent
)(
HWND
,
HWND
,
HWND
);
int
(
*
pSetWindowRgn
)(
HWND
,
HRGN
,
BOOL
);
void
(
*
pSetWindowIcon
)(
HWND
,
UINT
,
HICON
);
void
(
*
pSetWindowStyle
)(
HWND
,
DWORD
);
void
(
*
pSetWindowStyle
)(
HWND
,
INT
,
STYLESTRUCT
*
);
void
(
*
pSetWindowText
)(
HWND
,
LPCWSTR
);
UINT
(
*
pShowWindow
)(
HWND
,
INT
,
RECT
*
,
UINT
);
LRESULT
(
*
pSysCommand
)(
HWND
,
WPARAM
,
LPARAM
);
...
...
dlls/user32/win.c
View file @
2f112131
...
...
@@ -536,7 +536,7 @@ HWND WIN_SetOwner( HWND hwnd, HWND owner )
ULONG
WIN_SetStyle
(
HWND
hwnd
,
ULONG
set_bits
,
ULONG
clear_bits
)
{
BOOL
ok
;
ULONG
new_style
,
old_style
=
0
;
STYLESTRUCT
style
;
WND
*
win
=
WIN_GetPtr
(
hwnd
);
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
);
return
0
;
}
new_style
=
(
win
->
dwStyle
|
set_bits
)
&
~
clear_bits
;
if
(
new_style
==
win
->
dwStyle
)
style
.
styleOld
=
win
->
dwStyle
;
style
.
styleNew
=
(
win
->
dwStyle
|
set_bits
)
&
~
clear_bits
;
if
(
style
.
styleNew
==
style
.
styleOld
)
{
WIN_ReleasePtr
(
win
);
return
new_style
;
return
style
.
styleNew
;
}
SERVER_START_REQ
(
set_window_info
)
{
req
->
handle
=
hwnd
;
req
->
flags
=
SET_WIN_STYLE
;
req
->
style
=
new_style
;
req
->
style
=
style
.
styleNew
;
req
->
extra_offset
=
-
1
;
if
((
ok
=
!
wine_server_call
(
req
)))
{
old_style
=
reply
->
old_style
;
win
->
dwStyle
=
new_style
;
style
.
styleOld
=
reply
->
old_style
;
win
->
dwStyle
=
style
.
styleNew
;
}
}
SERVER_END_REQ
;
WIN_ReleasePtr
(
win
);
if
(
ok
)
{
USER_Driver
->
pSetWindowStyle
(
hwnd
,
old_
style
);
if
((
old_style
^
new_style
)
&
WS_VISIBLE
)
invalidate_dce
(
hwnd
,
NULL
);
USER_Driver
->
pSetWindowStyle
(
hwnd
,
GWL_STYLE
,
&
style
);
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
(
offset
==
GWL_STYLE
)
USER_Driver
->
pSetWindowStyle
(
hwnd
,
retval
);
if
(
offset
==
GWL_STYLE
||
offset
==
GWL_EXSTYLE
)
{
USER_Driver
->
pSetWindowStyle
(
hwnd
,
offset
,
&
style
);
SendMessageW
(
hwnd
,
WM_STYLECHANGED
,
offset
,
(
LPARAM
)
&
style
);
}
return
retval
;
}
...
...
dlls/winex11.drv/window.c
View file @
2f112131
...
...
@@ -1455,16 +1455,15 @@ void X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
*
* 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
;
DWORD
new_style
,
changed
;
DWORD
changed
;
if
(
hwnd
==
GetDesktopWindow
())
return
;
new_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
changed
=
new_style
^
old_style
;
changed
=
style
->
styleNew
^
style
->
styleOld
;
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 */
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
))
&&
...
...
@@ -1474,17 +1473,17 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style )
{
Display
*
display
=
thread_display
();
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
);
if
(
data
&&
data
->
wm_hints
)
{
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
);
wine_tsx11_unlock
();
}
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
2f112131
...
...
@@ -109,7 +109,7 @@
@ cdecl SetParent(long long long) X11DRV_SetParent
@ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon
@ 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 ShowWindow(long long ptr long) X11DRV_ShowWindow
@ cdecl SysCommand(long long long) X11DRV_SysCommand
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment