Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
fc45b97d
Commit
fc45b97d
authored
Jun 07, 2004
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mouse button handling
parent
2b8c2a5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
SDLvncviewer.c
client_examples/SDLvncviewer.c
+12
-1
No files found.
client_examples/SDLvncviewer.c
View file @
fc45b97d
...
...
@@ -208,9 +208,20 @@ int main(int argc,char** argv) {
case
SDL_VIDEOEXPOSE
:
SendFramebufferUpdateRequest
(
cl
,
0
,
0
,
cl
->
width
,
cl
->
height
,
FALSE
);
break
;
case
SDL_MOUSEBUTTONUP
:
case
SDL_MOUSEBUTTONDOWN
:
case
SDL_MOUSEMOTION
:
{
int
x
,
y
;
SDL_GetMouseState
(
&
x
,
&
y
);
int
state
=
SDL_GetMouseState
(
&
x
,
&
y
);
struct
{
int
sdl
;
int
rfb
;
}
buttonMapping
[]
=
{
{
SDL_BUTTON_LEFT
,
rfbButton1Mask
},
{
SDL_BUTTON_RIGHT
,
rfbButton2Mask
},
{
SDL_BUTTON_MIDDLE
,
rfbButton3Mask
},
{
0
,
0
}
};
int
i
;
for
(
buttonMask
=
0
,
i
=
0
;
buttonMapping
[
i
].
sdl
;
i
++
)
if
(
state
&
SDL_BUTTON
(
buttonMapping
[
i
].
sdl
))
buttonMask
|=
buttonMapping
[
i
].
rfb
;
SendPointerEvent
(
cl
,
x
,
y
,
buttonMask
);
}
break
;
...
...
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