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
c81f6520
Commit
c81f6520
authored
Oct 29, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xlib: use mouse-events variable and fix event mask
parent
2f8ee0f3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
29 deletions
+5
-29
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+5
-26
modules/video_output/x11/xcommon.h
modules/video_output/x11/xcommon.h
+0
-3
No files found.
modules/video_output/x11/xcommon.c
View file @
c81f6520
...
@@ -165,9 +165,6 @@ int Activate ( vlc_object_t *p_this )
...
@@ -165,9 +165,6 @@ int Activate ( vlc_object_t *p_this )
if
(
p_vout
->
p_sys
==
NULL
)
if
(
p_vout
->
p_sys
==
NULL
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
/* key and mouse event handling */
p_vout
->
p_sys
->
i_vout_event
=
var_CreateGetInteger
(
p_vout
,
"vout-event"
);
/* Open display, using the "display" config variable or the DISPLAY
/* Open display, using the "display" config variable or the DISPLAY
* environment variable */
* environment variable */
psz_display
=
config_GetPsz
(
p_vout
,
MODULE_STRING
"-display"
);
psz_display
=
config_GetPsz
(
p_vout
,
MODULE_STRING
"-display"
);
...
@@ -1284,21 +1281,12 @@ static int ManageVideo( vout_thread_t *p_vout )
...
@@ -1284,21 +1281,12 @@ static int ManageVideo( vout_thread_t *p_vout )
i_x
,
i_y
,
i_width
,
i_height
);
i_x
,
i_y
,
i_width
,
i_height
);
}
}
/* cursor hiding depending on --vout-event option
* activated if:
* value = 1 (Fullsupport) (default value)
* or value = 2 (Fullscreen-Only) and condition met
*/
bool
b_vout_event
=
(
(
p_vout
->
p_sys
->
i_vout_event
==
1
)
||
(
p_vout
->
p_sys
->
i_vout_event
==
2
&&
p_vout
->
b_fullscreen
)
);
/* Autohide Cursour */
/* Autohide Cursour */
if
(
mdate
()
-
p_vout
->
p_sys
->
i_time_mouse_last_moved
>
if
(
mdate
()
-
p_vout
->
p_sys
->
i_time_mouse_last_moved
>
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
p_vout
->
p_sys
->
i_mouse_hide_timeout
)
{
{
/* Hide the mouse automatically */
/* Hide the mouse automatically */
if
(
b_vout_event
&&
p_vout
->
p_sys
->
b_mouse_pointer_visible
)
if
(
p_vout
->
p_sys
->
b_mouse_pointer_visible
)
{
{
ToggleCursor
(
p_vout
);
ToggleCursor
(
p_vout
);
}
}
...
@@ -1444,19 +1432,10 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
...
@@ -1444,19 +1432,10 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
}
}
}
while
(
!
b_map_notify
);
}
while
(
!
b_map_notify
);
/* key and mouse events handling depending on --vout-event option
long
mask
=
StructureNotifyMask
|
PointerMotionMask
;
* activated if:
if
(
var_CreateGetBool
(
p_vout
,
"mouse-events"
)
)
* value = 1 (Fullsupport) (default value)
mask
|=
ButtonPressMask
|
ButtonReleaseMask
;
* or value = 2 (Fullscreen-Only) and condition met
XSelectInput
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
,
mask
);
*/
bool
b_vout_event
=
(
(
p_vout
->
p_sys
->
i_vout_event
==
1
)
||
(
p_vout
->
p_sys
->
i_vout_event
==
2
&&
p_vout
->
b_fullscreen
)
);
if
(
b_vout_event
)
XSelectInput
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
,
StructureNotifyMask
|
ButtonPressMask
|
ButtonReleaseMask
|
PointerMotionMask
);
/* Create video output sub-window. */
/* Create video output sub-window. */
p_win
->
video_window
=
XCreateSimpleWindow
(
p_win
->
video_window
=
XCreateSimpleWindow
(
...
...
modules/video_output/x11/xcommon.h
View file @
c81f6520
...
@@ -207,9 +207,6 @@ struct vout_sys_t
...
@@ -207,9 +207,6 @@ struct vout_sys_t
/* Our window */
/* Our window */
x11_window_t
window
;
x11_window_t
window
;
/* key and mouse event handling */
int
i_vout_event
;
/* 1(Fullsupport), 2(FullscreenOnly), 3(none) */
/* X11 generic properties */
/* X11 generic properties */
#ifdef HAVE_SYS_SHM_H
#ifdef HAVE_SYS_SHM_H
int
i_shm_opcode
;
/* shared memory extension opcode */
int
i_shm_opcode
;
/* shared memory extension opcode */
...
...
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