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
d603ab6b
Commit
d603ab6b
authored
Nov 05, 2008
by
Joseph Tulou
Committed by
Rémi Denis-Courmont
Nov 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make x11 event handling optional
Signed-off-b: Rémi Denis-Courmont <rdenis@simphalempin.com>
parent
4909d939
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
5 deletions
+38
-5
modules/video_output/x11/x11.c
modules/video_output/x11/x11.c
+12
-0
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+26
-5
No files found.
modules/video_output/x11/x11.c
View file @
d603ab6b
...
...
@@ -66,6 +66,16 @@ extern void Deactivate ( vlc_object_t * );
"Screen to use in fullscreen mode. For instance " \
"set it to 0 for first screen, 1 for the second.")
#define X11_EVENT_TEXT N_("key and mouse event handling at X11 plugin level.")
#define X11_EVENT_LONGTEXT N_( \
"This parameter accepts values : 1 (full event handling support), " \
"2 (event handling only for fullscreen) or 3 (No event handling). " \
"Full event handling support is the default value.")
static
const
int
pi_x11_event_values
[]
=
{
1
,
2
,
3
};
static
const
char
*
const
ppsz_x11_event_descriptions
[]
=
{
N_
(
"FullSupport"
),
N_
(
"Fullscreen-Only"
),
N_
(
"None"
)
};
vlc_module_begin
()
set_shortname
(
"X11"
)
set_category
(
CAT_VIDEO
)
...
...
@@ -78,6 +88,8 @@ vlc_module_begin ()
#ifdef HAVE_XINERAMA
add_integer
(
"x11-xineramascreen"
,
-
1
,
NULL
,
SCREEN_TEXT
,
SCREEN_LONGTEXT
,
true
)
#endif
add_integer
(
"x11-event"
,
1
,
NULL
,
X11_EVENT_TEXT
,
X11_EVENT_LONGTEXT
,
true
)
change_integer_list
(
pi_x11_event_values
,
ppsz_x11_event_descriptions
,
NULL
)
set_description
(
N_
(
"X11 video output"
)
)
set_capability
(
"video output"
,
70
)
set_callbacks
(
Activate
,
Deactivate
)
...
...
modules/video_output/x11/xcommon.c
View file @
d603ab6b
...
...
@@ -1529,12 +1529,22 @@ static int ManageVideo( vout_thread_t *p_vout )
i_x
,
i_y
,
i_width
,
i_height
);
}
/* cursor hiding depending on --x11-event option
* activated if:
* value = 1 (Fullsupport) (default value)
* or value = 2 (Fullscreen-Only) and condition met
*/
int
i_x11_event
=
var_CreateGetInteger
(
p_vout
,
"x11-event"
);
bool
b_x11_event
=
(
(
i_x11_event
==
1
)
||
(
i_x11_event
==
2
&&
p_vout
->
b_fullscreen
)
);
/* Autohide Cursour */
if
(
mdate
()
-
p_vout
->
p_sys
->
i_time_mouse_last_moved
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
/* Hide the mouse automatically */
if
(
p_vout
->
p_sys
->
b_mouse_pointer_visible
)
if
(
b_x11_event
&&
p_vout
->
p_sys
->
b_mouse_pointer_visible
)
{
ToggleCursor
(
p_vout
);
}
...
...
@@ -1790,10 +1800,21 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
}
}
while
(
!
(
b_expose
&&
b_configure_notify
&&
b_map_notify
)
);
XSelectInput
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
,
StructureNotifyMask
|
KeyPressMask
|
ButtonPressMask
|
ButtonReleaseMask
|
PointerMotionMask
);
/* key and mouse events handling depending on --x11-event option
* activated if:
* value = 1 (Fullsupport) (default value)
* or value = 2 (Fullscreen-Only) and condition met
*/
int
i_x11_event
=
var_CreateGetInteger
(
p_vout
,
"x11-event"
);
bool
b_x11_event
=
(
(
i_x11_event
==
1
)
||
(
i_x11_event
==
2
&&
p_vout
->
b_fullscreen
)
);
if
(
b_x11_event
)
XSelectInput
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
,
StructureNotifyMask
|
KeyPressMask
|
ButtonPressMask
|
ButtonReleaseMask
|
PointerMotionMask
);
#ifdef MODULE_NAME_IS_x11
if
(
XDefaultDepth
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
)
==
8
)
...
...
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