summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Venhoda <lvenhoda@redhat.com>2016-08-11 18:00:29 +0200
committerLukas Venhoda <lvenhoda@redhat.com>2016-10-07 15:58:27 +0200
commit9a55771bc58a9383c89b5d6c85dc537209f47b23 (patch)
tree9550770db322881de084529b9df983fd839dfa5c
parentd309a277a4d7e70f8f34bb11ddc80c1a1ead3463 (diff)
seamless-mode: changed GdkRectangle to VDAgentSeamlessModeWindowseamless-mode
-rw-r--r--src/channel-main.c14
-rw-r--r--src/spice-widget.c24
2 files changed, 20 insertions, 18 deletions
diff --git a/src/channel-main.c b/src/channel-main.c
index 0cfb31f..055e6aa 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -2070,15 +2070,15 @@ static void main_agent_handle_msg(SpiceChannel *channel,
c->seamless_mode_list = NULL;
for (i = 0; i < list->num_of_windows; i++) {
- GdkRectangle *r;
+ VDAgentSeamlessModeWindow *win;
- r = g_new0(GdkRectangle, 1);
- r->x = list->windows[i].x;
- r->y = list->windows[i].y;
- r->width = list->windows[i].w;
- r->height = list->windows[i].h;
+ win = g_new0(VDAgentSeamlessModeWindow, 1);
+ win->x = list->windows[i].x;
+ win->y = list->windows[i].y;
+ win->w = list->windows[i].w;
+ win->h = list->windows[i].h;
- c->seamless_mode_list = g_list_append(c->seamless_mode_list, r);
+ c->seamless_mode_list = g_list_append(c->seamless_mode_list, win);
}
g_mutex_unlock(&self->priv->seamless_mode_lock);
diff --git a/src/spice-widget.c b/src/spice-widget.c
index a381583..f821517 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -38,6 +38,8 @@
#endif
#endif
+#include <spice/vd_agent.h>
+
#include "spice-widget.h"
#include "spice-widget-priv.h"
#include "spice-gtk-session-priv.h"
@@ -3019,24 +3021,24 @@ void spice_display_update_seamless_mode(SpiceDisplay *display)
if (enabled && list != NULL) {
region = cairo_region_create();
for (l = list; l != NULL; l = l->next) {
- GdkRectangle rectangle;
+ VDAgentSeamlessModeWindow window;
if (d->mouse_button_down) {
GtkAllocation alloc;
gtk_widget_get_allocation(GTK_WIDGET(display), &alloc);
- rectangle.x = 0;
- rectangle.y = 0;
- rectangle.width = alloc.width;
- rectangle.height = alloc.height;
+ window.x = 0;
+ window.y = 0;
+ window.w = alloc.width;
+ window.h = alloc.height;
} else {
- GdkRectangle *r = (GdkRectangle *)l->data;
- rectangle.x = r->x - SEAMLESS_MODE_BORDER;
- rectangle.y = r->y - SEAMLESS_MODE_BORDER;
- rectangle.width = r->width + (2*SEAMLESS_MODE_BORDER);
- rectangle.height = r->height + (2*SEAMLESS_MODE_BORDER);
+ VDAgentSeamlessModeWindow *win = (VDAgentSeamlessModeWindow *)l->data;
+ window.x = win->x - SEAMLESS_MODE_BORDER;
+ window.y = win->y - SEAMLESS_MODE_BORDER;
+ window.w = win->w + (2*SEAMLESS_MODE_BORDER);
+ window.h = win->h + (2*SEAMLESS_MODE_BORDER);
}
- cairo_region_union_rectangle(region, &rectangle);
+ cairo_region_union_rectangle(region, (GdkRectangle*) &window);
}
}