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
607f8a8a
Commit
607f8a8a
authored
Apr 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB: set WM_CLIENT_MACHINE properly
parent
57ecf19a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+16
-0
No files found.
modules/video_output/xcb/window.c
View file @
607f8a8a
...
...
@@ -27,6 +27,8 @@
#include <stdarg.h>
#include <assert.h>
#include <poll.h>
#include <unistd.h>
/* gethostname() */
#include <limits.h>
/* HOST_NAME_MAX */
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
...
...
@@ -80,6 +82,19 @@ void set_ascii_prop (xcb_connection_t *conn, xcb_window_t window,
XA_STRING
,
8
,
strlen
(
value
),
value
);
}
static
inline
void
set_hostname_prop
(
xcb_connection_t
*
conn
,
xcb_window_t
window
)
{
char
hostname
[
HOST_NAME_MAX
];
if
(
gethostname
(
hostname
,
sizeof
(
hostname
))
==
0
)
{
hostname
[
sizeof
(
hostname
)
-
1
]
=
'\0'
;
set_ascii_prop
(
conn
,
window
,
XA_WM_CLIENT_MACHINE
,
hostname
);
}
}
/**
* Create an X11 window.
*/
...
...
@@ -133,6 +148,7 @@ static int Open (vlc_object_t *obj)
pgettext
(
"ASCII VLC"
,
"VLC"
));
xcb_change_property
(
conn
,
XCB_PROP_MODE_REPLACE
,
window
,
XA_WM_CLASS
,
XA_STRING
,
8
,
8
,
"vlc
\0
VLC"
);
set_hostname_prop
(
conn
,
window
);
wnd
->
handle
.
xid
=
window
;
wnd
->
p_sys
=
p_sys
;
...
...
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