Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
4de1a9ca
Commit
4de1a9ca
authored
Aug 22, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: Alternate method to set always on top for X11 window managers
parent
c4b9cf9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
+33
-2
modules/gui/skins2/x11/x11_window.cpp
modules/gui/skins2/x11/x11_window.cpp
+33
-2
No files found.
modules/gui/skins2/x11/x11_window.cpp
View file @
4de1a9ca
...
...
@@ -175,7 +175,7 @@ void X11Window::toggleOnTop( bool onTop ) const
{
int
i_ret
,
i_format
;
unsigned
long
i
,
i_items
,
i_bytesafter
;
Atom
net_wm_supported
,
net_wm_state
,
net_wm_state_on_top
;
Atom
net_wm_supported
,
net_wm_state
,
net_wm_state_on_top
,
net_wm_state_above
;
union
{
Atom
*
p_atom
;
unsigned
char
*
p_char
;
}
p_args
;
p_args
.
p_atom
=
NULL
;
...
...
@@ -200,8 +200,39 @@ void X11Window::toggleOnTop( bool onTop ) const
if
(
p_args
.
p_atom
[
i
]
==
net_wm_state_on_top
)
break
;
}
if
(
i
==
i_items
)
{
/* use _NET_WM_STATE_ABOVE if window manager
* doesn't handle _NET_WM_STATE_STAYS_ON_TOP */
net_wm_state_above
=
XInternAtom
(
XDISPLAY
,
"_NET_WM_STATE_ABOVE"
,
False
);
for
(
i
=
0
;
i
<
i_items
;
i
++
)
{
if
(
p_args
.
p_atom
[
i
]
==
net_wm_state_above
)
break
;
}
XFree
(
p_args
.
p_atom
);
if
(
i
==
i_items
)
return
;
/* Not supported */
/* Switch "on top" status */
XClientMessageEvent
event
;
memset
(
&
event
,
0
,
sizeof
(
XClientMessageEvent
)
);
event
.
type
=
ClientMessage
;
event
.
message_type
=
net_wm_state
;
event
.
display
=
XDISPLAY
;
event
.
window
=
m_wnd
;
event
.
format
=
32
;
event
.
data
.
l
[
0
]
=
onTop
;
/* set property */
event
.
data
.
l
[
1
]
=
net_wm_state_above
;
XSendEvent
(
XDISPLAY
,
DefaultRootWindow
(
XDISPLAY
),
False
,
SubstructureRedirectMask
,
(
XEvent
*
)
&
event
);
return
;
}
XFree
(
p_args
.
p_atom
);
if
(
i
==
i_items
)
return
;
/* Not supported */
/* Switch "on top" status */
XClientMessageEvent
event
;
...
...
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