Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Remmina
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
Remmina
Remmina
Commits
5c0c16ca
Commit
5c0c16ca
authored
5 months ago
by
Hiroyuki Tanaka
Browse files
Options
Downloads
Patches
Plain Diff
Revert "[REM-3121] Handle GotFrameBufferUpdate on its own thread to prevent freeze"
This reverts commit
70baf16f
.
parent
df5de585
No related branches found
No related tags found
Loading
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/vnc/vnc_plugin.c
+23
-49
23 additions, 49 deletions
plugins/vnc/vnc_plugin.c
plugins/vnc/vnc_plugin.h
+0
-10
0 additions, 10 deletions
plugins/vnc/vnc_plugin.h
with
23 additions
and
59 deletions
plugins/vnc/vnc_plugin.c
+
23
−
49
View file @
5c0c16ca
...
...
@@ -682,15 +682,8 @@ static void remmina_plugin_vnc_rfb_fill_buffer(rfbClient *cl, guchar *dest, gint
}
}
void
remmina_plugin_vnc_rfb_updatefb
(
gpointer
*
data
){
FrameInfo
*
frame
=
(
FrameInfo
*
)
data
;
rfbClient
*
cl
=
frame
->
cl
;
int
x
=
frame
->
x
;
int
y
=
frame
->
y
;
int
w
=
frame
->
w
;
int
h
=
frame
->
h
;
static
void
remmina_plugin_vnc_rfb_updatefb
(
rfbClient
*
cl
,
int
x
,
int
y
,
int
w
,
int
h
)
{
TRACE_CALL
(
__func__
);
RemminaProtocolWidget
*
gp
=
rfbClientGetClientData
(
cl
,
NULL
);
RemminaPluginVncData
*
gpdata
=
GET_PLUGIN_DATA
(
gp
);
...
...
@@ -698,7 +691,6 @@ void remmina_plugin_vnc_rfb_updatefb(gpointer* data){
gint
rowstride
;
gint
width
;
if
(
gpdata
->
running
){
LOCK_BUFFER
(
TRUE
);
if
(
w
>=
1
||
h
>=
1
)
{
...
...
@@ -719,22 +711,6 @@ void remmina_plugin_vnc_rfb_updatefb(gpointer* data){
remmina_plugin_vnc_queue_draw_area
(
gp
,
x
,
y
,
w
,
h
);
}
free
(
frame
);
return
FALSE
;
}
static
void
remmina_plugin_vnc_rfb_got_update
(
rfbClient
*
cl
,
int
x
,
int
y
,
int
w
,
int
h
)
{
TRACE_CALL
(
__func__
);
FrameInfo
*
frame
=
malloc
(
sizeof
(
FrameInfo
));
frame
->
cl
=
cl
;
frame
->
x
=
x
;
frame
->
y
=
y
;
frame
->
h
=
h
;
frame
->
w
=
w
;
g_idle_add
(
G_SOURCE_FUNC
(
remmina_plugin_vnc_rfb_updatefb
),
frame
);
}
static
void
remmina_plugin_vnc_rfb_finished
(
rfbClient
*
cl
)
__attribute__
((
unused
));
static
void
remmina_plugin_vnc_rfb_finished
(
rfbClient
*
cl
)
...
...
@@ -1163,7 +1139,7 @@ static gboolean remmina_plugin_vnc_main_loop(RemminaProtocolWidget *gp)
if
(
cl
->
buffered
)
goto
handle_buffered
;
timeout
.
tv_sec
=
5
;
timeout
.
tv_sec
=
10
;
timeout
.
tv_usec
=
0
;
FD_ZERO
(
&
fds
);
FD_SET
(
cl
->
sock
,
&
fds
);
...
...
@@ -1172,12 +1148,11 @@ static gboolean remmina_plugin_vnc_main_loop(RemminaProtocolWidget *gp)
/* Sometimes it returns <0 when opening a modal dialog in other window. Absolutely weird */
/* So we continue looping anyway */
if
(
ret
<=
0
)
{
if
(
ret
<=
0
)
return
TRUE
;
}
if
(
FD_ISSET
(
gpdata
->
vnc_event_pipe
[
0
],
&
fds
))
{
if
(
FD_ISSET
(
gpdata
->
vnc_event_pipe
[
0
],
&
fds
))
remmina_plugin_vnc_process_vnc_event
(
gp
);
}
if
(
FD_ISSET
(
cl
->
sock
,
&
fds
))
{
i
=
WaitForMessage
(
cl
,
500
);
if
(
i
<
0
)
...
...
@@ -1190,6 +1165,7 @@ handle_buffered:
return
FALSE
;
}
}
return
TRUE
;
}
...
...
@@ -1243,8 +1219,7 @@ static gboolean remmina_plugin_vnc_main(RemminaProtocolWidget *gp)
cl
->
canHandleNewFBSize
=
TRUE
;
cl
->
GetPassword
=
remmina_plugin_vnc_rfb_password
;
cl
->
GetCredential
=
remmina_plugin_vnc_rfb_credential
;
cl
->
GotFrameBufferUpdate
=
remmina_plugin_vnc_rfb_got_update
;
// cl->readTimeout = 60;
cl
->
GotFrameBufferUpdate
=
remmina_plugin_vnc_rfb_updatefb
;
/**
* @fixme we have to implement FinishedFrameBufferUpdate
* This is to know when the server has finished to send a batch of frame buffer
...
...
@@ -1255,7 +1230,6 @@ static gboolean remmina_plugin_vnc_main(RemminaProtocolWidget *gp)
* @fixme we have to implement HandleKeyboardLedState
* cl->HandleKeyboardLedState = remmina_plugin_vnc_rfb_led_state
*/
cl
->
FinishedFrameBufferUpdate
=
remmina_plugin_vnc_rfb_finished
;
cl
->
HandleKeyboardLedState
=
remmina_plugin_vnc_rfb_led_state
;
cl
->
GotXCutText
=
(
remmina_plugin_service
->
file_get_int
(
remminafile
,
"disableclipboard"
,
FALSE
)
?
...
...
This diff is collapsed.
Click to expand it.
plugins/vnc/vnc_plugin.h
+
0
−
10
View file @
5c0c16ca
...
...
@@ -34,8 +34,6 @@
#pragma once
#include
"common/remmina_plugin.h"
#include
<rfb/rfbclient.h>
#ifndef __PLUGIN_CONFIG_H
#define __PLUGIN_CONFIG_H
...
...
@@ -121,14 +119,6 @@ typedef struct _RemminaPluginVncData {
}
RemminaPluginVncData
;
typedef
struct
_FrameInfo
{
rfbClient
*
cl
;
int
x
;
int
y
;
int
w
;
int
h
;
}
FrameInfo
;
enum
{
REMMINA_PLUGIN_VNC_EVENT_KEY
,
REMMINA_PLUGIN_VNC_EVENT_POINTER
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment