Commit Graph

948 Commits

Author SHA1 Message Date
Rusty Lynch
1084da506e Add touch support for wl_shell_surface_move 2013-08-16 10:56:00 -07:00
Ander Conselvan de Oliveira
d224bb9218 nested: Fix skipping frames due to texture update without a context
Calls into cairo-gles may change the current context, so it was only by
chance that sometimes we had the proper one as current and updated the
correct texture in surface_attach().

In order to fix this, calling display_acquire_window_surface() before
binding the texture for setup is necessary. However this call has the
side effect of allocating a cairo surface for the window. At flush time,
the existence of this surface will cause an eglSwapBuffers(), even
if no rendering was done to it, leading to undefined contents on the
screen. This happens when the idle redraw task runs while there is a
pending frame callback.

Workaround this by moving the texture setup from surface_attach() to the
redraw handler, so that the cairo surface is only allocated when
redering is done.
2013-08-16 10:56:00 -07:00
Kristian Høgsberg
0d5fe3a231 nested: The wl_resouce is the buffer, not the wl_resource user data 2013-08-16 10:56:00 -07:00
Kristian Høgsberg
69594ccf9c window: Use xzalloc() instead of silently failing to add output 2013-08-16 10:55:59 -07:00
Kristian Høgsberg
06b16c2a0b weston-info: Use xmalloc() in weston-info 2013-08-16 10:55:59 -07:00
Kristian Høgsberg
adcd54bc3c window: Use xzalloc() instead of failing to add input device 2013-08-16 10:55:59 -07:00
Kristian Høgsberg
1a5f0c34ff window: Fix logic for looking up widget default cursor
We may deref a NULL pointer if there is no grab and no focus widget.
2013-08-16 10:55:59 -07:00
Kristian Høgsberg
980b018825 window: Don't check for subcompositor in window_add_subsurface()
Client should check for subcompositor support up front.  Now
window_add_surface() can never return NULL.
2013-08-15 11:56:41 -07:00
Kristian Høgsberg
b20b00923a window: Add API to check for subcompositor, use in subsurface example
This way we can fail with a nice error message.
2013-08-15 11:54:03 -07:00
Kristian Høgsberg
c85a9178c7 simple-touch: Handle OOM when allocating struct touch 2013-08-15 11:40:30 -07:00
Kristian Høgsberg
96c619af43 simple-shm: Handle OOM when allocating struct display 2013-08-15 11:39:52 -07:00
Kristian Høgsberg
20ffdffc03 keyboard: Don't use next_utf8_char() to go back where we came from
We go one utf8 char back and then one forward.  Just remember the original
position instead, which also avoids a warning about potentially
dereferencing a NULL return value from next_utf8_char().
2013-08-15 11:37:14 -07:00
Kristian Høgsberg
3e125830a5 terminal: Make utf-8 state machine assemble unicode code point value 2013-08-13 17:23:54 -07:00
Kristian Høgsberg
e9cabc1bc3 nested: Use a void * to avoid warnings with EGL_WL_bind_wayland_display 2013-08-12 22:21:22 -07:00
Kristian Høgsberg
473f248d7e screenshooter: Add missing newline and use program_invocation_short_name 2013-08-12 22:15:38 -07:00
Kristian Høgsberg
bdd8377312 screenshooter: Only link to $(CLIENT_LIBS) not libtoytoolkit.la
This application doesn't use toytoolkit, so don't link to it.  We have to
add a copy of xmalloc, to link without toytoolkit.
2013-08-12 22:12:32 -07:00
Adrian Negreanu
f5e3ad295c fix compile error when EGL_BUFFER_AGE_EXT is missing
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
2013-08-12 16:54:10 -07:00
Adrian Negreanu
6d14b14147 remove dependency on EGL_KHR_surfaceless_context
cairo_egl_device_create(), which is called next,
already checks if EGL_KHR_surfaceless_context is
available. If not, it fallbacks to pbuffer.

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
2013-08-12 16:54:10 -07:00
Rusty Lynch
4384a24a9e desktop-shell: Add touch support to panel launcher icons 2013-08-12 16:54:10 -07:00
Rusty Lynch
3ba1263438 calibrator: Add touch support to calibrator 2013-08-12 16:54:10 -07:00
Rusty Lynch
3bb2b8cfe9 smoke: Add touch support to smoke example 2013-08-12 16:54:10 -07:00
Rusty Lynch
041815aa05 window.c: Add touch handlers
This adds basic infrastructure for handling touch events in the toytoolkit.
2013-08-12 16:50:26 -07:00
Brian Lovin
1bf14815ef terminal.c: Check if fdopen() fails
If fdopen() fails we just close the fd and return, failing
the copy-and-paste.

Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
2013-08-08 16:25:13 -07:00
Peter Hutterer
3ca59d3968 clients: fix an error message
_GNU_SOURCE is always true as of c228e23b05, so
program_invocation_short_name is available.
2013-08-08 13:46:14 -07:00
Peter Hutterer
f3d62276d2 malloc + memset -> zalloc
And for clients using the xmalloc helper, use xzalloc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-08 13:46:13 -07:00
Brian Lovin
bc91926e0c clients: use xmalloc in more places
For the clients continue to use xmalloc() to simplify OOM-handling.

