platform/upstream/weston.git
11 years agoinput: Rename wl_pointer to weston_pointer
Kristian Høgsberg [Tue, 7 May 2013 02:15:05 +0000 (22:15 -0400)]
input: Rename wl_pointer to weston_pointer

This is now a weston object.

11 years agoinput: Rename weston_device_repick() to weston_seat_repick()
Kristian Høgsberg [Tue, 7 May 2013 01:51:21 +0000 (21:51 -0400)]
input: Rename weston_device_repick() to weston_seat_repick()

Old left-over misnaming.

11 years agoinput: Drop find_resource_for_client()
Kristian Høgsberg [Tue, 7 May 2013 01:49:55 +0000 (21:49 -0400)]
input: Drop find_resource_for_client()

We can use find_resource_for_surface() instead now that it's all in the
same file.

11 years agomove input code from compositor.c into input.c
Kristian Høgsberg [Thu, 18 Apr 2013 19:40:10 +0000 (15:40 -0400)]
move input code from compositor.c into input.c

11 years agofold wl_keyboard into weston_keyboard
Kristian Høgsberg [Thu, 18 Apr 2013 19:25:39 +0000 (15:25 -0400)]
fold wl_keyboard into weston_keyboard

11 years agoImport input structs and helper functions from wayland
Kristian Høgsberg [Thu, 18 Apr 2013 19:07:39 +0000 (15:07 -0400)]
Import input structs and helper functions from wayland

11 years agoeditor: Fix some offsets for multi-byte characters
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:42 +0000 (16:47 +0200)]
editor: Fix some offsets for multi-byte characters

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agokeyboard: Fix offsets when deleting text
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:41 +0000 (16:47 +0200)]
keyboard: Fix offsets when deleting text

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Rename input_method to wl_input_method
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:39 +0000 (16:47 +0200)]
text: Rename input_method to wl_input_method

Also rename input_method_context to wl_input_method_context,
input_panel to wl_input_panel and input_panel_surface to
wl_input_panel_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Improve protocol documentation.
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:38 +0000 (16:47 +0200)]
text: Improve protocol documentation.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Rename ::set_panel to ::set_overlay_panel
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:37 +0000 (16:47 +0200)]
text: Rename ::set_panel to ::set_overlay_panel

Also add documentation to input_panel_surface::set_overlay_panel.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Rename text_input to wl_text_input
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:36 +0000 (16:47 +0200)]
text: Rename text_input to wl_text_input

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agokeyboard: Remove unneded calls
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:35 +0000 (16:47 +0200)]
keyboard: Remove unneded calls

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: delete text on commit_string
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:34 +0000 (16:47 +0200)]
text: delete text on commit_string

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Fix serial handling
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:33 +0000 (16:47 +0200)]
text: Fix serial handling

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Only allow input-method started by weston to bind
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:31 +0000 (16:47 +0200)]
text: Only allow input-method started by weston to bind

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Add output argument to set_toplevel
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:29 +0000 (16:47 +0200)]
text: Add output argument to set_toplevel

Allow to specify an output for a toplevel  input panel surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Add support for panels following the cursor
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:28 +0000 (16:47 +0200)]
text: Add support for panels following the cursor

Add input_panel_surface::set_panel to specify input panel surfaces which
are overlaying the application and are following the input cursor.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agoeditor: Send cursor position to the input method
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:27 +0000 (16:47 +0200)]
editor: Send cursor position to the input method

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agoeditor: Only delete on backspace key released
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:26 +0000 (16:47 +0200)]
editor: Only delete on backspace key released

Do not delete two characters when key is pressed and released.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Add "none" preedit-style
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:25 +0000 (16:47 +0200)]
text: Add "none" preedit-style

Use "default" preedit style as default. "None" is used when the
composing text should look like non-composing text.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Rename text_model to text_input
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:24 +0000 (16:47 +0200)]
text: Rename text_model to text_input

