summaryrefslogtreecommitdiff
path: root/gtk/spice-widget-cairo.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-04Draw server-side pointer when the session has the grabMarc-André Lureau1-1/+3
If there are several SpiceDisplay widgets, only one will have the grab, but the pointer may need to be drawn on another of the displays. We thus need to track the grab status on SpiceSession, not just per-display. This solves the following bug: https://bugs.freedesktop.org/show_bug.cgi?id=38024
2014-10-27gtk: hide cursor when ungrabbedMarc-André Lureau1-1/+1
Let's avoid confusion of multiple pointers visible on the client desktop: hide the guest pointer if the spice client doesn't have the grab, display it again when the grab is taken back.
2014-07-23Don't use _GET_PRIVATE all the timeFabiano Fidêncio1-4/+4
Let's make use of the priv members in the structs, which are much much faster. Also, to keep the type-safety, the SPICE_IS_* macros were added in the public methods affected by this patch. Patch based on an old patch from Alexander Larsson (alexl@redhat.com).
2014-04-15Gather gtk+ compatibility code in a single fileChristophe Fergeau1-17/+1
There are gtk+ version checks in several source files to add compatibility implementations of gtk3 functions not available in gtk2. This commit gathers all of them in a gtk-compat.h header, similar to what is done for glib-compat.h
2014-03-13Make sure config.h is included first in all .c filesChristophe Fergeau1-4/+2
This is recommended by autoconf documentation http://nondot.org/sabre/Mirrored/autoconf-2.12/autoconf_3.html#SEC15 and some #defines in config.h can change what happens in system headers, so config.h has to be included first. The only file which does not get this treatment is gtk/spice-client-gtk-module.c as this breaks the build on gtk+2: CC SpiceClientGtk_la-spice-client-gtk-module.lo In file included from /usr/include/python2.7/pyconfig.h:6:0, from /usr/include/python2.7/Python.h:8, from /usr/include/pygtk-2.0/pygobject.h:5, from spice-client-gtk-module.c:20: /usr/include/python2.7/pyconfig-64.h:1182:0: error: "_POSIX_C_SOURCE" redefined [-Werror] #define _POSIX_C_SOURCE 200112L ^ In file included from /usr/include/limits.h:25:0, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:168, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/syslimits.h:7, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:34, from /usr/lib64/glib-2.0/include/glibconfig.h:11, from /usr/include/glib-2.0/glib/gtypes.h:34, from /usr/include/glib-2.0/glib/galloca.h:34, from /usr/include/glib-2.0/glib.h:32, from /usr/include/glib-2.0/gobject/gbinding.h:30, from /usr/include/glib-2.0/glib-object.h:25, from ./glib-compat.h:24, from ../config.h:201, from spice-client-gtk-module.c:18: /usr/include/features.h:228:0: note: this is the location of the previous definition # define _POSIX_C_SOURCE 200809L ^ cc1: all warnings being treated as errors
2013-04-05cairo: fix reference leakMarc-André Lureau1-1/+1
cairo_surface_finish() doesn't remove the reference, cairo_surface_destroy() does and will call surface_finish(). Thanks to Uli Schlachter for noticing that in: https://bugs.freedesktop.org/show_bug.cgi?id=61876
2012-11-12widget: don't redraw server mouse until movedMarc-André Lureau1-0/+1
When switching between client mode and server mode, the pointer is being invalidated on each display and the cursor will end up being drawn on both. Since there is no information on which display the cursor is supposed to be until a move is received, hide the cursor until it actually moves.
2012-09-03Fix region leak in gtk2 compat defines0.13.29Alexander Larsson1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=54277
2012-08-31Make region code build with gtk2Alexander Larsson1-0/+8
https://bugs.freedesktop.org/show_bug.cgi?id=54277
2012-08-31Fix X11 backendMarc-André Lureau1-1/+2
The X11 backend allocates the "image" with X11 and needs the widget to be realized before calling spicex_image_create(). https://bugs.freedesktop.org/show_bug.cgi?id=54310
2012-08-31Fix flickering regression on some systemsAlexander Larsson1-7/+18
For some reason the way we remove the "inner" area when clearing the background doesn't work on one computer. I don't really know why, but the current approach does seems a little fragile. This replaces it with a solid region operation that works on all my machines. https://bugs.freedesktop.org/show_bug.cgi?id=54277
2012-08-30Centralize scaling handlingAlexander Larsson1-68/+29
This moves all the handling of scaling calculations and positioning of the display inside the widget into one place. This makes it easier to later change how scaling works. Also, the new scaling only support aspect-ratio-keeping scaling. https://bugs.freedesktop.org/show_bug.cgi?id=54277
2012-07-16display: learn to restrict display to an areaMarc-André Lureau1-12/+25
Each spice widget can now restrict the area of the primary surface they show and interact with by setting the private area member. A nice clean-up would be to seperate an area object that would deal with clipping, input translation and color conversion, but the resulting code would be similar anyway
2012-03-19Hide cursor when it is on a different screen in server modeMarc-André Lureau1-1/+2
When the cursor shape is changed, all the cursor channels are updated. The current code assumed that the "set" of the shape should show the cursor, but it should stay hidden instead. Also, when the cursor is hidden, we must invalidate its current region to redraw display. Fix: https://bugzilla.redhat.com/show_bug.cgi?id=804308
2011-12-09Draw mouse with cairo in server modeMarc-André Lureau1-3/+11
2011-12-09Use the border margin from recalc_geometry()Marc-André Lureau1-8/+2
2011-07-18build: fix introspection warningsMarc-André Lureau1-5/+5
The only one left is related to GOptionGroup, which is not boxed.
2011-07-06gtk: remove surface cache, why do we need it?Marc-André Lureau1-49/+2
2011-01-14Fix rendering with GTK3Daniel P. Berrange1-4/+15
In GTK2 world there is an expose_event handler, so a choice of the X11 or cairo backends can be used. In GTK3 world only the draw_event exists, which must use cairo
2011-01-09gtk: build x11 keyboard code with cairo backendv0.4Marc-André Lureau1-6/+0
2010-12-20gtk: improve 16bits color code, fix rendering glitchesMarc-André Lureau1-3/+1
2010-12-20gtk: fix scaling for x11 backendMarc-André Lureau1-0/+7
2010-12-20gtk: fix scaling line artifactsMarc-André Lureau1-4/+4
2010-12-17gtk: wip scaling supportMarc-André Lureau1-2/+22
2010-12-17gtk: add cairo display backendMarc-André Lureau1-4/+155
2010-12-17build: basic windows build supportMarc-André Lureau1-0/+44