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
19cc555e
Commit
19cc555e
authored
May 28, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/window: remove the Matchbox hack
parent
5466e48e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
56 deletions
+1
-56
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+1
-56
No files found.
modules/video_output/xcb/window.c
View file @
19cc555e
...
@@ -90,8 +90,6 @@ vlc_module_end ()
...
@@ -90,8 +90,6 @@ vlc_module_end ()
static
int
Control
(
vout_window_t
*
,
int
,
va_list
ap
);
static
int
Control
(
vout_window_t
*
,
int
,
va_list
ap
);
static
void
*
Thread
(
void
*
);
static
void
*
Thread
(
void
*
);
#define MATCHBOX_HACK 1
/* Matchbox focus hack */
struct
vout_window_sys_t
struct
vout_window_sys_t
{
{
xcb_connection_t
*
conn
;
xcb_connection_t
*
conn
;
...
@@ -103,9 +101,6 @@ struct vout_window_sys_t
...
@@ -103,9 +101,6 @@ struct vout_window_sys_t
xcb_atom_t
wm_state_above
;
xcb_atom_t
wm_state_above
;
xcb_atom_t
wm_state_below
;
xcb_atom_t
wm_state_below
;
xcb_atom_t
wm_state_fullscreen
;
xcb_atom_t
wm_state_fullscreen
;
#ifdef MATCHBOX_HACK
xcb_atom_t
mb_current_app_window
;
#endif
bool
embedded
;
bool
embedded
;
};
};
...
@@ -195,20 +190,11 @@ static void CacheAtoms (vout_window_sys_t *p_sys)
...
@@ -195,20 +190,11 @@ static void CacheAtoms (vout_window_sys_t *p_sys)
wm_state_above_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_ABOVE"
);
wm_state_above_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_ABOVE"
);
wm_state_below_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_BELOW"
);
wm_state_below_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_BELOW"
);
wm_state_fs_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_FULLSCREEN"
);
wm_state_fs_ck
=
intern_string
(
conn
,
"_NET_WM_STATE_FULLSCREEN"
);
#ifdef MATCHBOX_HACK
xcb_intern_atom_cookie_t
mb_current_app_window
;
mb_current_app_window
=
xcb_intern_atom
(
conn
,
true
,
strlen
(
"_MB_CURRENT_APP_WINDOW"
),
"_MB_CURRENT_APP_WINDOW"
);
#endif
p_sys
->
wm_state
=
get_atom
(
conn
,
wm_state_ck
);
p_sys
->
wm_state
=
get_atom
(
conn
,
wm_state_ck
);
p_sys
->
wm_state_above
=
get_atom
(
conn
,
wm_state_above_ck
);
p_sys
->
wm_state_above
=
get_atom
(
conn
,
wm_state_above_ck
);
p_sys
->
wm_state_below
=
get_atom
(
conn
,
wm_state_below_ck
);
p_sys
->
wm_state_below
=
get_atom
(
conn
,
wm_state_below_ck
);
p_sys
->
wm_state_fullscreen
=
get_atom
(
conn
,
wm_state_fs_ck
);
p_sys
->
wm_state_fullscreen
=
get_atom
(
conn
,
wm_state_fs_ck
);
#ifdef MATCHBOX_HACK
p_sys
->
mb_current_app_window
=
get_atom
(
conn
,
mb_current_app_window
);
#endif
}
}
/**
/**
...
@@ -334,14 +320,6 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
...
@@ -334,14 +320,6 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
/* Cache any EWMH atom we may need later */
/* Cache any EWMH atom we may need later */
CacheAtoms
(
p_sys
);
CacheAtoms
(
p_sys
);
#ifdef MATCHBOX_HACK
if
(
p_sys
->
mb_current_app_window
)
{
uint32_t
value
=
XCB_EVENT_MASK_PROPERTY_CHANGE
;
xcb_change_window_attributes
(
conn
,
scr
->
root
,
XCB_CW_EVENT_MASK
,
&
value
);
}
#endif
/* Make the window visible */
/* Make the window visible */
xcb_map_window
(
conn
,
window
);
xcb_map_window
(
conn
,
window
);
...
@@ -358,11 +336,6 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
...
@@ -358,11 +336,6 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
&&
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
&&
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
wnd
,
VLC_THREAD_PRIORITY_LOW
))
DestroyKeyHandler
(
p_sys
->
keys
);
DestroyKeyHandler
(
p_sys
->
keys
);
#ifdef MATCHBOX_HACK
if
(
p_sys
->
mb_current_app_window
)
xcb_set_input_focus
(
p_sys
->
conn
,
XCB_INPUT_FOCUS_POINTER_ROOT
,
wnd
->
handle
.
xid
,
XCB_CURRENT_TIME
);
#endif
xcb_flush
(
conn
);
/* Make sure map_window is sent (should be useless) */
xcb_flush
(
conn
);
/* Make sure map_window is sent (should be useless) */
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -417,35 +390,7 @@ static void *Thread (void *data)
...
@@ -417,35 +390,7 @@ static void *Thread (void *data)
{
{
if
(
ProcessKeyEvent
(
p_sys
->
keys
,
ev
)
==
0
)
if
(
ProcessKeyEvent
(
p_sys
->
keys
,
ev
)
==
0
)
continue
;
continue
;
#ifdef MATCHBOX_HACK
msg_Dbg
(
wnd
,
"unhandled event: %"
PRIu8
,
ev
->
response_type
);
if
(
p_sys
->
mb_current_app_window
&&
(
ev
->
response_type
&
0x7f
)
==
XCB_PROPERTY_NOTIFY
)
{
const
xcb_property_notify_event_t
*
pne
=
(
xcb_property_notify_event_t
*
)
ev
;
if
(
pne
->
atom
==
p_sys
->
mb_current_app_window
&&
pne
->
state
==
XCB_PROPERTY_NEW_VALUE
)
{
xcb_get_property_reply_t
*
r
=
xcb_get_property_reply
(
conn
,
xcb_get_property
(
conn
,
0
,
pne
->
window
,
pne
->
atom
,
XA_WINDOW
,
0
,
4
),
NULL
);
if
(
r
!=
NULL
&&
!
memcmp
(
xcb_get_property_value
(
r
),
&
wnd
->
handle
.
xid
,
4
))
{
msg_Dbg
(
wnd
,
"asking Matchbox for input focus"
);
xcb_set_input_focus
(
conn
,
XCB_INPUT_FOCUS_POINTER_ROOT
,
wnd
->
handle
.
xid
,
pne
->
time
);
xcb_flush
(
conn
);
}
free
(
r
);
}
}
else
#endif
msg_Dbg
(
wnd
,
"unhandled event: %"
PRIu8
,
ev
->
response_type
);
free
(
ev
);
free
(
ev
);
}
}
vlc_restorecancel
(
canc
);
vlc_restorecancel
(
canc
);
...
...
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