summaryrefslogtreecommitdiffstats
path: root/gtk
Commit message (Collapse)AuthorAgeFilesLines
* usbredir: Check for existing usb channels after libusb initHans de Goede2012-03-141-24/+21
| | | | | | | | | | | | | | | | | | | | | | Currently trying to view a usbredir enabled vm from virt-manager causes virt-manager to crash. This crash is caused by the following happening: -virt-manager sets up the session, including connecting all the channels -a spice-gtk internal code path calls spice_usb_device_manager_get() -spice_usb_device_manager_get calls channel_new on all already connected usb channels -channel_new does: spice_usbredir_channel_set_context(SPICE_USBREDIR_CHANNEL(channel), self->priv->context); -But self->priv->context has not been set yet (so is NULL) -> segfault! This patch fixes this by moving the iterating over already connected usb channels to after the setting of self->priv->context. Note this means that the channels will no longer get checked when there is no USB_REDIR support. That is not a problem since spice_usb_device_manager_initable_init will return FALSE in that case anyways. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Use GTK_DISABLE_DEPRECATED to avoid inclusion of problematic headersMarc-André Lureau2012-03-144-0/+27
| | | | /usr/i686-w64-mingw32/sys-root/mingw/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
* Fix 'libintl_printf' is an unrecognized format functionMarc-André Lureau2012-03-141-1/+2
| | | | ../common/lz.h:18:5: error: 'libintl_printf' is an unrecognized format function type [-Werror=format]
* Remove deprecation warningsMarc-André Lureau2012-03-145-16/+31
|
* Disable -Wwrite-strings for Python bindingDaniel P. Berrange2012-03-141-1/+1
| | | | | | The code generator for the python binding generates code which throws away const-ness on strings. Disable the -Wwrite-strings warning to avoid failing on this auto-generated code.
* Replace %02hhx with %02x in UUID formatDaniel P. Berrange2012-03-131-1/+1
| | | | | Use of 'hh' in the UUID format string is not required. Furthermore it causes errors on Mingw32, where the 'hh' modifier is not supported
* Avoid 'goto' jumping over variable initializationDaniel P. Berrange2012-03-131-1/+2
| | | | | | | | When a goto statement jumps over a variable declaration with an initializer, the state of that variable is undefined. Move the declaration further up, so that the goto doesn't jump over it. This lets the compiler then warn, if the goto jump results in use of undefined values.
* Add missing includes & make some functions staticDaniel P. Berrange2012-03-134-3/+6
| | | | | | | | | A number of functions were used without prior declaration. In some cases this was due to missing include files. In other cases the functions should have just been static. Ideally this would allow -Wmissing-declarations to be enabled, but the files generated by spice_codegen.py will still trip up on this.
* Ensure all no-args methods are declared (void) not ()Daniel P. Berrange2012-03-131-1/+1
| | | | | * common/quic.c, common/rop3.c, common/sw_canvas.c, gtk/spice-client-glib-usb-acl-helper.c: s/()/(void)/
* Replace duplicated header declarationsDaniel P. Berrange2012-03-132-4/+0
| | | | | | | | | | | The usb-helper-acl.h header file duplicated some declarations already present in usb-device-manager.h The channel-display.c file declared the object init function which is already done by the GObject helper macros * gtk/channel-display.c: Remove duplicate decl of init function * gtk/usb-acl-helper.h: Remove duplicate decls
* Remove arithmetic on void* pointersDaniel P. Berrange2012-03-131-1/+1
| | | | | | | Arithmetic on void * pointers is undefined by the C standard. Convert the one case of this to use guint8 instead. * gtk/channel-main.c: s/void */guint8 */
* Fix some integer range checks which always evaluate falseDaniel P. Berrange2012-03-132-2/+2
| | | | | | | | | | | | There are some integer range checks which always evaluate false due to use of unsigned integer types. One of these would prevent detection of encoding errors from celt. The others are simply no-ops. * gtk/channel-record.c: Make 'frame_size' signed to allow detection of celt encoding errors * gtk/spicy.c: nkeys is an unsigned type, so checks for nkeys < 0 are bogus * common/pixman_utils.c: SpiceROP is an enum & thus unsigned
* Fix deprecation warning handlingDaniel P. Berrange2012-03-138-7/+15
| | | | | | | | | | | | | | | | | | Various methods are deprecated by using the G_GNUC_DEPRECATED_FOR macro. Unfortunately this macro was placed in the .c file impl, instead of the .h file decl. Thus applications building against SPICE-GTK would never see the deprecation warnings. At the same time, building SPICE-GTK itself would trigger some of the warnings preventing use of -Wdeprecated-declarations to detect use of deprecated GTK functions. The fix is in multiple parts * Replace calls to G_GNUC_DEPRECATED_FOR with SPICE_DEPRECATED_FOR * Move macros from .c to .h files * Turn SPICE_DEPRECATED_FOR into a no-op if SPICE_NO_DEPRECATED is defined * Define SPICE_NO_DEPRECATED when building
* Fix const-correctness of functions & add explicit castsDaniel P. Berrange2012-03-134-11/+11
| | | | | | | Some functions should be declared to take const char * instead of plain char *. In other places we intentionally cast away const-ness, so we should add explicit casts to stop compiler warnings
* Remove non-existant include directories from CFLAGSDaniel P. Berrange2012-03-131-2/+0
|
* Release v0.11v0.11Marc-André Lureau2012-03-081-1/+1
|
* Update since annotation for some session propertiesMarc-André Lureau2012-03-081-0/+6
|
* channel-usbredir: Handle some more usbredirhost_read_guest_data errorsHans de Goede2012-03-082-3/+23
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Do not warn when starting spicy if usbredir is disabledMarc-André Lureau2012-03-071-6/+5
|
* sasl: sasl authentication failure results in disconnectionMarc-André Lureau2012-03-071-2/+1
| | | | | | | When SASL auth failure happen, the Spice server disconnects the client. Sadly, this is not easily distinguishable from an IO error. However, since it happens during authentication phase it is better to error out an authentication error.
* sasl: lower visibility of normal debug messageMarc-André Lureau2012-03-071-2/+2
| | | | | | Those two g_critical() can happen when collecting credentials for the first time. It is not something to be warned about, but merely useful for debugging
* Fix semi-seamless migration handlingMarc-André Lureau2012-03-061-42/+25
| | | | | | SPICE_MSGC_MAIN_MIGRATE_END was dropped because the main channel was xmit_queue_blocked. When we swap the channels, we should also swap xmit_queue.
* Warn if a message is dropped (before connection or after reset)Marc-André Lureau2012-03-051-15/+20
| | | | | | Since c2ba62666beaee526e1b4288f9bd66976ce780ef messages can be ignored when a channel is reset. A warning can help explain why some messages are dropped.
* Support name & uuidMarc-André Lureau2012-03-055-1/+108
| | | | Allows a client to identify the server it is connected to.
* Add a spice-controller-dump testing toolMarc-André Lureau2012-02-293-6/+137
| | | | | By default, start a controller listener. If ran with --menu, start a foreign-menu listener.
* Add controller foreign menu supportMarc-André Lureau2012-02-296-1/+437
|
* Fix a few warnings on windows buildMarc-André Lureau2012-02-292-5/+12
|
* Allow open_fd() to be called with -1Marc-André Lureau2012-02-292-4/+14
| | | | | In this case, a valid fd will be requested via the SpiceChannel::open-fd signal.
* buildsys: Don't link glib-compat.o into libspice-client-gtk.soHans de Goede2012-02-242-1/+1
| | | | | | | | | | | | | | | | | | glib-compat.c was added to SPICE_GTK_SOURCES_COMMON since with the new SpiceUsbDeviceWidget libspice-client-gtk now also uses G_TYPE_ERROR and when compiling with an older glib this gets defined in glib-compat.o However doing this turns out to be a very BAD idea, since having glib-compat.o linked into 2 different libraries, each defining there own private spice_error_get_type, leads to the "GError" type getting registered twice with glib, which it does not like. So instead of linking glib-compat into 2 different libraries, put it only in libspice-client-glib and export spice_error_get_type from libspice-client-glib (this is ofcourse intended for libspice-client-gtk private use only). Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Fix building with policykit < 0.101Hans de Goede2012-02-241-0/+19
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Release v0.10v0.10Marc-André Lureau2012-02-231-1/+1
|
* use :glz-window-size not :glz_window_sizeMarc-André Lureau2012-02-231-1/+1
|
* usbredir: Add awareness of host/guest side filteringHans de Goede2012-02-223-4/+39
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usbredir: Add a spice_usb_device_manager_can_redirect_device functionHans de Goede2012-02-224-32/+144
| | | | | | | Add a spice_usb_device_manager_can_redirect_device function and use this in SpiceUsbDeviceWidget to check if redirection is available. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb-device-widget: Use an info_bar for error messagesHans de Goede2012-02-222-14/+79
| | | | | | | | | | | And in general gnome-hig-ify usb-device-widget: * Use spacing instead of padding so that there is no padding at the outside/border of the widget, allowing the user to control the border size. * Use multiple of 6 as spacing / indentation values * Show the label left justified and bold, show the checkboxes (and the info bar) 12 pixels indented from the label Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usbredir: Treat the user cancelling the policykit dialog as a cancelHans de Goede2012-02-222-3/+15
| | | | | | | Rather then treating it as any other error. This avoids showing an error dialog after the user pressed cancel in the policykit dialog. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usbredir: Add device rejected errorsHans de Goede2012-02-226-3/+117
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usbredir: Shrink the usb device selection dialog when devices are unpluggedHans de Goede2012-02-201-0/+9
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usbredir: make channel lifetime equal to session lifetimeHans de Goede2012-02-205-75/+120
|
* usbutil: Add support for getting strings from usb.idsHans de Goede2012-02-202-0/+151
| | | | | | | | Unfortunately not all device makers go to the "trouble" of adding device identification strings to a device's descriptors. This patch makes spice-gtk translate vid/pid into strings if the device lacks the strings. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usbutil: Add a spice_usb_util_get_device_strings helper functionHans de Goede2012-02-203-28/+50
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: Move various helper functions into usbutil.[c,h]Hans de Goede2012-02-207-83/+149
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add controller ENABLE_SMARTCARD messageMarc-André Lureau2012-02-171-0/+4
|
* widget: fix mouse wrapping failing when the window is outsideMarc-André Lureau2012-02-131-33/+14
| | | | | | | | | | | | | Use a anchor mouse position after every move, similar to spicec to avoid reaching transparent border on the screen. We try to move to the center of the screen, but gdk_display_warp_pointer () will move the cursor within the grabbed window (so it still receives mouse events even on Windows) Tested with Linux and Windows clients. Fixes bug: https://bugs.freedesktop.org/show_bug.cgi?id=45595
* Set keepalive on channel socketNicolas Prochazka2012-02-132-5/+8
| | | | | | | Without keepalive on each connection(channel), channel is destroyed after ip_conntrack_tcp_timeout_established timeout. https://bugs.freedesktop.org/show_bug.cgi?id=45899
* Use an openssl BIO stream using GSocketMarc-André Lureau2012-02-126-6/+152
| | | | | | | | | | | | | | | Until now, the BIO object used by openssl to read & write was using the socket fd directly. But the mainloop integration is done with GSocket. On Windows, the read/write events are cleared after g_socket_send()/receive() with private function _win32_unset_event_mask. If the glib functions aren't cleared, glib source will keep notifying of data available in or out. On Windows, this causes a busy loop when doing SSL_read() for example (glib POLL_IN data condition is reached and SSL_read() return needs data). Instead, openssl should read/write using GSocket methods.
* Don't warn if setsockopt(TCP_NDELAY) fails with errno==ENOTSUPDaniel P. Berrange2012-02-091-1/+1
| | | | | | If connecting to a UNIX domain socket, it is expected that the setsockopt(TCP_NDELAY) call will fail with errno=ENOTSUP, so don't issue a warning in that case
* Lower or silence some harmless debug messagesMarc-André Lureau2012-02-032-5/+3
|
* widget: allow defining a zoom-levelMarc-André Lureau2012-02-012-4/+34
| | | | | | | | | | | | Add a "zoom-level" property. Maintain the given scaling ratio when scaling is enabled. If scaling is disabled, this property is ignored. For example at 50%, this allows to fit a 640x480 desktop in a 320x240 widget and when resizing it to 640x512 to have a 1280x1024 desktop. (this feature is required by virt-viewer)
* widget: factor out update_size_request() and scaling_updated()Marc-André Lureau2012-02-011-26/+37
| | | | | | | | | | | | | | Factor out and simplify a little the code to allow easier addition of zoom-level property. The "set_display" parameter for recalc_geometry() seems to be useless, since the code was apparently trying to set the guest to the given d->width and d->height, but reseting it to the current value, which cancel the effect. We should fix the problem of setting the guest resolution at display-init time in a follow-up patch since it probably never worked with spice-gtk.