summaryrefslogtreecommitdiff
path: root/gtk
AgeCommit message (Collapse)AuthorFilesLines
2012-02-13widget: fix mouse wrapping failing when the window is outsideMarc-André Lureau1-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
2012-02-13Set keepalive on channel socketNicolas Prochazka2-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
2012-02-12Use an openssl BIO stream using GSocketMarc-André Lureau6-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.
2012-02-09Don't warn if setsockopt(TCP_NDELAY) fails with errno==ENOTSUPDaniel P. Berrange1-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
2012-02-03Lower or silence some harmless debug messagesMarc-André Lureau2-5/+3
2012-02-01widget: allow defining a zoom-levelMarc-André Lureau2-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)
2012-02-01widget: factor out update_size_request() and scaling_updated()Marc-André Lureau1-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.
2012-01-31Report the scaling is 1.0 if the widget isn't realized yetMarc-André Lureau1-1/+1
To avoid a few warnings in some corner cases.
2012-01-31Do not grab/release the clipboard on guest without clipboard supportMarc-André Lureau4-2/+30
Add an agent capability check before calling those functions from gtk-session. Avoid extra warnings.
2012-01-31Release 0.9v0.9Hans de Goede1-1/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-31Add a USB device selection widgetHans de Goede6-9/+536
This patch adds a SpiceUsbDeviceWidget which apps can use to easily add an UI to select USB devices to redirect (or unredirect). See spicy for an example usage. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-30usb-device-manager: Cleanup USB manufacturer and product stringsHans de Goede1-0/+13
The strings returned by devices sometimes can benefit from some clean-up. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-28spice-client-glib-usb-acl-helper: Fix mention of Lesser in license headerHans de Goede1-1/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-28spice-client-glib-usb-acl-helper: ensure we set the acl on a chardevHans de Goede1-1/+15
Josh Bressers has been so kind to review the usb-acl-helper for possible security issues. One of his recomendations was to ensure that the file we're setting the acl on is a chardev. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-28spice-client-glib-usb-acl-helper: Fix memleakHans de Goede1-0/+1
Not really important given the short livedness of the process, but still should be fixed. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-28configure: Add an option for building the acl helper as PIEHans de Goede1-0/+2
Josh Bressers has been so kind to review the usb-acl-helper for possible security issues. One of his recomendations was to harden the usb-acl-helper by building it as a Position Independent Executable. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-24Autodetect usbredir and PolicyKit by defaultChristophe Fergeau1-6/+2
Currently, usb redirection and policykit are enabled by default, and configure will error out if the required dependencies cannot be found. This commit changes the default behaviour, by default usb redirection/policykit support is automatically enabled/disabled depending on the availability of the needed dependencies. Passing --enable-usbredir will error out if the dependencies for usb redirection cannot be found, ditto for policykit. This should make things nicer for people running configure or autogen.sh with no argument.
2012-01-24Add command line options for setting the cache size and the glz window sizeYonit Halperin1-0/+10
This options will help us tune and find the optimal values.
2012-01-24Change the setting of the images cache size and the glz window sizeYonit Halperin5-10/+97
Set the default sizes to be the same as in the old linux spice client. cache_size=20M pixels (instead of 32M), window_size=8M pixels for a 64MB dev ram (instead of 16M pixels).
2012-01-23controller: use a controller listener abstractionMarc-André Lureau5-47/+209
Add a wrapper file for named pipe and socket listener, so we can release tarball with code compatible with windows and unix.
2012-01-18gtk-session: weak reference the session for clipboard cbMarc-André Lureau1-8/+50
It seems Gtk is lacking a way to cancel a gtk_clipboard_request_*(). Although it seems like gtk_selection_remove_all() would solve that problem, it will have nasty effect of destroying other pending requests from others.. Let's make use of an extra weak reference object that will be nulled when the session is destroyed. This should help solving the follwing bug: https://bugzilla.redhat.com/show_bug.cgi?id=743773
2012-01-18gtk-session: ignore destroy of outdated main channelMarc-André Lureau1-1/+2
This solves clipboard sharing not working with a password protected server, since new main channel are created for each connection attempt.
2012-01-17build: allow out-of-tree building of python bindingsMarc-André Lureau1-2/+4
2012-01-17spice-channel: Allow calling spice_msg_out_send from any contextHans de Goede2-14/+40
spice_msg_out can be not only called from system context and usb event handling thread context, but also from co-routine context. Calling from co-routine context happens when a response gets send synchronously from the handle_msg handler for a certain received packet. This happens with certain usbredir commands. This triggers the following assert in the coroutine code: "GSpice-CRITICAL **: g_coroutine_wakeup: assertion `coroutine != g_coroutine_self()' failed" This patch fixes this by making spice_msg_out_send callable from any context and at the same time changing the code to not do unnecessary wakeups. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-16gtk/display: Get rid of old FSF address in copyright headersHans de Goede13-52/+26
rpmlint pointed this out while I was checking the new spice-gtk-0.8 package for Fedora. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-16Handle spice_audio_new failuresChristophe Fergeau1-0/+2
spice_audio_new can return a NULL pointer when there's a failure during the initialization of the audio system. When this happens, we shouldn't keep initializing the spice audio channel as if nothing happened, but just stop the connection. This can be tested by forcing the "self" variable to NULL in spice_audio_new This should fix https://bugzilla.redhat.com/show_bug.cgi?id=772118
2012-01-15Release 0.8v0.8Marc-André Lureau1-2/+2
2012-01-15Send grab-key signal even in mouse client modeMarc-André Lureau1-6/+9
2012-01-15usbredir: Add support for filtering out devices from auto-redirectionHans de Goede2-1/+75
Note this patch adds a default filter filtering out HID devices, since redirecting ie a mouse plugged into a laptop is usually not what the user wants. Also sometimes usb keyboards/mice may experience a glitch causing them to temporarily drop of the bus. If this happens when the spice-client has focussed it used to redirect them to the vm when they re-appeared, not good! Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-15Fix compilation on mingw/windowsMarc-André Lureau2-4/+4
2012-01-15Warn if windows keyboard hook failedMarc-André Lureau1-4/+8
2012-01-15Don't release images after the tail gapMarc-André Lureau1-12/+24
This fix a hang on an image lookup that has already been remved. It only happens in multihead, when stressing a bit the displays. The decoder assumed that the last added images is the tail of the window. However, there are "gaps" in the window that will be filled by other channels. Instead of taking the last added image as the current up to date tail, let's take the reference to the last image before the first gap as the up to date tail, and release from there. The spicec code does things differently, perhaps it needs slightly less memory at the cost of added complexity by maintaining list of missing images and much more conditions/synchronization.
2012-01-15Grab focus before grabing keyboardMarc-André Lureau1-1/+1
Make sure the display has the focus before grabing the keyboard for the application.
2012-01-12wait for cached images that haven't been added to the cache yetMarc-André Lureau1-22/+44
https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Log if condition wait got cancelledMarc-André Lureau3-6/+10
https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Make g_coroutine_condition_wait() cancellableMarc-André Lureau7-27/+67
https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Remove the non-interruptible version g_io_wait()Marc-André Lureau5-45/+42
Use the common g_coroutine_socket_wait() https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Create a GCoroutine, get rid of wait_queueMarc-André Lureau4-22/+23
https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Hide g_condition_wait_source, use GLib style conventionMarc-André Lureau2-16/+16
https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Lower connection error from warning to debug, it's normal to failMarc-André Lureau1-1/+1
We try several connections, so it's normal to fail for some. No need to warn. https://bugs.freedesktop.org/show_bug.cgi?id=44570
2012-01-12Lower our gtk+ requirement to 2.18, as we claimMarc-André Lureau1-2/+12
Needed to build on RHEL6
2012-01-12Lower polkit requirement to 0.96Marc-André Lureau1-0/+15
2012-01-12Lower our glib requirement to 2.22, as we claimMarc-André Lureau8-0/+99
Required to build on RHEL, even upcoming 6.3
2012-01-11migration: swap serials and mini header support when swapping peers.Yonit Halperin1-0/+9
2012-01-11Add support for SPICE_COMMON_CAP_MINI_HEADERYonit Halperin3-41/+177
Don't send/receive serial and sub_list when the server supports the above cap.
2012-01-10spice-channel: support SPICE_MSG_LISTYonit Halperin1-1/+5
2012-01-08Wait for channels before invalidating imagesMarc-André Lureau1-0/+2
https://bugs.freedesktop.org/show_bug.cgi?id=44179
2012-01-08Implement SPICE_MSG_WAIT_FOR_CHANNELSMarc-André Lureau5-9/+45
https://bugs.freedesktop.org/show_bug.cgi?id=44179
2012-01-07add optional format string to spice_usb_device_get_description()Marc-André Lureau2-15/+26
2012-01-07build: oops, fix previous commitMarc-André Lureau1-0/+1