Also rename text_model_factory to text_input_manager.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Order requests and events in a nice way
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:23 +0000 (16:47 +0200)]
text: Order requests and events in a nice way

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: rename text_model::commit to commit_state
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:22 +0000 (16:47 +0200)]
text: rename text_model::commit to commit_state

Use ::commit_state as a request name to make clear what is commited.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agoview: g_type_init() is deprecated in glib >= 2.35
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:21 +0000 (16:47 +0200)]
view: g_type_init() is deprecated in glib >= 2.35

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Fix some text and input-method docs
Krzesimir Nowak [Thu, 18 Apr 2013 14:47:20 +0000 (16:47 +0200)]
text: Fix some text and input-method docs

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Fix password content hint value
Krzesimir Nowak [Thu, 18 Apr 2013 14:47:19 +0000 (16:47 +0200)]
text: Fix password content hint value

0xc in this case was a combination of "autocapitalization" (0x4) and
"lowercase" (0x8) instead of "hidden_text" (0x40) and "sensitive_data"
(0x80).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agoeditor: Reset text model on reset
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:18 +0000 (16:47 +0200)]
editor: Reset text model on reset

There were some reset calls missing, which resulted in wrong preedit
state on input method side.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agokeyboard: Reset state on activate
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:17 +0000 (16:47 +0200)]
keyboard: Reset state on activate

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Add example for language/text direction
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:16 +0000 (16:47 +0200)]
text: Add example for language/text direction

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agotext: Add language and text-direction to protocol
Jan Arne Petersen [Thu, 18 Apr 2013 14:47:15 +0000 (16:47 +0200)]
text: Add language and text-direction to protocol

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
11 years agoxwm: Reparent client windows into ARGB windows
Kristian Høgsberg [Thu, 2 May 2013 17:43:24 +0000 (13:43 -0400)]
xwm: Reparent client windows into ARGB windows

We used to rely on an ugly hack where the xwayland server would always
report RGB X windows as having ARGB pixels, so that texturing from these
would also sample the undefined alpha.  We also relied on Xrender rendering
to RGB X windows to write the alpha channel correctly, so that when we
texture from the RGB X window as an ARGB surface we end up getting the
alpha written by Xrender.

That was obviously all broken.  We can instead reparent client windows into
ARGB frame windows.  That way we can render the decorations using a
ARGB render pictformat and sample back those alpha values in a well-defined
way.  We can also unbreak xwayland and let it report RGB pixel format for
RGB windows.  We still need the opaque region or the RGB-only client window
but that's OK.

11 years agoMove the optional output name property from drm_output to weston_output
Richard Hughes [Thu, 2 May 2013 09:10:04 +0000 (10:10 +0100)]
Move the optional output name property from drm_output to weston_output

In the future the CMS plugins will need to read the config file and setup a list
of hardcoded names to ICC profiles.

11 years agoFix not checking return value of drmIoctl function call to map dumb buffer
Chris Michael [Thu, 2 May 2013 01:26:02 +0000 (21:26 -0400)]
Fix not checking return value of drmIoctl function call to map dumb buffer

in drm_fb_create_dumb, the return value of the drmIoctl function call
to map the dumb buffer was never checked, thus the following "if
(ret)" check was invalid as it was checking the previous return value
from the above drmModeAddFB call.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
11 years agoInclude config.h in compositor-drm.c
Richard Hughes [Wed, 1 May 2013 20:52:13 +0000 (21:52 +0100)]
Include config.h in compositor-drm.c

11 years agoAdd a set_gamma vfunc on weston_output
Richard Hughes [Wed, 1 May 2013 20:52:12 +0000 (21:52 +0100)]
Add a set_gamma vfunc on weston_output

11 years agoAdd a output_created_signal on weston_compositor
Richard Hughes [Wed, 1 May 2013 20:52:11 +0000 (21:52 +0100)]
Add a output_created_signal on weston_compositor

11 years agoAdd a destroy_signal on weston_output
Richard Hughes [Wed, 1 May 2013 20:52:10 +0000 (21:52 +0100)]
Add a destroy_signal on weston_output

