Commit Graph

2837 Commits

Author SHA1 Message Date
Yeh, Sinclair
952e6df8fc Fix simple-egl tear-down order to prevent a crash on exit time
wl_egl_window_destory() destroys the window handle that
dri2_destroy_surface() later uses when eglTerminate() is called.

Reordering the tear down order prevents such case from occuring.
2013-05-01 13:40:50 -04:00
Kristian Høgsberg
93c76fe4b1 configure.ac: Bump to 1.1.90 to open master for 1.2 work 2013-04-29 16:33:32 -04:00
Kristian Høgsberg
2e43720743 window: Add a log handler for window.c clients
This way we can see what kind of error we get if we get an error.
2013-04-16 20:46:59 -04:00
Kristian Høgsberg
c08bc364fc configure.ac: Bump version to 1.1.0 2013-04-15 21:51:35 -04:00
Philipp Brüschweiler
63e7be60b3 shell: clear popup grab interface on remove_popup_grab and popup_grab_end
Fixes a segfault. Steps to reproduce:

* start weston with the x11 backend
* open a terminal
* click on the icon in the top left corner, choose close
* close the x11 window containing weston
2013-04-15 21:13:34 -04:00
Philipp Brüschweiler
96386b8e5e desktop-shell: better error logging
v2: only call cairo_surface_status once
2013-04-15 20:57:55 -04:00
Hardening
4a3c150c96 Correctly handle extended RDP keycodes
The keycodes received by the FreeRDP server aren't evdev keycodes.
This patch adds the correct convertion to evdev keycodes. After the
patch all keys that are marked as extended in RDP packets become
functionnal (that's the case for the windows key).
Please note that this patch rely on some corrections that have been
pushed on the FreeRDP github tonight.
2013-04-11 16:11:11 -04:00
Tiago Vignatti
b67c91d46d clients: tablet-shell: Wait for set_homescreen hits the server
This relates to:
    https://bugs.freedesktop.org/show_bug.cgi?id=57634
    https://bugs.freedesktop.org/show_bug.cgi?id=57637

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-04-09 15:05:32 -04:00
Jonas Ådahl
e5a1225bc4 Make backends always specify output repaint time
Most backends relies on gettimeofday(2) for output repaint timestamps
but this is not a requirement. Before this patch repaints coming from
idle_repaint() always used gettimeofday(2) for timestamps. For backends
not using that time source this could cause large jumps between
timestamps.

To fix this, timestamps needs to always come from the backend. This
means that the backend needs to always be responsible of starting the
repaint loop in case that the repaint cannot start immediately.

The drm backend implementation is from the patch by Ander Conselvan de
Oliveira found here:
http://lists.freedesktop.org/archives/wayland-devel/2013-February/007393.html

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-04-08 14:24:03 -04:00
Kristian Høgsberg
b76237e508 compositor-drm: Allow running without launcher if effective UID is 0
This lets us keep running weston as root or setuid root.
2013-04-04 21:36:20 -04:00
Armin K
eb3c73f288 Fix compiler warnings
This prevents compiler warnings when using libpng 1.6 and GCC 4.8
2013-04-03 20:40:44 -04:00
Quentin Glidic
5daccc373e autotools: Add a libunwind configure switch
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-04-03 14:31:44 -04:00
Rob Bradford
91ae483ab9 compositor: Use wl_pointer_set_current to cleanup after surface destruction
This API call handles setting the current surface on the wl_pointer and also
maintaining a destroy notification to monitor that surface for destruction.

This is part of the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=696946
2013-04-03 12:05:57 -04:00
Giulio Camuffo
319b91b97a window: don't execute the selected menu item when getting popup_done 2013-04-03 08:48:31 -04:00
Philipp Brüschweiler
e14560e381 compositor: add information about the fbdev backend to --help output 2013-04-01 21:45:00 -04:00
Hardening
a83409cbff RDP compositor take 6
This patch is the 6th version of the FreeRDP based compositor.
Changes from last version:
 * use pixman_image_get_stride() when appropriate
 * always realloc

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2013-04-01 20:50:54 -04:00
Philipp Brüschweiler
57edf7f49e compositor: add WESTON_COMPOSITOR_OFFSCREEN state
This state is used when the user switches the vt. It turns of rendering
and frame events, but doesn't set the DPMS state to off.

As a part of this change, also turn off the idle timer when entering
the SLEEPING or OFFSCREEN states, which fixes
https://bugs.freedesktop.org/show_bug.cgi?id=61910 (rpi backend
untested).
2013-03-29 14:05:27 -04:00
Damien Lespiau
cee79e91f3 gitignore: Ignore test-driver
Automake (1.12 here) parallel-tests installs a test-driver file, another
file to add to .gitignore.

