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
f48eb158
Commit
f48eb158
authored
Aug 20, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Force a window to managed mode when it is activated.
parent
ac98e0c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
msg.c
dlls/user32/tests/msg.c
+2
-2
window.c
dlls/winex11.drv/window.c
+5
-4
winpos.c
dlls/winex11.drv/winpos.c
+5
-3
No files found.
dlls/user32/tests/msg.c
View file @
f48eb158
...
...
@@ -3724,7 +3724,7 @@ static void test_showwindow(void)
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"Failed to create popup window
\n
"
);
ok
(
!
IsZoomed
(
hwnd
),
"window should NOT be maximized
\n
"
);
ok_sequence
(
WmCreatePopupSeq
,
"CreateWindow(WS_VISIBLE):popup"
,
TRU
E
);
ok_sequence
(
WmCreatePopupSeq
,
"CreateWindow(WS_VISIBLE):popup"
,
FALS
E
);
trace
(
"done
\n
"
);
trace
(
"calling ShowWindow( SW_SHOWMAXIMIZE ) for visible popup window
\n
"
);
...
...
@@ -4065,7 +4065,7 @@ static void test_messages(void)
ok_sequence
(
WmShowVisiblePopupSeq_2
,
"SetWindowPos:show_visible_popup_2"
,
FALSE
);
flush_sequence
();
SetWindowPos
(
hchild
,
0
,
0
,
0
,
0
,
0
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
);
ok_sequence
(
WmShowVisiblePopupSeq_3
,
"SetWindowPos:show_visible_popup_3"
,
FALS
E
);
ok_sequence
(
WmShowVisiblePopupSeq_3
,
"SetWindowPos:show_visible_popup_3"
,
TRU
E
);
DestroyWindow
(
hchild
);
/* this time add WS_VISIBLE for CreateWindowEx, but this fact actually
...
...
dlls/winex11.drv/window.c
View file @
f48eb158
...
...
@@ -974,7 +974,7 @@ static void get_desktop_xwin( Display *display, struct x11drv_win_data *data )
SetPropA
(
data
->
hwnd
,
visual_id_prop
,
(
HANDLE
)
visualid
);
data
->
whole_window
=
root_window
;
X11DRV_SetWindowPos
(
data
->
hwnd
,
0
,
&
virtual_screen_rect
,
&
virtual_screen_rect
,
SWP_NOZORDER
,
NULL
);
SWP_NOZORDER
|
SWP_NOACTIVATE
,
NULL
);
if
(
root_window
!=
DefaultRootWindow
(
display
))
{
data
->
managed
=
TRUE
;
...
...
@@ -1039,7 +1039,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
/* initialize the dimensions before sending WM_GETMINMAXINFO */
SetRect
(
&
rect
,
cs
->
x
,
cs
->
y
,
cs
->
x
+
cs
->
cx
,
cs
->
y
+
cs
->
cy
);
X11DRV_SetWindowPos
(
hwnd
,
0
,
&
rect
,
&
rect
,
SWP_NOZORDER
,
NULL
);
X11DRV_SetWindowPos
(
hwnd
,
0
,
&
rect
,
&
rect
,
SWP_NOZORDER
|
SWP_NOACTIVATE
,
NULL
);
/* create an X window if it's a top level window */
if
(
GetAncestor
(
hwnd
,
GA_PARENT
)
==
GetDesktopWindow
())
...
...
@@ -1083,7 +1083,8 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
if
(
cs
->
cy
<
0
)
cs
->
cy
=
0
;
SetRect
(
&
rect
,
cs
->
x
,
cs
->
y
,
cs
->
x
+
cs
->
cx
,
cs
->
y
+
cs
->
cy
);
if
(
!
X11DRV_SetWindowPos
(
hwnd
,
0
,
&
rect
,
&
rect
,
SWP_NOZORDER
,
NULL
))
return
FALSE
;
if
(
!
X11DRV_SetWindowPos
(
hwnd
,
0
,
&
rect
,
&
rect
,
SWP_NOZORDER
|
SWP_NOACTIVATE
,
NULL
))
return
FALSE
;
}
/* send WM_NCCREATE */
...
...
@@ -1111,7 +1112,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
/* yes, even if the CBT hook was called with HWND_TOP */
insert_after
=
(
wndPtr
->
dwStyle
&
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
X11DRV_SetWindowPos
(
hwnd
,
insert_after
,
&
wndPtr
->
rectWindow
,
&
rect
,
0
,
NULL
);
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
,
...
...
dlls/winex11.drv/winpos.c
View file @
f48eb158
...
...
@@ -252,7 +252,9 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
root_window
==
DefaultRootWindow
(
display
)
&&
data
->
whole_window
!=
root_window
)
{
if
(
is_window_managed
(
hwnd
,
rectWindow
))
if
(
!
(
swp_flags
&
(
SWP_NOACTIVATE
|
SWP_HIDEWINDOW
))
||
is_window_managed
(
hwnd
,
rectWindow
)
||
hwnd
==
GetActiveWindow
())
{
TRACE
(
"making win %p/%lx managed
\n
"
,
hwnd
,
data
->
whole_window
);
make_managed
=
TRUE
;
...
...
@@ -787,7 +789,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent *event )
SendMessageW
(
hwnd
,
WM_SHOWWINDOW
,
SW_RESTORE
,
0
);
data
->
lock_changes
++
;
SetWindowPos
(
hwnd
,
0
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
|
SWP_STATECHANGED
);
SWP_NOZORDER
|
SWP_
NOACTIVATE
|
SWP_
FRAMECHANGED
|
SWP_STATECHANGED
);
data
->
lock_changes
--
;
}
else
WIN_ReleasePtr
(
win
);
...
...
@@ -888,7 +890,7 @@ void X11DRV_handle_desktop_resize( unsigned int width, unsigned int height )
TRACE
(
"desktop %p change to (%dx%d)
\n
"
,
hwnd
,
width
,
height
);
data
->
lock_changes
++
;
X11DRV_SetWindowPos
(
hwnd
,
0
,
&
virtual_screen_rect
,
&
virtual_screen_rect
,
SWP_NOZORDER
|
SWP_NOMOV
E
,
NULL
);
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOACTIVAT
E
,
NULL
);
data
->
lock_changes
--
;
ClipCursor
(
NULL
);
SendMessageTimeoutW
(
HWND_BROADCAST
,
WM_DISPLAYCHANGE
,
screen_depth
,
...
...
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