11 years agoExtract and parse the EDID when outputs are added
Richard Hughes [Wed, 24 Apr 2013 13:58:02 +0000 (14:58 +0100)]
Extract and parse the EDID when outputs are added

At the moment we're only extracting interesting strings. We have to be quite
careful parsing the EDID data, as vendors like to do insane things.

The original EDID parsing code was written by me for gnome-color-manager.

11 years agoweston.ini: document background-type
Emilio Pozuelo Monfort [Mon, 22 Apr 2013 09:00:07 +0000 (11:00 +0200)]
weston.ini: document background-type

11 years agoFix simple-egl tear-down order to prevent a crash on exit time
Yeh, Sinclair [Fri, 19 Apr 2013 17:49:12 +0000 (17:49 +0000)]
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.

11 years agoconfigure.ac: Bump to 1.1.90 to open master for 1.2 work
Kristian Høgsberg [Mon, 29 Apr 2013 20:33:32 +0000 (16:33 -0400)]
configure.ac: Bump to 1.1.90 to open master for 1.2 work

11 years agowindow: Add a log handler for window.c clients
Kristian Høgsberg [Tue, 16 Apr 2013 15:21:48 +0000 (11:21 -0400)]
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.

11 years agoconfigure.ac: Bump version to 1.1.0 1.1.0
Kristian Høgsberg [Tue, 16 Apr 2013 01:51:35 +0000 (21:51 -0400)]
configure.ac: Bump version to 1.1.0

11 years agoshell: clear popup grab interface on remove_popup_grab and popup_grab_end
Philipp Brüschweiler [Mon, 15 Apr 2013 19:09:54 +0000 (21:09 +0200)]
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

11 years agodesktop-shell: better error logging
Philipp Brüschweiler [Mon, 15 Apr 2013 18:10:40 +0000 (20:10 +0200)]
desktop-shell: better error logging

v2: only call cairo_surface_status once

11 years agoCorrectly handle extended RDP keycodes
Hardening [Sat, 6 Apr 2013 21:39:26 +0000 (23:39 +0200)]
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.

11 years agoclients: tablet-shell: Wait for set_homescreen hits the server
Tiago Vignatti [Tue, 9 Apr 2013 14:48:06 +0000 (11:48 -0300)]
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>
11 years agoMake backends always specify output repaint time 1.0.90
Jonas Ådahl [Fri, 5 Apr 2013 21:07:11 +0000 (23:07 +0200)]
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>
11 years agocompositor-drm: Allow running without launcher if effective UID is 0
Kristian Høgsberg [Fri, 5 Apr 2013 01:36:20 +0000 (21:36 -0400)]
compositor-drm: Allow running without launcher if effective UID is 0

This lets us keep running weston as root or setuid root.

11 years agoFix compiler warnings
Armin K [Wed, 3 Apr 2013 19:29:03 +0000 (21:29 +0200)]
Fix compiler warnings

This prevents compiler warnings when using libpng 1.6 and GCC 4.8

11 years agoautotools: Add a libunwind configure switch
Quentin Glidic [Wed, 3 Apr 2013 18:19:45 +0000 (20:19 +0200)]
autotools: Add a libunwind configure switch

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agocompositor: Use wl_pointer_set_current to cleanup after surface destruction
Rob Bradford [Wed, 3 Apr 2013 14:21:55 +0000 (15:21 +0100)]
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

11 years agowindow: don't execute the selected menu item when getting popup_done
Giulio Camuffo [Wed, 3 Apr 2013 12:37:00 +0000 (14:37 +0200)]
window: don't execute the selected menu item when getting popup_done

11 years agocompositor: add information about the fbdev backend to --help output
Philipp Brüschweiler [Sat, 30 Mar 2013 14:18:49 +0000 (15:18 +0100)]
compositor: add information about the fbdev backend to --help output

