Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
f246d924
Commit
f246d924
authored
Aug 11, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pre-factor WM_STATE change
parent
1f07fea8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+26
-18
No files found.
modules/video_output/xcb/window.c
View file @
f246d924
...
...
@@ -332,7 +332,30 @@ static void *Thread (void *data)
return
NULL
;
}
#include <vlc_vout.h>
/** Changes the EWMH state of the window */
static
void
set_wm_state
(
vout_window_t
*
wnd
,
bool
on
,
xcb_atom_t
state
)
{
vout_window_sys_t
*
sys
=
wnd
->
sys
;
/* From EWMH "_WM_STATE" */
xcb_client_message_event_t
ev
=
{
.
response_type
=
XCB_CLIENT_MESSAGE
,
.
format
=
32
,
.
window
=
wnd
->
handle
.
xid
,
.
type
=
sys
->
wm_state
,
};
ev
.
data
.
data32
[
0
]
=
on
?
NET_WM_STATE_ADD
:
NET_WM_STATE_REMOVE
;
ev
.
data
.
data32
[
1
]
=
state
;
ev
.
data
.
data32
[
2
]
=
0
;
ev
.
data
.
data32
[
3
]
=
1
;
/* From ICCCM "Changing Window State" */
xcb_send_event
(
sys
->
conn
,
0
,
sys
->
root
,
XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY
|
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT
,
(
const
char
*
)
&
ev
);
}
static
int
Control
(
vout_window_t
*
wnd
,
int
cmd
,
va_list
ap
)
{
...
...
@@ -355,25 +378,10 @@ static int Control (vout_window_t *wnd, int cmd, va_list ap)
}
case
VOUT_WINDOW_SET_ON_TOP
:
{
/* From EWMH "_WM_STATE" */
xcb_client_message_event_t
ev
=
{
.
response_type
=
XCB_CLIENT_MESSAGE
,
.
format
=
32
,
.
window
=
wnd
->
handle
.
xid
,
.
type
=
p_sys
->
wm_state
,
};
{
bool
on
=
va_arg
(
ap
,
int
);
ev
.
data
.
data32
[
0
]
=
on
?
NET_WM_STATE_ADD
:
NET_WM_STATE_REMOVE
;
ev
.
data
.
data32
[
1
]
=
p_sys
->
wm_state_above
;
ev
.
data
.
data32
[
2
]
=
0
;
ev
.
data
.
data32
[
3
]
=
1
;
/* From ICCCM "Changing Window State" */
xcb_send_event
(
p_sys
->
conn
,
0
,
p_sys
->
root
,
XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY
|
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT
,
(
const
char
*
)
&
ev
);
set_wm_state
(
wnd
,
on
,
p_sys
->
wm_state_above
);
xcb_flush
(
p_sys
->
conn
);
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