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
28bcdf24
Commit
28bcdf24
authored
Oct 28, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB: unset the cursor when we detect pointer motion
parent
b6956269
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
modules/video_output/xcb/events.c
modules/video_output/xcb/events.c
+9
-6
No files found.
modules/video_output/xcb/events.c
View file @
28bcdf24
...
...
@@ -52,11 +52,15 @@ static void HandleButtonRelease (vout_display_t *vd,
vout_display_SendEventMouseReleased
(
vd
,
ev
->
detail
-
1
);
}
static
void
HandleMotionNotify
(
vout_display_t
*
vd
,
static
void
HandleMotionNotify
(
vout_display_t
*
vd
,
xcb_connection_t
*
conn
,
const
xcb_motion_notify_event_t
*
ev
)
{
vout_display_place_t
place
;
/* show the default cursor */
xcb_change_window_attributes
(
conn
,
ev
->
event
,
XCB_CW_CURSOR
,
&
(
uint32_t
)
{
XCB_CURSOR_NONE
});
/* TODO it could be saved */
vout_display_PlacePicture
(
&
place
,
&
vd
->
source
,
vd
->
cfg
,
false
);
...
...
@@ -68,7 +72,6 @@ static void HandleMotionNotify (vout_display_t *vd,
const
int
y
=
vd
->
source
.
i_y_offset
+
(
int64_t
)(
ev
->
event_y
-
place
.
y
)
*
vd
->
source
.
i_visible_height
/
place
.
height
;
/* TODO show the cursor ? */
if
(
x
>=
vd
->
source
.
i_x_offset
&&
x
<
vd
->
source
.
i_x_offset
+
vd
->
source
.
i_visible_width
&&
y
>=
vd
->
source
.
i_y_offset
&&
y
<
vd
->
source
.
i_y_offset
+
vd
->
source
.
i_visible_height
)
vout_display_SendEventMouseMoved
(
vd
,
x
,
y
);
...
...
@@ -93,8 +96,8 @@ HandleParentStructure (vout_display_t *vd,
/**
* Process an X11 event.
*/
static
int
ProcessEvent
(
vout_display_t
*
vd
,
bool
*
visible
,
xcb_generic_event_t
*
ev
)
static
int
ProcessEvent
(
vout_display_t
*
vd
,
xcb_connection_t
*
conn
,
bool
*
visible
,
xcb_generic_event_t
*
ev
)
{
switch
(
ev
->
response_type
&
0x7f
)
{
...
...
@@ -107,7 +110,7 @@ static int ProcessEvent (vout_display_t *vd, bool *visible,
break
;
case
XCB_MOTION_NOTIFY
:
HandleMotionNotify
(
vd
,
(
xcb_motion_notify_event_t
*
)
ev
);
HandleMotionNotify
(
vd
,
conn
,
(
xcb_motion_notify_event_t
*
)
ev
);
break
;
case
XCB_VISIBILITY_NOTIFY
:
...
...
@@ -143,7 +146,7 @@ int ManageEvent (vout_display_t *vd, xcb_connection_t *conn, bool *visible)
xcb_generic_event_t
*
ev
;
while
((
ev
=
xcb_poll_for_event
(
conn
))
!=
NULL
)
ProcessEvent
(
vd
,
visible
,
ev
);
ProcessEvent
(
vd
,
conn
,
visible
,
ev
);
if
(
xcb_connection_has_error
(
conn
))
{
...
...
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