11 years agoRDP compositor take 6
Hardening [Mon, 1 Apr 2013 21:43:58 +0000 (23:43 +0200)]
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>
11 years agocompositor: add WESTON_COMPOSITOR_OFFSCREEN state
Philipp Brüschweiler [Fri, 29 Mar 2013 12:01:56 +0000 (13:01 +0100)]
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).

11 years agogitignore: Ignore test-driver
Damien Lespiau [Thu, 28 Mar 2013 17:28:22 +0000 (17:28 +0000)]
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")

11 years agosdk: be C++ friendly
Giulio Camuffo [Thu, 28 Mar 2013 17:02:42 +0000 (18:02 +0100)]
sdk: be C++ friendly

This renames the weston_surface's private member to configure_private
and externs "C" the headers of the SDK.

11 years agobuild: Make the X11 compositor explicitely depend on xcb-shm
Damien Lespiau [Thu, 28 Mar 2013 15:20:54 +0000 (15:20 +0000)]
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

11 years agocompositor: Remove unused wl_pointer variable
Kristian Høgsberg [Thu, 28 Mar 2013 03:00:29 +0000 (23:00 -0400)]
compositor: Remove unused wl_pointer variable

Using move_pointer() in notify_pointer_focus() left the wl_pointer variable
unused.

11 years agoAdded handler for SIGABRT
Peter Maatman [Wed, 27 Mar 2013 21:38:53 +0000 (22:38 +0100)]
Added handler for SIGABRT

11 years agoevdev-touchpad: Disable tap FSM by default on touchpads with button pads
Jonas Ådahl [Fri, 22 Mar 2013 07:41:42 +0000 (08:41 +0100)]
evdev-touchpad: Disable tap FSM by default on touchpads with button pads

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
11 years agocompositor-x11: Fix relative motion reporting for multiple outputs
Kristian Høgsberg [Wed, 27 Mar 2013 19:14:07 +0000 (15:14 -0400)]
compositor-x11: Fix relative motion reporting for multiple outputs

11 years agocompositor: Support notifying with absolute position too
Rob Bradford [Wed, 27 Mar 2013 15:59:43 +0000 (15:59 +0000)]
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

11 years agocompositor-drm: ensure we run drm-backend using weston-launch
Rafal Mielniczuk [Wed, 27 Mar 2013 17:39:28 +0000 (18:39 +0100)]
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

11 years agoshell: set the popup grab button as pressed only if it actually is
Giulio Camuffo [Wed, 27 Mar 2013 17:05:26 +0000 (18:05 +0100)]
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.

11 years agoshell: handle multiple popups
Giulio Camuffo [Mon, 25 Mar 2013 20:42:45 +0000 (21:42 +0100)]
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.

11 years agoweston-egl: Allow compilation against older EGL stack
Rob Bradford [Fri, 22 Mar 2013 14:15:49 +0000 (14:15 +0000)]
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.

11 years agoRevert "weston.ini: Use 'modeline' key for modeline example"
Scott Moreau [Sun, 10 Mar 2013 15:30:16 +0000 (09:30 -0600)]
Revert "weston.ini: Use 'modeline' key for modeline example"

This reverts commit 97a56145636316fdb431b91ec64adff217287cd9.

The current code detects the mode key, not modeline. Reference:
http://cgit.freedesktop.org/wayland/weston/tree/src/compositor-drm.c#n2464

11 years agoweston.man: Document the way to disable idle timeout
Scott Moreau [Sat, 9 Mar 2013 18:55:40 +0000 (11:55 -0700)]
weston.man: Document the way to disable idle timeout

11 years agoconfig.ini: add examples for cursor-theme and cursor-size
Emilio Pozuelo Monfort [Thu, 14 Mar 2013 16:23:39 +0000 (17:23 +0100)]
config.ini: add examples for cursor-theme and cursor-size

11 years agoweston.ini.man: document cursor-theme and cursor-key
Emilio Pozuelo Monfort [Thu, 14 Mar 2013 16:23:38 +0000 (17:23 +0100)]
weston.ini.man: document cursor-theme and cursor-key

