summaryrefslogtreecommitdiff
path: root/clients
Commit message (Collapse)AuthorAgeFilesLines
* transformed: Add options for using debuging driver fullscreen methodAnder Conselvan de Oliveira2012-12-141-3/+54
| | | | | Add options for setting width, height and using the driver fullscreen method.
* window: Allow clients to choose the fullscreen methodAnder Conselvan de Oliveira2012-12-142-1/+13
|
* clients: Add screenshooter-client-protocol.h to screenshooter sourcesKristian Høgsberg2012-12-141-1/+4
|
* update git ignoresPekka Paalanen2012-12-121-0/+2
| | | | Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* simple-egl: Remove old obsolete fbo and color_rbo fieldsKristian Høgsberg2012-12-111-4/+0
| | | | Finally a commit that actually makes simple-egl simpler.
* Link matrix.c into weston againKristian Høgsberg2012-12-071-1/+1
| | | | | | | | We want to make sure that the matrix symbols are exported from weston and that modules get them from there. To do that, we pull matrix.[ch] out of libshared and back into weston. calibrator now also links to matrix.[ch] and we add a IN_WESTON define to enable the WL_EXPORT macro when compiled inside weston.
* window: add a note about freeing shm buffersPekka Paalanen2012-12-061-0/+15
| | | | | | | | | | | After a client has been double-buffering, and then switches to single-buffering, it should release the 2nd buffer. That never happens in practice here, so just add a comment and a check in case it ever occurs in the future. If we implemented the releasing now, it would be difficult to test. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* clients: destroy wl_registry on exitPekka Paalanen2012-12-063-0/+3
| | | | | | | Plug an insignificant memory leak in demo programs that bother to clean up at all. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* clients: Add a touchscreen calibration toolRob Bradford2012-12-062-0/+264
| | | | | | | | | | This a basic calibration tool designed for "in factory" calibration of a touch screen. The constants for the calibration functions: x' = Ax + By + C and y' = Dx + Ey + F Are printed on stdout when the calibration is completed.
* window: Add a widget default cursor convenience helperKristian Høgsberg2012-11-304-21/+21
| | | | | | | In a few cases, we set a motion handler just to be able to set a fixed cursor. This adds a default cursor helper that can be used in those cases. In case of the 'transformed' test case, we also avoid a brief flicker of the pointer cursor, which is set on enter when the move grab is lifted.
* window: change boolean to flags in toysurface::prepare()Pekka Paalanen2012-11-301-5/+16
| | | | | | | | | | | Change the boolean parameter 'resize_hint' into a bitmask 'flags'. Note, that this flags is very different to the other flags used in creating the toysurface implementations. They do not make sense to mix one way or the other. Prepare() cannot change the surface type, and surface constructors do not care for dynamic hint flags. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* clients: Replace transformed with a toytoolkit implementationAnder Conselvan de Oliveira2012-11-302-678/+145
|
* window: Add a way to retrieve a window's output transformAnder Conselvan de Oliveira2012-11-302-0/+32
| | | | Add the output_get_transform() entry point and an output handler hook.
* window: Let clients set buffer transformationsAnder Conselvan de Oliveira2012-11-302-4/+39
| | | | | | When a window's buffer transformation is set, its buffers are reallocated with the appropriate size (i.e., with width and height swapped in case of 90 or 270 degree rotation).
* window: Honour opaque field for windows without a frameAnder Conselvan de Oliveira2012-11-301-7/+10
| | | | | | | | | | Since the opaque region was set in frame_resize_handler(), if a client created a frameless window setting the toplevel widget as opaque would have no effect. This patch fixes this by moving the call wl_surface_set_opaque_region() to idle_resize(), and changing the latter function to set the whole window as opaque if its toplevel widget has the opaque flag set.
* Fix a crash when opening two terminal windows and closing the first one.Dima Ryazanov2012-11-303-2/+13
| | | | | | | | | To reproduce, launch the terminal, open a second window using Ctrl-Shift-N, go back to the first window, and press Ctrl-D. The terminal's master FD gets events even after being closed, causing terminal_destroy to be called twice on the same object. To fix this, I'm adding a function to stop watching an FD.
* configure.ac: Don't link weston to cairo or image librariesKristian Høgsberg2012-11-291-1/+1
| | | | | | We were pulling in cairo and the image loading libraries through libshared. Split out libshared into a core libshared and a libshared-cairo that pulls in the extra libraries.
* window: honour wl_buffer.releasePekka Paalanen2012-11-271-37/+76
| | | | | | | | | | | Listen for wl_buffer.release events in the shm path, and if a previously posted buffer is still held by the server, allocate another one. The maximum of two should be enough, since there is no point for a server to hold more than one buffer at a time. Buffer allocation happens as needed instead of window creation time. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: fix tooltip text extentsPekka Paalanen2012-11-271-5/+28
| | | | | | | | | | | After the toysurface rewrite, windows do not have a valid Cairo surface outside their repaint cycle, so tooltips are not getting their size right. Create a dummy Cairo surface only for querying text extents, so we do not rely on any window surfaces of parent windows or otherwise. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: simplify window_create_surfacePekka Paalanen2012-11-271-19/+24
| | | | Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: convert shm path to toysurfacePekka Paalanen2012-11-271-80/+178
| | | | | | | | | | | | | Implement shm_surface as a sub-class of toysurface, and unify the toysurface call sites removing most buffer type specific branching. Do not destroy and create a surface, if the size does not change. The resizing optimization of shm surfaces is retained, but the pool is moved from struct window to struct shm_surface, since it does not apply to egl_window_surface. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: add toysurface abstraction and port EGL pathPekka Paalanen2012-11-271-121/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need more structure to the way we handle the backing storage in toytoolkit, to make it possible to double-buffer the shm case properly. The existing buffer handling is very complex with the three different cases: - EGLSurface backed Cairo surface with a window associated - wl_shm backed Cairo surface with a window associated - wl_shm backed Cairo surface without a window, as used by dnd.c Introduce the toysurface abstraction, which defines the interface for the both buffer handling cases that have a window associated. It also means, that windows will not have a valid Cairo surface outside of their repaint cycle. Convert the EGLsurface case into toysurface for starters. For EGL-based Cairo surfaces, the private data is no longer needed. Destroying egl_window_surface will trigger the destruction of the cairo_surface_t, not vice versa. This is possible because display_create_surface() is shm-only. The shm cases are left untouched. As a side-effect, display_acquire_window_surface() and display_release_window_surface() will no longer use the 'display' argument. Instead, display will be the one inherited from the window. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* weston-simple-im: Add a few more compose sequencesKristian Høgsberg2012-11-271-0/+7
|
* weston-simple-im: Fold struct keyboard_input into struct simple_imKristian Høgsberg2012-11-271-81/+48
|
* weston-simple-im: Fold keyboard_input_handle_keymap() into event handlerKristian Høgsberg2012-11-271-46/+40
|
* weston-simple-im: Fold keyboard_input_handle_key() into event handlerKristian Høgsberg2012-11-271-28/+19
|
* weston-simple-im: Fold keyboard_input_handle_modifiers into event handlerKristian Høgsberg2012-11-271-26/+15
|
* weston-simple-im: Stop using toytoolkitKristian Høgsberg2012-11-272-14/+31
| | | | | | Toytoolkit doesn't buy us anything in this case, we're not rendering or handling regular input events. Just talk directly to wl_display and look up the 'input_method' global directly.
* weston-simple-im: Use serial number from incoming eventsKristian Høgsberg2012-11-271-4/+5
| | | | | | | | | The key events we pass through to the input_method_context has to have a serial number that corresponds to the key event we got. The struct display serial is updated on pointer enter/leave and keyboard events, but not the input method keyboard events. So the display serial will never correspond to the key event we're dealing with and we have to pass through the serial we get from the key event.
* weston-simple-im: Create our own xkb_contextKristian Høgsberg2012-11-273-10/+8
| | | | | There's no need to use the struct display xkb_context, we can just create out ow. This reverts c31288daf1ac379c278a00c3291760ec2639eae7.
* clients: Move keyboard-utils.[ch] into weston-simple-imKristian Høgsberg2012-11-274-243/+141
| | | | | This is the only user of this code, so just include it in the simple im source.
* text: Add simple compose input methodJan Arne Petersen2012-11-273-1/+349
| | | | | | | Add an input method listening to hardware keyboard input and generating compose text. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* editor: Add support for editing text using the keyboardRob Bradford2012-11-271-0/+81
| | | | | | | | | | This simple change allows you to drive the editor using the keyboard (supporting backspace and delete and left and right arrow keys.) The idea behind this change is to allow the testing of the interoperation between a virtual keyboard and real one. Signed-off-by: Rob Bradford <rob@linux.intel.com> Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* window: Allow to get xkb context from displayJan Arne Petersen2012-11-272-0/+9
| | | | | | Add display_get_xkb_context to get the xkb context from the display. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* window: Add utils for xkb keyboard inputJan Arne Petersen2012-11-273-0/+242
| | | | Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Send more information with keysym eventsJan Arne Petersen2012-11-274-30/+118
| | | | | | | | | Send state and modifier from the demo keyboard with the keysym event and take them into account in the editor example. Add some helper functions to write and read a modifiers_map array. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Rename and extend text_model key eventJan Arne Petersen2012-11-272-19/+42
| | | | | | | | | Rename the key event in text_model to keysym and add serial, time and modifiers arguments. Add a modifiers_map event to transfer an array of 0-terminated modifier names, so that a mapping of modifiers to the modifier bit mask is possible. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* clients: Add a client that renders transformed buffersAnder Conselvan de Oliveira2012-11-272-1/+793
| | | | | | | | This new client, called transformed, renders a cross with the top part red and the right green, with the same transform as the output the surface is in. This is based on simple-egl.
* simple-egl: Reset opaque region if not fullscreen.Scott Moreau2012-11-191-0/+2
| | | | | | | If simple-egl is toggled fullscreen, the opqaue region is set for the surface but never removed after exiting fullscreen. This patch resets the opaque region to 0 if the surface is not fullscreen and -o was not passed. This fixes the problem introduced sometime since d7f282b84e, when this was last fixed.
* window: make display_create_surface() shm-onlyPekka Paalanen2012-11-191-11/+9
| | | | | | | | Nothing uses it to create EGL-surfaces outside of window.c. This makes refactoring the EGL-based code easier, since we do not need to support EGL-based Cairo surfaces without an associated struct window. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: use different keys for different cairo privatesPekka Paalanen2012-11-191-9/+13
| | | | | | | | | | | cairo_surface_t objects have a private set, either struct shm_surface_data, or struct egl_window_surface_data. Use separate private keys for each type to avoid mismatch. This makes display_get_buffer_for_surface() safe, in that it won't return garbage for an EGL-based cairo surface. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: merge struct surface_data into shm_surface_dataPekka Paalanen2012-11-191-14/+11
| | | | | | | | | | | Struct surface_data was not really useful, and it definitely was not used with EGL-based windows. This also fixes a semantic mistake, where struct shm_surface_data was put into cairo_surface_t private, but got out as struct surface_data instead. Due to struct layout, however, this did not cause a real bug. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: remove unused MULT macroPekka Paalanen2012-11-191-3/+0
| | | | | | | | | | | | Leftovers from commit f02a649a3ce5735f5a20103fe6f1002b3a421501 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Mon Mar 12 01:05:25 2012 -0400 Consolidate image loading code and move to shared/ Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: make window_flush() privatePekka Paalanen2012-11-192-4/+1
| | | | | | Not called from any client. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* window: make window_{create,set}_surface privatePekka Paalanen2012-11-192-8/+2
| | | | | | | I do not think these are meant to be called by the applications directly. Applications certainly do not have to call them. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* simple-shm: honour wl_buffer.releasePekka Paalanen2012-11-191-26/+87
| | | | | | | | | | | | Change simple-shm to properly process the wl_buffer.release event, and not reuse a buffer until it is released by the server, as specified in the protocol. In case the server has not released the buffer, but signals that it has been shown (frame callback), allocate a second buffer. Simple-shm will now automatically do double-buffering if needed. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* simple-egl: Set the right size for the opaque region when fullscreenAnder Conselvan de Oliveira2012-11-161-2/+2
| | | | | | window.window_size holds the size of the window in windowed mode. Use window.geometry for setting the opaque region since that holds the current size.
* keyboard: Rename keyboard to weston-keyboardJan Arne Petersen2012-11-082-5/+6
| | | | Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* keyboard: commit preedit before sending key eventsJan Arne Petersen2012-11-081-8/+24
| | | | | | Commit the current preedit text before sending control key events. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* editor: Remove preedit text on startupJan Arne Petersen2012-11-081-1/+0
| | | | | | There should not be preedit text when a text entry does not have focus. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>