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
7d21e6b3
Commit
7d21e6b3
authored
Sep 19, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: If a window is not resizable through the window manager fall back…
winex11.drv: If a window is not resizable through the window manager fall back to non-managed resizing.
parent
fcae6777
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
28 deletions
+30
-28
winpos.c
dlls/winex11.drv/winpos.c
+30
-28
No files found.
dlls/winex11.drv/winpos.c
View file @
7d21e6b3
...
...
@@ -1164,11 +1164,38 @@ static void set_movesize_capture( HWND hwnd )
* http://freedesktop.org/Standards/wm-spec/1.3/ar01s04.html
* or search for "_NET_WM_MOVERESIZE"
*/
static
void
X11DRV_WMMoveResizeWindow
(
HWND
hwnd
,
int
x
,
int
y
,
int
dir
)
static
BOOL
X11DRV_WMMoveResizeWindow
(
HWND
hwnd
,
int
x
,
int
y
,
WPARAM
wparam
)
{
WPARAM
syscommand
=
wparam
&
0xfff0
;
WPARAM
hittest
=
wparam
&
0x0f
;
int
dir
;
XEvent
xev
;
Display
*
display
=
thread_display
();
if
(
syscommand
==
SC_MOVE
)
{
if
(
!
hittest
)
dir
=
_NET_WM_MOVERESIZE_MOVE_KEYBOARD
;
else
dir
=
_NET_WM_MOVERESIZE_MOVE
;
}
else
{
/* windows without WS_THICKFRAME are not resizable through the window manager */
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_THICKFRAME
))
return
FALSE
;
switch
(
hittest
)
{
case
WMSZ_LEFT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_LEFT
;
break
;
case
WMSZ_RIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_RIGHT
;
break
;
case
WMSZ_TOP
:
dir
=
_NET_WM_MOVERESIZE_SIZE_TOP
;
break
;
case
WMSZ_TOPLEFT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_TOPLEFT
;
break
;
case
WMSZ_TOPRIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_TOPRIGHT
;
break
;
case
WMSZ_BOTTOM
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOM
;
break
;
case
WMSZ_BOTTOMLEFT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT
;
break
;
case
WMSZ_BOTTOMRIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT
;
break
;
default:
dir
=
_NET_WM_MOVERESIZE_SIZE_KEYBOARD
;
break
;
}
}
TRACE
(
"hwnd %p, x %d, y %d, dir %d
\n
"
,
hwnd
,
x
,
y
,
dir
);
xev
.
xclient
.
type
=
ClientMessage
;
...
...
@@ -1190,6 +1217,7 @@ static void X11DRV_WMMoveResizeWindow( HWND hwnd, int x, int y, int dir )
XUngrabPointer
(
display
,
CurrentTime
);
XSendEvent
(
display
,
root_window
,
False
,
SubstructureNotifyMask
,
&
xev
);
wine_tsx11_unlock
();
return
TRUE
;
}
/***********************************************************************
...
...
@@ -1232,33 +1260,7 @@ void X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
hwnd
,
data
->
managed
?
""
:
"NOT "
,
syscommand
,
hittest
,
pt
.
x
,
pt
.
y
);
/* if we are managed then we let the WM do all the work */
if
(
data
->
managed
)
{
int
dir
;
if
(
syscommand
==
SC_MOVE
)
{
if
(
!
hittest
)
dir
=
_NET_WM_MOVERESIZE_MOVE_KEYBOARD
;
else
dir
=
_NET_WM_MOVERESIZE_MOVE
;
}
else
if
(
!
hittest
)
dir
=
_NET_WM_MOVERESIZE_SIZE_KEYBOARD
;
else
switch
(
hittest
)
{
case
WMSZ_LEFT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_LEFT
;
break
;
case
WMSZ_RIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_RIGHT
;
break
;
case
WMSZ_TOP
:
dir
=
_NET_WM_MOVERESIZE_SIZE_TOP
;
break
;
case
WMSZ_TOPLEFT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_TOPLEFT
;
break
;
case
WMSZ_TOPRIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_TOPRIGHT
;
break
;
case
WMSZ_BOTTOM
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOM
;
break
;
case
WMSZ_BOTTOMLEFT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT
;
break
;
case
WMSZ_BOTTOMRIGHT
:
dir
=
_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT
;
break
;
default:
ERR
(
"Invalid hittest value: %d
\n
"
,
hittest
);
dir
=
_NET_WM_MOVERESIZE_SIZE_KEYBOARD
;
}
X11DRV_WMMoveResizeWindow
(
hwnd
,
pt
.
x
,
pt
.
y
,
dir
);
return
;
}
if
(
data
->
managed
&&
X11DRV_WMMoveResizeWindow
(
hwnd
,
pt
.
x
,
pt
.
y
,
wParam
))
return
;
SystemParametersInfoA
(
SPI_GETDRAGFULLWINDOWS
,
0
,
&
DragFullWindows
,
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