Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eaea28e5
Commit
eaea28e5
authored
Feb 27, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Check the current window state on Map/UnmapNotify and ignore obsolete events.
parent
b76db19e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
winpos.c
dlls/winex11.drv/winpos.c
+27
-7
No files found.
dlls/winex11.drv/winpos.c
View file @
eaea28e5
...
...
@@ -745,14 +745,27 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
void
X11DRV_MapNotify
(
HWND
hwnd
,
XEvent
*
event
)
{
struct
x11drv_win_data
*
data
;
HWND
hwndFocus
=
GetFocus
();
WND
*
win
;
int
state
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
)
return
;
if
(
!
(
win
=
WIN_GetPtr
(
hwnd
)))
return
;
if
(
!
data
->
managed
)
{
HWND
hwndFocus
=
GetFocus
();
if
(
hwndFocus
&&
IsChild
(
hwnd
,
hwndFocus
))
X11DRV_SetFocus
(
hwndFocus
);
/* FIXME */
return
;
}
if
(
data
->
managed
&&
(
win
->
dwStyle
&
WS_VISIBLE
)
&&
(
win
->
dwStyle
&
WS_MINIMIZE
))
state
=
get_window_wm_state
(
event
->
xmap
.
display
,
data
);
if
(
state
!=
NormalState
)
{
TRACE
(
"win %p/%lx ignoring since state=%d
\n
"
,
hwnd
,
data
->
whole_window
,
state
);
return
;
}
if
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
(
WS_VISIBLE
|
WS_MINIMIZE
))
==
(
WS_VISIBLE
|
WS_MINIMIZE
))
{
int
x
,
y
;
unsigned
int
width
,
height
,
border
,
depth
;
...
...
@@ -773,6 +786,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent *event )
OffsetRect
(
&
rect
,
virtual_screen_rect
.
left
,
virtual_screen_rect
.
top
);
X11DRV_X_to_window_rect
(
data
,
&
rect
);
if
(
!
(
win
=
WIN_GetPtr
(
hwnd
)))
return
;
if
(
win
->
flags
&
WIN_RESTORE_MAX
)
style
|=
WS_MAXIMIZE
;
WIN_SetStyle
(
hwnd
,
style
,
WS_MINIMIZE
);
WIN_ReleasePtr
(
win
);
...
...
@@ -783,8 +797,6 @@ void X11DRV_MapNotify( HWND hwnd, XEvent *event )
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_STATECHANGED
);
data
->
lock_changes
--
;
}
else
WIN_ReleasePtr
(
win
);
if
(
hwndFocus
&&
IsChild
(
hwnd
,
hwndFocus
))
X11DRV_SetFocus
(
hwndFocus
);
/* FIXME */
}
...
...
@@ -795,13 +807,21 @@ void X11DRV_UnmapNotify( HWND hwnd, XEvent *event )
{
struct
x11drv_win_data
*
data
;
WND
*
win
;
int
state
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
managed
||
!
data
->
mapped
)
return
;
state
=
get_window_wm_state
(
event
->
xunmap
.
display
,
data
);
if
(
state
!=
IconicState
)
{
TRACE
(
"win %p/%lx ignoring since state=%d
\n
"
,
hwnd
,
data
->
whole_window
,
state
);
return
;
}
if
(
!
(
win
=
WIN_GetPtr
(
hwnd
)))
return
;
if
((
win
->
dwStyle
&
WS_VISIBLE
)
&&
data
->
managed
&&
X11DRV_is_window_rect_mapped
(
&
win
->
rectWindow
))
if
((
win
->
dwStyle
&
WS_VISIBLE
)
&&
X11DRV_is_window_rect_mapped
(
&
win
->
rectWindow
))
{
if
(
win
->
dwStyle
&
WS_MAXIMIZE
)
win
->
flags
|=
WIN_RESTORE_MAX
;
...
...
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