summaryrefslogtreecommitdiffstats
path: root/client/platform.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiple printf format problemsDaniel P. Berrange2012-04-251-1/+1
| | | | | | | | | | | | | | | | All printf var-args style methods should be annotation with their format. All format strings must be const strings. * client/application.cpp, client/cmd_line_parser.cpp, client/hot_keys.cpp: Avoid non-const format * client/client_net_socket.cpp: Fix broken format specifier * client/red_peer.cpp: Fix missing format specifier * client/platform.h: Add SPICE_GNUC_PRINTF annotation to term_printf * client/utils.h: Add SPICE_GNUC_PRINTF annotation to string_printf * server/glz_encoder_config.h, server/red_worker.c: Add SPICE_GNUC_PRINTF annotation to warning callbacks Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Remove trailing blank linesDaniel P. Berrange2012-01-131-1/+0
| | | | Remove any blank lines at the end of all source files
* spicec: Move setting of clipboard_owner to guest to platform codeHans de Goede2010-10-061-0/+2
| | | | | | | | | | | | | | Atleast under x11 there is a race condition when setting the clipboard owner to guest from the RedClient code rather then doing it in Platform. After the XSetSelectionOwner() in Platform::on_clipboard_grab(), which runs from the main message loop thread, the x11 event thread can receive a SelectionRequest event from another x11 app, before the RedClient code has set the clipboard owner, which will trigger the owner != guest check in the SelectionRequest event handling code. By moving the setting of the owner in to Platform::on_clipboard_grab() it gets protected by the clipboard lock, which closes this tiny race.
* Keep track of clipboard ownershipHans de Goede2010-10-021-0/+9
| | | | | | | | | | | | | Given that all clipboard handling is async, it is possible to for example receive a request for clipboard data from the agent while the client no longer owns the clipboard (ie a VD_AGENT_CLIPBOARD_RELEASE message is in transit to the agent). Thus it is necessary to keep track of our notion of clipboard ownership and check received clipboard messages (both from other apps on the client machine and from the agent) to see if they match our notion and if not drop, or in case were a counter message is expected nack the clipboard message.
* Rename platform clipboard handling functionsHans de Goede2010-10-021-4/+4
| | | | | | | | | | Rename the 4 platform clipboard functions which get called upon receival of an agent clipboard message to on_clipboard_* The old set_clipboard_* names were confusing as they suggest being a class property setter (like set_event_listener) rather then event handler, and set_clipboard_owner was causing a name conflict with the next patch in this series.
* Change VD_AGENT_CLIPBOARD_GRAB to an array of typesHans de Goede2010-10-011-2/+2
| | | | | | | A clipboard owner can indicate that it can supply the data the clipboard owns in multiple formats, so make the data passed with a VD_AGENT_CLIPBOARD_GRAB message an array of types rather then a single type.
* client: support clipboard/selection-owner model (v2)Arnon Gilboa2010-10-011-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | -includes most of Hans' review fixes (up to the SelectionRequest comment [4]) & X11 wips sent by Hans (10x!) -use the VD_AGENT_CLIPBOARD_* types in the platform code -add ifs for VD_AGENT_CAP_CLIPBOARD_BY_DEMAND in both sides -support the GRAB/REQUEST/DATA/RELEASE verbs in both ways -pasting clipboard data is now "only-by-demand" from both sides (client and agent), whose behavior is symmetric -client and agent don't read or send the contents of the clipboard unnecessarily (e.g. copy, internal paste, repeating paste, focus change) -set client as clipboard listener instead of application -add atexit(cleanup) in win platform linux: -instead of clipboard atom selection instead of XA_PRIMARY -enable USE_XRANDR_1_2 and support clipboard in MultyMonScreen -send utf8 with no null termination, remove ++size -add xfixes in configure.ac & Makefile.am windows: -bonus: support image cut & paste, currently only on windows not done yet: -clipboards formats are still uint32_t, not mime types stores as strings -platform_win is still used, not the root window -not replaced the ugly windows CF_DIB in agent/winclient
* client: add clipboard supportArnon Gilboa2010-07-191-0/+17
| | | | | | | | * windows - untested * linux - small strings both ways, large implemented differently: * client to guest - support INCR * guest to client - we supply a single possibly very large property * requires server changes in next patch to work with spice-vmc
* fix typo DisplayModeListner -> DisplayModeListenerAlon Levy2010-07-191-4/+4
|
* Relicense everything from GPL to LGPL 2.1+Alexander Larsson2010-04-131-9/+9
|
* client: add Platform::term_printfYaniv Kamay2010-01-111-0/+1
| | | | | | Platform::term_printf is a variant of printf that on windows dynamically opens console in order to have visible output during command line processing.
* client: move log file to spicec appdata dirYaniv Kamay2010-01-111-2/+2
|
* server,client: server authentication for secured channels.Yonit Halperin2010-01-111-0/+2
| | | | | | | | | 3 available mechanisms: by public key, by host name, and by certificate subject name. In the former method, chain of trust verification is not performed. The CA certificate files are looked for under <spice-config-dir>/spice_truststore.pem windows <spice-config-dir>=%APPDATA%\spicec\ linux <spice-config-dir>=$HOME/.spicec/
* spice: position mouse in primary monitor center after full screen toggleArnon Gilboa2009-12-301-0/+2
| | | | | | | -move _focused & _pointer_in_window from RedWindow to RedWindow_p's -move shadow focus & cursor handling to sync() -add reset_cursor_pos() to Platform -Monitor set_mode()/restore() use virtual do_set_mode()/do_restore()
* client: add GUI infrastructure + functional login dialogYaniv Kamay2009-12-281-0/+1
|
* spice: add [pid:tid] to log linesArnon Gilboa2009-11-181-0/+2
|
* spice: on toggle_full_screen, generate on_key_down if shift is still pressedArnon Gilboa2009-11-181-1/+19
|
* spice client: remove timer interface from platform - use Application (via ↵Yonit Halperin2009-11-091-13/+0
| | | | ProcessLoop interface).
* spice client: cosmetic changesYonit Halperin2009-11-091-5/+4
|
* spice client: Transfer all channels run loop from EventsLoop class to ↵Yonit Halperin2009-11-091-5/+5
| | | | ProcessLoop class
* spice client: creating a general process loop.Yonit Halperin2009-11-091-12/+19
| | | | | | | | | | | The process loop is responsible for: 1) waiting for events 2) timers 3) events queue for actions that should be performed in the context of the thread and are pushed from other threads. The benefits: 1) remove duplicity: till now, there was one implementaion of events loop for the channels and another one for the main thread. 2) timers can be executed on each thread and not only on the main thread. 3) events can be pushed to each thread and not only to the main thread. In this commit, only the main thread was modified to use the new process loop.
* fresh startYaniv Kamay2009-10-141-0/+158