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
24c0abfd
Commit
24c0abfd
authored
Sep 19, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add window data structure locking to the ConfigureNotify event handler.
parent
6a4490d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
event.c
dlls/winex11.drv/event.c
+14
-5
No files found.
dlls/winex11.drv/event.c
View file @
24c0abfd
...
...
@@ -993,17 +993,17 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
int
cx
,
cy
,
x
=
event
->
x
,
y
=
event
->
y
;
if
(
!
hwnd
)
return
;
if
(
!
(
data
=
X11DRV_
get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
||
data
->
iconic
)
return
;
if
(
data
->
whole_window
&&
!
data
->
managed
)
return
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
||
data
->
iconic
)
goto
done
;
if
(
data
->
whole_window
&&
!
data
->
managed
)
goto
done
;
/* ignore synthetic events on foreign windows */
if
(
event
->
send_event
&&
!
data
->
whole_window
)
return
;
if
(
event
->
send_event
&&
!
data
->
whole_window
)
goto
done
;
if
(
data
->
configure_serial
&&
(
long
)(
data
->
configure_serial
-
event
->
serial
)
>
0
)
{
TRACE
(
"win %p/%lx event %d,%d,%dx%d ignoring old serial %lu/%lu
\n
"
,
hwnd
,
data
->
whole_window
,
event
->
x
,
event
->
y
,
event
->
width
,
event
->
height
,
event
->
serial
,
data
->
configure_serial
);
return
;
goto
done
;
}
/* Get geometry */
...
...
@@ -1059,6 +1059,7 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
if
(
!
IsZoomed
(
data
->
hwnd
))
{
TRACE
(
"win %p/%lx is maximized
\n
"
,
data
->
hwnd
,
data
->
whole_window
);
release_win_data
(
data
);
SendMessageW
(
data
->
hwnd
,
WM_SYSCOMMAND
,
SC_MAXIMIZE
,
0
);
return
;
}
...
...
@@ -1068,13 +1069,21 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
if
(
IsZoomed
(
data
->
hwnd
))
{
TRACE
(
"window %p/%lx is no longer maximized
\n
"
,
data
->
hwnd
,
data
->
whole_window
);
release_win_data
(
data
);
SendMessageW
(
data
->
hwnd
,
WM_SYSCOMMAND
,
SC_RESTORE
,
0
);
return
;
}
}
if
((
flags
&
(
SWP_NOSIZE
|
SWP_NOMOVE
))
!=
(
SWP_NOSIZE
|
SWP_NOMOVE
))
{
release_win_data
(
data
);
SetWindowPos
(
hwnd
,
0
,
x
,
y
,
cx
,
cy
,
flags
);
return
;
}
done:
release_win_data
(
data
);
}
...
...
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