While at it, remove the duplicate cscope.out entry and add TAGS (the
result of automake's "make tag")
2013-03-28 14:04:05 -04:00
Giulio Camuffo
7fe01b18d8 sdk: be C++ friendly
This renames the weston_surface's private member to configure_private
and externs "C" the headers of the SDK.
2013-03-28 14:03:58 -04:00
Damien Lespiau
b5bae3450c build: Make the X11 compositor explicitely depend on xcb-shm
Otherwise, it means the X11 compositor depends on another library to
pull xcb-shm (cairo?), which is not always the case. Here I end up with:

[01:54:38.970] Failed to load module:
$prefix/lib/weston/x11-backend.so: undefined symbol: xcb_shm_id
2013-03-28 12:18:51 -04:00
Kristian Høgsberg
88817f869f compositor: Remove unused wl_pointer variable
Using move_pointer() in notify_pointer_focus() left the wl_pointer variable
unused.
2013-03-27 23:00:29 -04:00
Peter Maatman
e5b42e4466 Added handler for SIGABRT 2013-03-27 22:57:33 -04:00
Jonas Ådahl
848e2e670e evdev-touchpad: Disable tap FSM by default on touchpads with button pads
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-03-27 15:39:09 -04:00
Kristian Høgsberg
5006596a72 compositor-x11: Fix relative motion reporting for multiple outputs 2013-03-27 15:14:07 -04:00
Rob Bradford
c088e2c011 compositor: Support notifying with absolute position too
With evdev input devices that generate absolute positions we need to provide
an infrastructure in the compositor for supporting those.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61997
2013-03-27 14:42:28 -04:00
Rafal Mielniczuk
32069c09ea compositor-drm: ensure we run drm-backend using weston-launch
We do this by checking if launcher_sock != -1

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=60926
2013-03-27 13:46:01 -04:00
Giulio Camuffo
1b4b61ace3 shell: set the popup grab button as pressed only if it actually is
This ensures the popup_grab.initial_up field isn't reset to 0
if the popup was not opened because of a mouse press but because
of moving the mouse with a popup already open. Not doing so will
make the first click outside the client area go ignored.
2013-03-27 13:11:06 -04:00
Giulio Camuffo
5085a75dee shell: handle multiple popups
This patch implements a popup stack. When the first popup is opened
the grab is started, and it is added to a list. Further popups will
be added to this list but the grab won't change. When a popup is
closed it is removed from the list and, if it is now empty, the grab
is ended.
A click outside the client area will send the popup_done event to
all the popups in the list, and the grab will end.
2013-03-25 22:36:58 -04:00
Rob Bradford
0f3f97d34a weston-egl: Allow compilation against older EGL stack
Provide a definition of EGL_BUFFER_AGE_EXT so that you can compile against an
EGL stack that may not yet support that extension.
2013-03-22 10:26:04 -04:00
Scott Moreau
706d15e2a7 Revert "weston.ini: Use 'modeline' key for modeline example"
This reverts commit 97a5614563.

The current code detects the mode key, not modeline. Reference:
http://cgit.freedesktop.org/wayland/weston/tree/src/compositor-drm.c#n2464
2013-03-19 15:52:40 -04:00
Scott Moreau
650aab55e7 weston.man: Document the way to disable idle timeout 2013-03-19 15:50:45 -04:00
Emilio Pozuelo Monfort
02d8ad6021 config.ini: add examples for cursor-theme and cursor-size 2013-03-19 14:42:48 -04:00
Emilio Pozuelo Monfort
57ac406c2f weston.ini.man: document cursor-theme and cursor-key 2013-03-19 14:42:46 -04:00
Emilio Pozuelo Monfort
ab44b0c61e toytoolkit: implement cursor-size config key 2013-03-19 14:42:43 -04:00
Siddharth Heroor
d6be88b5e2 weston-launch: cleanup - return failures in main with EXIT_FAILURE
Signed-off-by: Siddharth Heroor <heroor@gmail.com>
2013-03-19 14:41:05 -04:00
Philipp Brüschweiler
e74dc19aa1 compositor-rpi: Use correct enum, removes a warning 2013-03-19 14:35:34 -04:00
Philipp Brüschweiler
4b409c387d compositor: remove unused field option_idle_time 2013-03-19 14:31:46 -04:00
Philipp Brüschweiler
7a3ec74cb6 weston-launch: return better value if weston dies because of a signal
Before this commit, weston-launch returned 0 if weston was killed by a
signal. This makes it hard to automatically test weston by using
weston-launch, as there is no way to know why weston was terminated.

This commit makes weston-launch return 10+N instead, where N is the code
of the signal that terminated weston. 10 was chosen because it allows a
script to distinguish it from the case that weston-launch itself was
killed by a signal (128+N), and does not overlap the standard exit codes
defined in sysexits.h.

Partial fix for https://bugs.freedesktop.org/show_bug.cgi?id=60935. I
can't reproduce the SIGHUP using the fbdev backend.

v3: better commit message.
2013-03-19 14:28:23 -04:00
Philipp Brüschweiler
ff253129c5 weston-launch: move function calls out of assert() 2013-03-19 14:28:01 -04:00
MoD
063a882dc7 toytoolkit: avoid redrawing a window between maximize and configure
Resolve a bad frame visible when maximizing toytoolkit programs with the the
maximize button in decorations. Windows now use wl_display.sync requests to
wait for a maximize to finish before drawing again, following suggestions from
http://lists.freedesktop.org/archives/wayland-devel/2013-February/007650.html
2013-03-19 14:19:53 -04:00
Rafal Mielniczuk
c1a3cd1851 window: restore maximized state from fullscreen mode if necessary
This patch sets back maximized mode, if that was its state before going
fullscreen.
2013-03-19 14:07:57 -04:00
Rafal Mielniczuk
fc22be0bb9 window: save allocation only for toplevel window
Thanks to that we will not overwrite saved allocation, when going
fullscreen from maximized state
2013-03-19 14:06:57 -04:00
Rafal Mielniczuk
fffdcdd654 shell: reset rotation for maximized surface
Surface will preserve its rotation transformation when maximizing, which
will cause inconsistencies (eg. no window shadows drawn)

This patch removes rotation from maximized surface and restore it when
unmaximizing (just like in fullscreen mode)
2013-03-19 12:27:23 -04:00
Rafal Mielniczuk
23c6759b76 shell: block move, rotate, resize in maximized state
To remain consisten with client side window, which blocks moving and
resizing of window in maximized state, we should do so on the compositor
side as well.

(until there is some unmaximize notification from server, which will
allow window to start drawing shadows and revert itself to toplevel
state)
2013-03-19 12:09:52 -04:00
Philipp Brüschweiler
f3e39f9872 pixman-renderer: don't forget to initialize the debug fields
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=61930
2013-03-18 22:25:36 -04:00
Pekka Paalanen
483243fa67 compositor, shell: surface transform inheritance
Implements surface transform inheritance. A 'parent' pointer is added to
weston_surface::geometry, and is automatically used by
weston_surface_update_transform(). When updating the transform, the
parent transform is updated as needed, too.

shell_map_popup() is converted to use the new
weston_surface_set_transform_parent() function. Now, if we moved the
popup's parent surface while the popup is open, the popup surface will
stick to the parent properly.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-18 22:20:04 -04:00
Pekka Paalanen
c3ce738653 compositor: introduce weston_surface_geometry_dirty()
Instead of directly setting the dirty flag on weston_surface geometry,
use a function for that.

This allows us to hook into geometry dirtying in a following patch.

Also add comments to weston_surface fields, whose modification causes
transform state to become outdated.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-18 22:19:57 -04:00
Pekka Paalanen
f1f48cfa35 compositor: remove redundant geometry dirtying
Remove redundant geometry dirtying from surface_commit() to simplify
further changes.

This code was added in commit 5df8ecac5d
"compositor: Fix partial repaints"

as the fix to:
https://bugs.freedesktop.org/show_bug.cgi?id=56538

The issue fixed by that commit was making the geometry dirty on every
attach, which caused full-surface repaints every time. The bug was
probably introduced by the opaque region changes during implementing
wl_surface.commit. The mentioned commit fixes the opaque handling by
comparing the new and old regions.

However, the commit also introduces additional checks that set
geometry.dirty. In the current code base, this should be unnecessary.

If the pending.sx or pending.sy are not zero, or if the surface size
changes, the configure() hook is responsible for applying the new
values, and so also marking the geometry dirty.

The configure() hook is only called, if there has been a new
wl_surface.attach. Nothing else can change these variables, so this
should be enough.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2013-03-18 22:19:54 -04:00
Rune K. Svendsen
14b2fe7020 Eat scroll event if a key binding function is executed because of it.
When an axis (scroll) event results in a key binding function
being executed, eat the scroll event so the underlying window
doesn't receive it.
Thanks to Scott Moreau for helping me solve this.
2013-03-18 21:43:17 -04:00
Scott Moreau
976a050f8f Fix memory leaks
Fix a couple leaks caught by valgrind.
2013-03-18 21:34:13 -04:00