11 years agotoytoolkit: implement cursor-size config key
Emilio Pozuelo Monfort [Thu, 14 Mar 2013 16:23:37 +0000 (17:23 +0100)]
toytoolkit: implement cursor-size config key

11 years agoweston-launch: cleanup - return failures in main with EXIT_FAILURE
Siddharth Heroor [Mon, 11 Mar 2013 21:06:52 +0000 (02:36 +0530)]
weston-launch: cleanup - return failures in main with EXIT_FAILURE

Signed-off-by: Siddharth Heroor <heroor@gmail.com>
11 years agocompositor-rpi: Use correct enum, removes a warning
Philipp Brüschweiler [Sun, 10 Mar 2013 15:08:31 +0000 (16:08 +0100)]
compositor-rpi: Use correct enum, removes a warning

11 years agocompositor: remove unused field option_idle_time
Philipp Brüschweiler [Sun, 10 Mar 2013 13:37:04 +0000 (14:37 +0100)]
compositor: remove unused field option_idle_time

11 years agoweston-launch: return better value if weston dies because of a signal
Philipp Brüschweiler [Sun, 10 Mar 2013 14:14:01 +0000 (15:14 +0100)]
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.

11 years agoweston-launch: move function calls out of assert()
Philipp Brüschweiler [Sat, 9 Mar 2013 18:38:56 +0000 (19:38 +0100)]
weston-launch: move function calls out of assert()

11 years agotoytoolkit: avoid redrawing a window between maximize and configure
MoD [Sat, 2 Mar 2013 23:43:57 +0000 (23:43 +0000)]
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

11 years agowindow: restore maximized state from fullscreen mode if necessary
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:56 +0000 (19:26 +0100)]
window: restore maximized state from fullscreen mode if necessary

This patch sets back maximized mode, if that was its state before going
fullscreen.

11 years agowindow: save allocation only for toplevel window
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:55 +0000 (19:26 +0100)]
window: save allocation only for toplevel window

Thanks to that we will not overwrite saved allocation, when going
fullscreen from maximized state

11 years agoshell: reset rotation for maximized surface
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:54 +0000 (19:26 +0100)]
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)

11 years agoshell: block move, rotate, resize in maximized state
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:53 +0000 (19:26 +0100)]
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)

11 years agopixman-renderer: don't forget to initialize the debug fields
Philipp Brüschweiler [Fri, 8 Mar 2013 19:35:39 +0000 (20:35 +0100)]
pixman-renderer: don't forget to initialize the debug fields

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=61930

11 years agocompositor, shell: surface transform inheritance
Pekka Paalanen [Fri, 8 Mar 2013 12:56:50 +0000 (14:56 +0200)]
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>
11 years agocompositor: introduce weston_surface_geometry_dirty()
Pekka Paalanen [Fri, 8 Mar 2013 12:56:49 +0000 (14:56 +0200)]
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>
11 years agocompositor: remove redundant geometry dirtying
Pekka Paalanen [Fri, 8 Mar 2013 12:56:48 +0000 (14:56 +0200)]
compositor: remove redundant geometry dirtying

Remove redundant geometry dirtying from surface_commit() to simplify
further changes.

This code was added in commit 5df8ecac5d31467122a9d8bda6241d5957ae6848
"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>
11 years agoEat scroll event if a key binding function is executed because of it.
Rune K. Svendsen [Thu, 7 Mar 2013 20:50:00 +0000 (21:50 +0100)]
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.

11 years agoFix memory leaks
Scott Moreau [Thu, 7 Mar 2013 17:15:17 +0000 (10:15 -0700)]
Fix memory leaks

Fix a couple leaks caught by valgrind.

11 years agogl-renderer: Use EXT_buffer_age and don't assume double buffering
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:30 +0000 (17:30 +0200)]
gl-renderer: Use EXT_buffer_age and don't assume double buffering

Now that we have EXT_buffer_age in mesa, we should stop assuming double
buffering and use the buffer age instead.

Note: this will cause system without the extension to repaint the whole
screen every frame.

