mirror of
git://git.proxmox.com/git/spiceterm.git
synced 2025-08-30 13:48:07 +00:00
code cleanup
This commit is contained in:
parent
ded68f4412
commit
5cba579072
24
spiceterm.c
24
spiceterm.c
@ -1263,6 +1263,20 @@ spiceterm_set_xcut_text (char* str, int len, struct _rfbClientRec* cl)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
spiceterm_update_watch_mask(spiceTerm *vt, gboolean writable)
|
||||||
|
{
|
||||||
|
g_assert(vt != NULL);
|
||||||
|
|
||||||
|
int mask = SPICE_WATCH_EVENT_READ;
|
||||||
|
|
||||||
|
if (writable) {
|
||||||
|
mask |= SPICE_WATCH_EVENT_WRITE;
|
||||||
|
}
|
||||||
|
|
||||||
|
vt->screen->core->watch_update_mask(vt->screen->mwatch, mask);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mouse_report(spiceTerm *vt, int butt, int mrx, int mry)
|
mouse_report(spiceTerm *vt, int butt, int mrx, int mry)
|
||||||
{
|
{
|
||||||
@ -1273,10 +1287,7 @@ mouse_report(spiceTerm *vt, int butt, int mrx, int mry)
|
|||||||
|
|
||||||
spiceterm_respond_esc(vt, buf);
|
spiceterm_respond_esc(vt, buf);
|
||||||
|
|
||||||
// fixme
|
spiceterm_update_watch_mask(vt, TRUE);
|
||||||
vt->screen->core->watch_update_mask(vt->screen->mwatch,
|
|
||||||
SPICE_WATCH_EVENT_READ|SPICE_WATCH_EVENT_WRITE);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1623,8 +1634,7 @@ ret:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vt->screen->core->watch_update_mask(vt->screen->mwatch,
|
spiceterm_update_watch_mask(vt, TRUE);
|
||||||
SPICE_WATCH_EVENT_READ|SPICE_WATCH_EVENT_WRITE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t
|
static uint8_t
|
||||||
@ -1800,7 +1810,7 @@ master_watch(int master, int event, void *opaque)
|
|||||||
write (master, vt->ibuf, vt->ibuf_count);
|
write (master, vt->ibuf, vt->ibuf_count);
|
||||||
vt->ibuf_count = 0; // fixme: what if not all data written
|
vt->ibuf_count = 0; // fixme: what if not all data written
|
||||||
}
|
}
|
||||||
vt->screen->core->watch_update_mask(vt->screen->mwatch, SPICE_WATCH_EVENT_READ);
|
spiceterm_update_watch_mask(vt, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user