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
803fc6e2
Commit
803fc6e2
authored
Sep 24, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Add window data structure locking to the SysCommand entry point.
parent
6a9f5e18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
window.c
dlls/winex11.drv/window.c
+15
-9
No files found.
dlls/winex11.drv/window.c
View file @
803fc6e2
...
@@ -2397,8 +2397,8 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
...
@@ -2397,8 +2397,8 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
int
dir
;
int
dir
;
struct
x11drv_win_data
*
data
;
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
X11DRV_
get_win_data
(
hwnd
)))
return
-
1
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
-
1
;
if
(
!
data
->
whole_window
||
!
data
->
managed
||
!
data
->
mapped
)
return
-
1
;
if
(
!
data
->
whole_window
||
!
data
->
managed
||
!
data
->
mapped
)
goto
failed
;
switch
(
wparam
&
0xfff0
)
switch
(
wparam
&
0xfff0
)
{
{
...
@@ -2408,7 +2408,7 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
...
@@ -2408,7 +2408,7 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
break
;
break
;
case
SC_SIZE
:
case
SC_SIZE
:
/* windows without WS_THICKFRAME are not resizable through the window manager */
/* windows without WS_THICKFRAME are not resizable through the window manager */
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_THICKFRAME
))
return
-
1
;
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_THICKFRAME
))
goto
failed
;
switch
(
hittest
)
switch
(
hittest
)
{
{
...
@@ -2427,24 +2427,30 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
...
@@ -2427,24 +2427,30 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
case
SC_KEYMENU
:
case
SC_KEYMENU
:
/* prevent a simple ALT press+release from activating the system menu,
/* prevent a simple ALT press+release from activating the system menu,
* as that can get confusing on managed windows */
* as that can get confusing on managed windows */
if
((
WCHAR
)
lparam
)
return
-
1
;
/* got an explicit char */
if
((
WCHAR
)
lparam
)
goto
failed
;
/* got an explicit char */
if
(
GetMenu
(
hwnd
))
return
-
1
;
/* window has a real menu */
if
(
GetMenu
(
hwnd
))
goto
failed
;
/* window has a real menu */
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_SYSMENU
))
return
-
1
;
/* no system menu */
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_SYSMENU
))
goto
failed
;
/* no system menu */
TRACE
(
"ignoring SC_KEYMENU wp %lx lp %lx
\n
"
,
wparam
,
lparam
);
TRACE
(
"ignoring SC_KEYMENU wp %lx lp %lx
\n
"
,
wparam
,
lparam
);
release_win_data
(
data
);
return
0
;
return
0
;
default:
default:
return
-
1
;
goto
failed
;
}
}
if
(
IsZoomed
(
hwnd
))
return
-
1
;
if
(
IsZoomed
(
hwnd
))
goto
failed
;
if
(
!
is_netwm_supported
(
data
->
display
,
x11drv_atom
(
_NET_WM_MOVERESIZE
)
))
if
(
!
is_netwm_supported
(
data
->
display
,
x11drv_atom
(
_NET_WM_MOVERESIZE
)
))
{
{
TRACE
(
"_NET_WM_MOVERESIZE not supported
\n
"
);
TRACE
(
"_NET_WM_MOVERESIZE not supported
\n
"
);
return
-
1
;
goto
failed
;
}
}
release_win_data
(
data
);
move_resize_window
(
hwnd
,
dir
);
move_resize_window
(
hwnd
,
dir
);
return
0
;
return
0
;
failed:
release_win_data
(
data
);
return
-
1
;
}
}
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