Commit Graph

30 Commits

Author SHA1 Message Date
Daniel P. Berrange
02d56750bd Remove trailing blank lines
Remove any blank lines at the end of all source files
2012-01-13 18:11:59 +02:00
Uri Lublin
8b797180ee client: screen: fix typo _forec_update_timer
sed -i 's/_forec_update_timer/_force_update_timer/' screen.cpp screen.h
2011-12-22 11:44:53 +02:00
Uri Lublin
a3a3b34a46 client: RedScreen::RedScreen: fix initialization order of _menu_needs_update
Related to a91b0b3ff7
2011-12-22 11:41:23 +02:00
Uri Lublin
a91b0b3ff7 client: update menu if needed when exiting full-screen mode (#758260) 2011-12-20 18:44:05 +02:00
Marc-André Lureau
5b042031b0 spelling: s/cupture/capture 2011-12-14 00:27:17 +01:00
Christophe Fergeau
a20e6bb012 fix typos
applicaion => application
Attache => Attach
Detache => Detach
_layes => _layers
2011-09-15 10:24:45 +02:00
Yonit Halperin
419222f0f3 client: fix endless recursion in rearrange_monitors, RHBZ #692976
The endless recursion happens due to Application::prepare_monitors calling RedScreen::resize
calling Application::rearrange_monitors calling Application::prepare_monitors

I changed RedScreen::resize not to call rearrange_monitors. Instead,
the monitor should be configured correctly from Application, before
calling resize.
In addition, I made some cleanups to allow reusing rearrange_monitors code.
2011-07-21 12:43:37 +03:00
Yonit Halperin
8131249d6c client: fix for redundant shift+f11 RHBZ #674532
After shift+F11, both in Windows 7 and xp clients, WM_KEYUP events were missing for
SHIFT and F11. For F11 it was less important since unpress_all was preformed for all keys.
However, we perform sync for all the keyboard modifiers and the GetKeyboardState returns "down" for shift.
In windows7 client, we sometimes received afterwards a F11 KEYDOWN event repetition, and this caused SHIFT+F11 to be called again.
Not performing hiding of the windows while changing client resolutions, solved the problem of missing events, and I don't see any difference
in how spice looks while toggling to full screen.
Using GetAsyncKeyState, returns "UP" for shift in windows 7, and helps avoid performing shift+f11 again, if there is an F11 repetition
before we receive the KEYUP event for shift.
2011-06-14 10:15:41 +03:00
Christophe Fergeau
e0c20725c8 s/USE_OGL/USE_OPENGL
This is more explicit about what it does, and not much longer
2011-05-03 14:44:11 +02:00
Christophe Fergeau
78c1465ed3 add #include <config.h> to all source files
When using config.h, it must be the very first include in all source
files since it contains #define that may change the compilation process
(eg libc structure layout changes when it's used to enable large file
support on 32 bit x86 archs). This commit adds it at the beginning
of all .c and .cpp files
2011-05-03 14:44:10 +02:00
Hans de Goede
fa2e125ec4 client: Interpret the title control message as utf8 instead of unicode16
The activex browser plugin is sending unicode16 text, where as the
xpi one is sending utf8 text. After discussing this on irc we've decided
that utf8 is what we want to use. So the client (this patch), and the
activex will be changed to expect resp. send utf8 text as the title.
2010-10-21 13:19:51 +02:00
Arnon Gilboa
e50c565b44 spicec: extract RedScreen::update_menu() 2010-10-17 11:45:13 +02:00
Alexander Larsson
cfc1e95bda Make opengl optional, disabled by default
The OpenGL renderer isn't really useful right now, its not quite up
to date, its not really faster than software and it only supports a limited
subset of drivers. So, lets disable it for now.

Long term opengl rendering of the 2d part of spice is important if we want
to combine 2d and 3d rendering (say if spice adds opengl support in the
protocol). But until then this is isn't useful for normal use.
2010-06-21 14:50:18 +02:00
Yonit Halperin
263646a1f7 JPEG support: introducing jpeg encoding for spice bitmaps 2010-06-09 11:40:25 +02:00
Alexander Larsson
ae40f270cf Remove all mentions of "cairo" from the code
The command line option is renamed from "cairo" to "sw", and
similarly all filenames and types from Cairo to Sw (and similar).
2010-05-03 12:38:02 +02:00
Alexander Larsson
774e5bd36f Client: Support pixmap format conversion in copy_pixels
In order to be able to support 16bit canvases on 32bit screens and 32bit
canvases on 16bit screens we need to handle format conversion when drawing
RedPixmaps.

The way this works now for X11 is that we only have one PIXELS_SOURCE_TYPE
for pixmaps, which always has a pixman_image_t for the data, but additionally
it has an XImage (shared mem or not) if the screen the pixmap was created
for (i.e. an explicit one or the default screen) has the same format as
the pixmap.

When we draw a pixmap on a drawable we have two variants. If the pixmap
has a XImage and it matches the format of the target drawable then we
just X(Shm)PutImage it to the drawable. If the formats differ, then we
create a temporary XImage and convert into that before drawing it to
the screen.

Right now this is a bit inefficient, because we always allocate a new
temporary image when converting. We want to add some caching here, but
at least this lets things work again.
2010-04-23 16:39:13 +02:00
Alexander Larsson
ecc51c6478 Create screen composit area in same format as window
This way we don't have to convert when drawing to it, or drawing it to
the dc.
2010-04-23 16:36:35 +02:00
Alexander Larsson
98d91203c5 Make client canvas and pixmaps handle more formats and simplify
We now support 16bit format pixmaps as well as the old ones. Including
both 555 and 565 modes.

We drop the palette argument for pixmap construction as it was only
used for black/white anyway.

Canvas creation is simplified so that there is no separate set_mode
state. Canvases are already created in the right mode and never change.
2010-04-23 16:36:35 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
98dde80ed3 Replace custom region implementation with pixman_region32_t
pixman_region32_t is an efficient well tested region implementation (its
the one used in X) that we already depend on via pixman and use in
some places. No need to have a custom region implementation.
2010-02-23 22:52:06 +01:00
Alexander Larsson
1f51697852 Rename symbols that were changed in spice-protocol
This is an automatic change using:
$ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
$ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-02-04 18:49:00 +01:00
Yaniv Kamay
cced1b1cff client: improve screen resizing
Screen now have to modes locked and unlocked.

In unlocked mode, the application can change screen size and so
reduce resolution changing. The application can also choose to
change window size while not in full screen mode.

In locked mode the application must ewtain locker screen size
setting.
2009-12-28 12:35:32 +02:00
Yaniv Kamay
941ba9bf5c client: restore mouse capture state after screen resizing 2009-12-28 12:35:14 +02:00
Yaniv Kamay
6c5966d8ed client: KeyHandler now receive unicode char event in addition to RedKey events 2009-11-30 18:22:13 +02:00
Yaniv Kamay
3b51087b36 client: interactive screen layer 2009-11-30 18:03:35 +02:00
Yonit Halperin
a461f0655f spice client: sticky Alt activation when holding an Alt key: bug #505912.
Additional changes that were required for the feature:
    1) focusing on the pointed window in full screen mode
    2) In X11 - handling events that occur during keyboard ungrabbing
    3) In X11 - handling Leave/Enter Notify events that occur during keyboard grabbing/ungrabbing
    4) In X11 - fix for focus events that are handled in the wrong order (happens when
       focus events occur during grabbing the keyboard)
    5) In X11 - ignoring key release events during key holding
    6) In Windows - synchronizing keyboard release events that occured during a modal loop
2009-11-15 13:41:10 +02:00
Yonit Halperin
ec34856fea spice client: remove timer interface from platform - use Application (via ProcessLoop interface). 2009-11-09 19:06:44 +02:00
Yonit Halperin
49f5e5973c spice client: Transfer all channels run loop from EventsLoop class to ProcessLoop class 2009-11-09 17:30:49 +02:00
Yonit Halperin
8d5b738ba1 spice client: creating a general process loop.
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.
2009-11-09 14:39:33 +02:00
Yaniv Kamay
c1b79eb035 fresh start 2009-10-14 15:06:41 +02:00