Signed-off-by: Brian Lovin <brian.j.lovin@intel.com>
2013-08-07 16:27:33 -07:00
Kristian Høgsberg
cb61dcf2ce nested: Update to use weston-nested-client binary name 2013-08-07 09:50:12 -07:00
Kristian Høgsberg
3c17933de8 Use #define WL_HIDE_DEPRECATED to avoid deprecated warnings for wl_buffer 2013-08-06 19:27:04 -07:00
Stefan Schmidt
85c40f2d85 clients: Fix typo in simple-touch and simple-shm.
listenter -> listener. Better fix it now before it spreads further.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
2013-08-06 17:02:59 -07:00
Bryce Harrington
c814c58adc Drop extraneous duplicate header includes
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-08-06 17:02:22 -07:00
Tomeu Vizoso
bee45a14cd window: Allow hinting of a preference for RGB565 when creating a window
And check if the renderer supports the RGB565 format for wl_shm buffers
before creating the cairo surface and requesting the buffer.

It can save quite some memory with big surfaces such as desktop
backgrounds.
2013-08-06 16:49:27 -07:00
Rob Bradford
09252d4b5e desktop-shell: Refactor launcher configuration reading to avoid leaking 2013-07-30 11:06:42 -07:00
Rob Bradford
5ab9c75d59 window: Free the allocated display if we fail to setup libxkbcommon 2013-07-30 11:05:42 -07:00
Rob Bradford
c48c34d6fa tablet-shell: Avoid leaking the path on failed icon loading 2013-07-30 11:05:23 -07:00
Rob Bradford
c9213e7353 image: Free filename saved into structure on error path 2013-07-30 11:04:58 -07:00
Armin K
a02d154b13 autotools: Correctly prefix simple-egl client name 2013-07-30 10:56:42 -07:00
Bryce W. Harrington
3d2046ed4b screenshot: Drop extraneous 'is' to improve warning msg grammar
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-29 16:32:51 -07:00
Armin K
aac6021bc0 autotools: Add an option to install demo clients
This patch adds a configure option which will enable
user to install demo clients if desired. It is disabled
by default.

v2: Remove AC_DEFINE as it is not necesary
2013-07-29 10:51:19 -07:00
Armin K
77ab1721b8 autotools: Rename demo clients
Prefix demo clients names with weston-, so they can
be installed if user desires.
2013-07-29 10:51:15 -07:00
Kristian Høgsberg
4162483d74 window.c: Simplify window_create() 2013-07-25 16:53:10 -07:00
Kristian Høgsberg
b886212545 Use xmalloc in desktop-shell.c 2013-07-25 16:44:45 -07:00
Kristian Høgsberg
8eeb30b9d1 window.c: Use xmalloc for frame_create() 2013-07-25 16:25:15 -07:00
Kristian Høgsberg
9a6c48d0fd cliptest: Use xmalloc in cliptest 2013-07-25 16:24:36 -07:00
Kristian Høgsberg
ce27841be5 clients: Introduce xmalloc() and use it a few places
For the sample clients we introduce xmalloc() to simplify OOM-handling.
This patch only converts a few callsites, but this will be our strategy
going forward.
2013-07-25 15:54:20 -07:00
Kristian Høgsberg
5addaa1820 simple-touch: Attach buffer before posting damage 2013-07-25 09:49:43 -07:00
Rob Bradford
5f087746ee window: Disregard motion events outside our current surface dimensions
It is possible to receive a motion event that was generated by the
compositor based on a pick of a surface of old dimensions. This was
triggerable on toytoolkit clients when minimising. The new window
dimensions were propagated through the widget hierarchy before the event
was dispatched.

This issue was triggering a segfault due to the focussed widget being
lost as the client code tried to identify which widget should have the
focus using co-ordinates outside the dimensions of the surface.

https://bugs.freedesktop.org/show_bug.cgi?id=66795
2013-07-13 00:00:49 -04:00
Rob Bradford
7000283741 editor: Support shift-left/right for selecting text
If the shift modifier is active then we don't make the cursor and the
anchor the same and as a result we develop a selection in the direction
that the arrow key gets pressed in.

https://bugs.freedesktop.org/show_bug.cgi?id=66802
2013-07-12 23:56:18 -04:00
Rob Bradford
3c9d967688 window: Allow popup menu when the window is maximised
https://bugs.freedesktop.org/show_bug.cgi?id=66793
2013-07-12 23:56:18 -04:00
Peter Maatman
b9a23f4fb8 clients/editor.c: Draw cursor at correct verical position
With this patch, the editor cursor now moves up and down correctly
instead of having the top part stuck on the first line.
2013-07-09 19:43:53 -04:00
Peter Maatman
08c38d4bc5 clients/editor.c: Ignore ESC key
Otherwise, editor would print the "unknown UTF-8 glyph" boxes.
2013-07-09 19:41:12 -04:00