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
cf76c7d6
Commit
cf76c7d6
authored
Mar 12, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Check if _NET_WM_MOVERESIZE is supported before using it.
parent
dc26f278
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
winpos.c
dlls/winex11.drv/winpos.c
+37
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+1
-0
No files found.
dlls/winex11.drv/winpos.c
View file @
cf76c7d6
...
...
@@ -639,6 +639,37 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
/***********************************************************************
* is_netwm_supported
*/
static
BOOL
is_netwm_supported
(
Display
*
display
,
Atom
atom
)
{
static
Atom
*
net_supported
;
static
int
net_supported_count
=
-
1
;
int
i
;
wine_tsx11_lock
();
if
(
net_supported_count
==
-
1
)
{
Atom
type
;
int
format
;
unsigned
long
count
,
remaining
;
if
(
!
XGetWindowProperty
(
display
,
DefaultRootWindow
(
display
),
x11drv_atom
(
_NET_SUPPORTED
),
0
,
~
0UL
,
False
,
XA_ATOM
,
&
type
,
&
format
,
&
count
,
&
remaining
,
(
unsigned
char
**
)
&
net_supported
))
net_supported_count
=
count
*
(
format
/
8
)
/
sizeof
(
Atom
);
else
net_supported_count
=
0
;
}
wine_tsx11_unlock
();
for
(
i
=
0
;
i
<
net_supported_count
;
i
++
)
if
(
net_supported
[
i
]
==
atom
)
return
TRUE
;
return
FALSE
;
}
/***********************************************************************
* SysCommandSizeMove (X11DRV.@)
*
* Perform SC_MOVE and SC_SIZE commands.
...
...
@@ -656,6 +687,12 @@ BOOL X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wparam )
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
FALSE
;
if
(
!
data
->
whole_window
||
!
data
->
managed
)
return
FALSE
;
if
(
!
is_netwm_supported
(
display
,
x11drv_atom
(
_NET_WM_MOVERESIZE
)
))
{
TRACE
(
"_NET_WM_MOVERESIZE not supported
\n
"
);
return
FALSE
;
}
if
(
syscommand
==
SC_MOVE
)
{
if
(
!
hittest
)
dir
=
_NET_WM_MOVERESIZE_MOVE_KEYBOARD
;
...
...
dlls/winex11.drv/x11drv.h
View file @
cf76c7d6
...
...
@@ -567,6 +567,7 @@ enum x11drv_atoms
XATOM__ICC_PROFILE
,
XATOM__MOTIF_WM_HINTS
,
XATOM__KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR
,
XATOM__NET_SUPPORTED
,
XATOM__NET_SYSTEM_TRAY_OPCODE
,
XATOM__NET_SYSTEM_TRAY_S0
,
XATOM__NET_WM_MOVERESIZE
,
...
...
dlls/winex11.drv/x11drv_main.c
View file @
cf76c7d6
...
...
@@ -131,6 +131,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_ICC_PROFILE"
,
"_MOTIF_WM_HINTS"
,
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR"
,
"_NET_SUPPORTED"
,
"_NET_SYSTEM_TRAY_OPCODE"
,
"_NET_SYSTEM_TRAY_S0"
,
"_NET_WM_MOVERESIZE"
,
...
...
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