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
fa677c7f
Commit
fa677c7f
authored
Apr 10, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Forward all WM_SYSCOMMAND messages to the driver, not only moves and resizes.
parent
9bcdc46e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
29 deletions
+35
-29
driver.c
dlls/user32/driver.c
+7
-7
nonclient.c
dlls/user32/nonclient.c
+3
-0
user_private.h
dlls/user32/user_private.h
+1
-1
winpos.c
dlls/user32/winpos.c
+0
-2
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-1
winpos.c
dlls/winex11.drv/winpos.c
+23
-18
No files found.
dlls/user32/driver.c
View file @
fa677c7f
...
...
@@ -120,7 +120,7 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC
(
SetWindowIcon
);
GET_USER_FUNC
(
SetWindowStyle
);
GET_USER_FUNC
(
SetWindowText
);
GET_USER_FUNC
(
SysCommand
SizeMove
);
GET_USER_FUNC
(
SysCommand
);
GET_USER_FUNC
(
WindowMessage
);
#undef GET_USER_FUNC
}
...
...
@@ -400,9 +400,9 @@ static void nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
{
}
static
BOOL
nulldrv_SysCommandSizeMove
(
HWND
hwnd
,
WPARAM
w
param
)
static
LRESULT
nulldrv_SysCommand
(
HWND
hwnd
,
WPARAM
wparam
,
LPARAM
l
param
)
{
return
FALSE
;
return
-
1
;
}
static
LRESULT
nulldrv_WindowMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
@@ -466,7 +466,7 @@ static const USER_DRIVER null_driver =
nulldrv_SetWindowIcon
,
nulldrv_SetWindowStyle
,
nulldrv_SetWindowText
,
nulldrv_SysCommand
SizeMove
,
nulldrv_SysCommand
,
nulldrv_WindowMessage
};
...
...
@@ -726,9 +726,9 @@ static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
load_driver
()
->
pSetWindowText
(
hwnd
,
text
);
}
static
BOOL
loaderdrv_SysCommandSizeMove
(
HWND
hwnd
,
WPARAM
w
param
)
static
LRESULT
loaderdrv_SysCommand
(
HWND
hwnd
,
WPARAM
wparam
,
LPARAM
l
param
)
{
return
load_driver
()
->
pSysCommand
SizeMove
(
hwnd
,
w
param
);
return
load_driver
()
->
pSysCommand
(
hwnd
,
wparam
,
l
param
);
}
static
LRESULT
loaderdrv_WindowMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
@@ -792,6 +792,6 @@ static const USER_DRIVER lazy_load_driver =
loaderdrv_SetWindowIcon
,
loaderdrv_SetWindowStyle
,
loaderdrv_SetWindowText
,
loaderdrv_SysCommand
SizeMove
,
loaderdrv_SysCommand
,
loaderdrv_WindowMessage
};
dlls/user32/nonclient.c
View file @
fa677c7f
...
...
@@ -1533,6 +1533,9 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
if
(
HOOK_CallHooks
(
WH_CBT
,
HCBT_SYSCOMMAND
,
wParam
,
lParam
,
TRUE
))
return
0
;
if
(
!
USER_Driver
->
pSysCommand
(
hwnd
,
wParam
,
lParam
))
return
0
;
switch
(
wParam
&
0xfff0
)
{
case
SC_SIZE
:
...
...
dlls/user32/user_private.h
View file @
fa677c7f
...
...
@@ -156,7 +156,7 @@ typedef struct tagUSER_DRIVER {
void
(
*
pSetWindowIcon
)(
HWND
,
UINT
,
HICON
);
void
(
*
pSetWindowStyle
)(
HWND
,
DWORD
);
void
(
*
pSetWindowText
)(
HWND
,
LPCWSTR
);
BOOL
(
*
pSysCommandSizeMove
)(
HWND
,
W
PARAM
);
LRESULT
(
*
pSysCommand
)(
HWND
,
WPARAM
,
L
PARAM
);
LRESULT
(
*
pWindowMessage
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
}
USER_DRIVER
;
...
...
dlls/user32/winpos.c
View file @
fa677c7f
...
...
@@ -2381,8 +2381,6 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
TRACE
(
"hwnd %p command %04lx, hittest %d, pos %d,%d
\n
"
,
hwnd
,
syscommand
,
hittest
,
pt
.
x
,
pt
.
y
);
if
(
USER_Driver
->
pSysCommandSizeMove
(
hwnd
,
wParam
))
return
;
if
(
syscommand
==
SC_MOVE
)
{
if
(
!
hittest
)
hittest
=
start_size_move
(
hwnd
,
wParam
,
&
capturePoint
,
style
);
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
fa677c7f
...
...
@@ -112,7 +112,7 @@
@ cdecl SetWindowRgn(long long long) X11DRV_SetWindowRgn
@ cdecl SetWindowStyle(ptr long) X11DRV_SetWindowStyle
@ cdecl SetWindowText(long wstr) X11DRV_SetWindowText
@ cdecl SysCommand
SizeMove(long long) X11DRV_SysCommandSizeMove
@ cdecl SysCommand
(long long) X11DRV_SysCommand
@ cdecl WindowMessage(long long long long) X11DRV_WindowMessage
# WinTab32
...
...
dlls/winex11.drv/winpos.c
View file @
fa677c7f
...
...
@@ -712,13 +712,12 @@ static BOOL is_netwm_supported( Display *display, Atom atom )
/***********************************************************************
* SysCommand
SizeMove
(X11DRV.@)
* SysCommand (X11DRV.@)
*
* Perform
SC_MOVE and SC_SIZE commands
.
* Perform
WM_SYSCOMMAND handling
.
*/
BOOL
X11DRV_SysCommandSizeMove
(
HWND
hwnd
,
WPARAM
w
param
)
LRESULT
X11DRV_SysCommand
(
HWND
hwnd
,
WPARAM
wparam
,
LPARAM
l
param
)
{
WPARAM
syscommand
=
wparam
&
0xfff0
;
WPARAM
hittest
=
wparam
&
0x0f
;
DWORD
dwPoint
;
int
x
,
y
,
dir
;
...
...
@@ -726,24 +725,18 @@ BOOL X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
Display
*
display
=
thread_display
();
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
FALSE
;
if
(
!
data
->
whole_window
||
!
data
->
managed
)
return
FALSE
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
-
1
;
if
(
!
data
->
whole_window
||
!
data
->
managed
||
!
data
->
mapped
)
return
-
1
;
if
(
!
is_netwm_supported
(
display
,
x11drv_atom
(
_NET_WM_MOVERESIZE
)
))
{
TRACE
(
"_NET_WM_MOVERESIZE not supported
\n
"
);
return
FALSE
;
}
if
(
syscommand
==
SC_MOVE
)
switch
(
wparam
&
0xfff0
)
{
case
SC_MOVE
:
if
(
!
hittest
)
dir
=
_NET_WM_MOVERESIZE_MOVE_KEYBOARD
;
else
dir
=
_NET_WM_MOVERESIZE_MOVE
;
}
else
{
break
;
case
SC_SIZE
:
/* windows without WS_THICKFRAME are not resizable through the window manager */
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_THICKFRAME
))
return
FALSE
;
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_THICKFRAME
))
return
-
1
;
switch
(
hittest
)
{
...
...
@@ -757,6 +750,18 @@ BOOL X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
case
WMSZ_BOTTOMRIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT
;
break
;
default:
dir
=
_NET_WM_MOVERESIZE_SIZE_KEYBOARD
;
break
;
}
break
;
default:
return
-
1
;
}
if
(
IsZoomed
(
hwnd
))
return
-
1
;
if
(
!
is_netwm_supported
(
display
,
x11drv_atom
(
_NET_WM_MOVERESIZE
)
))
{
TRACE
(
"_NET_WM_MOVERESIZE not supported
\n
"
);
return
-
1
;
}
dwPoint
=
GetMessagePos
();
...
...
@@ -784,5 +789,5 @@ BOOL X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
XUngrabPointer
(
display
,
CurrentTime
);
XSendEvent
(
display
,
root_window
,
False
,
SubstructureNotifyMask
,
&
xev
);
wine_tsx11_unlock
();
return
TRUE
;
return
0
;
}
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