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
62701cf2
Commit
62701cf2
authored
Apr 09, 2009
by
Rémi Denis-Courmont
Committed by
Rémi Denis-Courmont
Apr 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X11 common: code factorization
parent
3d819f9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
36 deletions
+17
-36
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+17
-36
No files found.
modules/video_output/x11/xcommon.c
View file @
62701cf2
...
@@ -3315,47 +3315,28 @@ static int ConvertKey( int i_key )
...
@@ -3315,47 +3315,28 @@ static int ConvertKey( int i_key )
*****************************************************************************/
*****************************************************************************/
static
int
WindowOnTop
(
vout_thread_t
*
p_vout
,
bool
b_on_top
)
static
int
WindowOnTop
(
vout_thread_t
*
p_vout
,
bool
b_on_top
)
{
{
if
(
p_vout
->
p_sys
->
b_net_wm_state_stays_on_top
)
XClientMessageEvent
event
;
{
XClientMessageEvent
event
;
memset
(
&
event
,
0
,
sizeof
(
XClientMessageEvent
)
);
memset
(
&
event
,
0
,
sizeof
(
XClientMessageEvent
)
);
event
.
type
=
ClientMessage
;
event
.
message_type
=
p_vout
->
p_sys
->
net_wm_state
;
event
.
display
=
p_vout
->
p_sys
->
p_display
;
event
.
window
=
p_vout
->
p_sys
->
p_win
->
base_window
;
event
.
format
=
32
;
event
.
data
.
l
[
0
]
=
b_on_top
;
/* set property */
event
.
type
=
ClientMessage
;
if
(
p_vout
->
p_sys
->
b_net_wm_state_stays_on_top
)
event
.
message_type
=
p_vout
->
p_sys
->
net_wm_state
;
event
.
display
=
p_vout
->
p_sys
->
p_display
;
event
.
window
=
p_vout
->
p_sys
->
p_win
->
base_window
;
event
.
format
=
32
;
event
.
data
.
l
[
0
]
=
b_on_top
;
/* set property */
event
.
data
.
l
[
1
]
=
p_vout
->
p_sys
->
net_wm_state_stays_on_top
;
event
.
data
.
l
[
1
]
=
p_vout
->
p_sys
->
net_wm_state_stays_on_top
;
XSendEvent
(
p_vout
->
p_sys
->
p_display
,
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
False
,
SubstructureRedirectMask
,
(
XEvent
*
)
&
event
);
}
/* use _NET_WM_STATE_ABOVE if window manager
* doesn't handle _NET_WM_STATE_STAYS_ON_TOP */
else
if
(
p_vout
->
p_sys
->
b_net_wm_state_above
)
else
if
(
p_vout
->
p_sys
->
b_net_wm_state_above
)
{
/* use _NET_WM_STATE_ABOVE if window manager
XClientMessageEvent
event
;
* doesn't handle _NET_WM_STATE_STAYS_ON_TOP */
memset
(
&
event
,
0
,
sizeof
(
XClientMessageEvent
)
);
event
.
type
=
ClientMessage
;
event
.
message_type
=
p_vout
->
p_sys
->
net_wm_state
;
event
.
display
=
p_vout
->
p_sys
->
p_display
;
event
.
window
=
p_vout
->
p_sys
->
p_win
->
base_window
;
event
.
format
=
32
;
event
.
data
.
l
[
0
]
=
b_on_top
;
/* set property */
event
.
data
.
l
[
1
]
=
p_vout
->
p_sys
->
net_wm_state_above
;
event
.
data
.
l
[
1
]
=
p_vout
->
p_sys
->
net_wm_state_above
;
else
return
VLC_EGENERIC
;
XSendEvent
(
p_vout
->
p_sys
->
p_display
,
XSendEvent
(
p_vout
->
p_sys
->
p_display
,
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
False
,
SubstructureRedirectMask
,
False
,
SubstructureRedirectMask
,
(
XEvent
*
)
&
event
);
(
XEvent
*
)
&
event
);
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
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