11 years agocompositor: Don't rely on surface->clip to cull overlay obscured damage
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:29 +0000 (17:30 +0200)]
compositor: Don't rely on surface->clip to cull overlay obscured damage

Before this change, surface->clip would contain the region of this the
surface that is obscured by opaque containing of other surfaces in any
plane. If a surface was obscured only by a surface in another plane and
the renderer was told to draw that region, the rendering would be
clipped because of that.

This patch changes the clip to be plane specific, so that it contains
only the region of the surface obscured by other surfaces in the same
plane. We also calculate a per plane clip, so that we don't tell the
renderer to draw regions of the primary plane that are obscured by
other planes. This damage remains on the primary plane until the its
clip changes so that they are not obscured anymore.

11 years agogl-renderer: Don't change the region supplied to output repaint
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:28 +0000 (17:30 +0200)]
gl-renderer: Don't change the region supplied to output repaint

The core uses this region to clear from the primary plane damage the
area that was repainted. If we add the old buffer damage to that, it
may end up clearing more damage from the primary plane than it was
intended.

11 years agocompositor: Keep a z-ordered list of planes
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:27 +0000 (17:30 +0200)]
compositor: Keep a z-ordered list of planes

This let us clear a plane's opaque region without adding code in the
backend, and will be used in a following commit to change how we track
damage.

11 years agocompositor-drm: Inspect result of gbm_create_device.
John Kåre Alsaker [Sat, 2 Mar 2013 11:27:39 +0000 (12:27 +0100)]
compositor-drm: Inspect result of gbm_create_device.

11 years agosrc/Makefile.am: Fix git-version.h for out of tree builds
Andre Heider [Fri, 1 Mar 2013 14:38:23 +0000 (15:38 +0100)]
src/Makefile.am: Fix git-version.h for out of tree builds

Use --git-dir instead of --work-tree, see
http://marc.info/?l=git&m=120390208721287&w=2

Signed-off-by: Andre Heider <a.heider@gmail.com>
11 years agocompositor: Only send release event in response to wl_surface.attach
Kristian Høgsberg [Mon, 4 Mar 2013 17:11:41 +0000 (12:11 -0500)]
compositor: Only send release event in response to wl_surface.attach

The current semantics would implicitly attach the most recently attached
buffer at commit time and send a release event when the buffer enventually
was released.  The implicit attach is a little too subtle though and this
patch changes the semantics to always only send release events in response
to an attach event.  As a consequence, once a compositor releases a buffer,
it no longer has a reference to it and wl_surfcea.damage is undefined.
Thus, the client side visible change is that damage request must always
be preceeded by a wl_surface.attach request, to ensure there's a valid buffer,
even if that means attaching the same buffer again.

11 years agocompositor: Fold weston_buffer_post_release into weston_buffer_reference
Kristian Høgsberg [Mon, 4 Mar 2013 17:07:46 +0000 (12:07 -0500)]
compositor: Fold weston_buffer_post_release into weston_buffer_reference

Nothing else calls weston_buffer_post_release and the ref-counting and
sending the release event is essentially what weston_buffer_reference is
all about.

11 years agocompositor-drm: Determine opaqueness of a surface correctly
Kristian Høgsberg [Fri, 1 Mar 2013 19:29:16 +0000 (14:29 -0500)]
compositor-drm: Determine opaqueness of a surface correctly

We subtract the screen space opaque region from the transformed surface
region.  That's going to fail for when we're scaling up a surface, since
the surface bounding box for the scaled up surface is going to be bigger
than the opaque region.  Instead, subtract the surface-space opaque region
from a 0,0 - width,height region and see if that's empty.

11 years agotests: attach the surface's buffer when moving it
Giulio Camuffo [Thu, 28 Feb 2013 17:44:54 +0000 (18:44 +0100)]
tests: attach the surface's buffer when moving it

move_client() needs to attach the buffer, even if it was attached already,
because since 184df50 configure() will be called only on newly attached
surfaces, but the one that sets the test surface position is the configure
function.