Commit graph

538 commits

Author SHA1 Message Date
Daniel Stone 8de91494b3 desktop-shell: Initialise panel surface listener
The desktop-shell output destroy code assumes that we always set up a
panel listener. Initialise its list explicitly, so if we don't have a
panel, then we can still unconditionally destroy the listener on output
destroy.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-01-16 15:13:39 +00:00
Abdur Rehman 7f1da1f524 desktop-shell: fix a typo
Signed-off-by: Abdur Rehman <arehmanq199@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2017-01-03 11:58:49 +00:00
Quentin Glidic e8bf959764 desktop-shell: Properly position the panel surface
Now weston actually supports putting the panel at the bottom of the
screen.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21 18:17:49 +00:00
Quentin Glidic 581df06ad1 desktop-shell: Compute panel size without using output
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21 18:17:46 +00:00
Quentin Glidic 920cf048f3
desktop-shell: Add back the saved position and rotation for fullscreen/maximized
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-07 12:21:09 +02:00
Quentin Glidic 18a81acc17
desktop-shell: Unset fullscreen/maximized state on commit
This only stores the current state, as libweston-desktop is still in
charge of double-buffering it.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-07 12:21:05 +02:00
Bryce Harrington b3197f447e Revert "desktop-shell: Enable per-output fade animations"
This reverts commit fde5adbedb.

(Accidental landing)
2016-08-30 12:05:27 -07:00
Bryce Harrington 0795ece4b2 Revert "shell: Inhibit idle fade-out behavior"
This reverts commit 9be807c69b.

(Accidental landing)
2016-08-30 12:04:26 -07:00
Bryce Harrington 9be807c69b shell: Inhibit idle fade-out behavior
When a client has registered idle inhibition on a surface, don't trigger
the fade-out animation on the output(s) the surface is displayed on.
But when the surface is destroyed or the inhibitor itself is destroyed
by client request, re-queue the fade out animation.
2016-08-29 18:36:13 -07:00
Bryce Harrington fde5adbedb desktop-shell: Enable per-output fade animations
Instead of creating a single global fade surface across all outputs,
create a separate surface for each output.  This will permit
e.g. individual fades for each output (or blocking the fade-outs if
inhibiting idling as will come in a latter patch.)

This also fixes a potential issue if on multihead layout spanning a
desktop wider than 8096 (or higher than 8096), the fade animation may
not completely cover all surfaces.

This assumes the output geometry doesn't change larger during the course
of the fade animation.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

v5:
  + Use the new libweston-desktop API for dropping idle inhibitor to
  	ensure fade_out gets triggered if the client destroys the inhibitor
  	early.
  + Fix a crash when running multi-head due to double free of animations
  + Split idle inhibition implementation to a subsequent patch
2016-08-29 18:36:13 -07:00
Quentin Glidic fff39817bc
libweston: Drop shell_interface
Its usage is now limited to some dock-related helper, and the plugin
registry is a better fit for that kind of helper.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2016-08-27 18:45:38 +02:00
Quentin Glidic 561201c689
desktop-shell: Fix output destroying
Now we properly unregister from the panel/background surface destroy
signals if the output is destroyed first.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
2016-08-20 18:27:09 +02:00
Quentin Glidic f01ecee75a
libweston-desktop: Rename _destroy_view to _unlink_view
It doesn't destroy the view per se (except for internal surfaces) and
require the caller to also destroy the view itself at the appropriate
time.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16 11:10:27 +02:00
Quentin Glidic 729c7fa788
desktop-shell: Properly destroy the weston_desktop_view
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16 10:59:33 +02:00
Quentin Glidic 8f9d90a84b
desktop-shell: Port to libweston-desktop
All the shell protocol details, Xwayland glue and popups (and their
grab) are now handled in libweston-desktop.
Fullscreen methods (for wl_shell) are removed for now.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Giulio Camuffo <giulio.camuffo@kdab.com>

Differential Revision: https://phabricator.freedesktop.org/D1209
2016-08-14 09:29:08 +02:00
Quentin Glidic 2edc3d5462
libweston: Rename weston_surface::configure to ::committed
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Giulio Camuffo <giulio.camuffo@kdab.com>

Differential Revision: https://phabricator.freedesktop.org/D1246
2016-08-14 09:28:50 +02:00
Jussi Kukkonen 649bbce607 include stdint.h for int32_t/uint32_t
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-26 16:26:08 -07:00
Jonas Ådahl 94e2e2d39f compositor: Keep track of what views were activated by clicking
Adds a weston_view_activate() that can be passed an additional active
flag WESTON_ACTIVATE_CLICKED, that the shell passes when a view was
activated by clicking.

This allows shell-independent components implement heuristics depending
on how a view was activated.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-26 17:21:15 +08:00
Jonas Ådahl 4361b4ea3f desktop-shell: Pass a flag bitmask instead of bool to activate()
Although it currently only has one available flag, but that'll change.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-26 17:21:15 +08:00
Jonas Ådahl 1fa6dedb82 desktop-shell: Make activate() take a view instead of surface
In preparation for further refactorings.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-26 17:21:15 +08:00
Jonas Ådahl 90c90b205f desktop-shell: Change switcher to track views
Preparation for future refactorings.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-07-26 17:21:15 +08:00
Jonas Ådahl 7bfb113dbe desktop-shell: Track the black surface by its view
In preparation for further refactoring.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Arnaud Vrac <avrac@freebox.fr>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-07-26 17:21:15 +08:00
Jonas Ådahl ef8e1c31e3 input: Activate view no matter the keyboard focus
Activate a view even though it effectively may already be active.
Without this, in later patches, it won't be possibe to track what view
was activated by clicking last, as a view which surface already had
keyboard focus, won't be activated.

To keep avoiding sending xdg_surface.configure events, only change the
keyboard focus if the focus actually changed.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-07-26 17:21:15 +08:00
Armin Krezović 4663aca2e2 desktop-shell: update for manual surface/view mapping
This is a follow up for desktop-shell to manually
set mapped status for views/surfaces it controls

v2:

- Add manual mapping to shell_fade_create_surface()
  and shell_ensure_fullscreen_black_view()

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-07-01 15:29:26 +03:00
Bryce Harrington 260c2ffd97 input: Rename weston_surface_activate to weston_seat_set_keyboard_focus
The name suggests that it activates surfaces, but the code says it
rather just assigns keyboard focus.  Rename it for clarity, and so the
original function name could be used for something more appropriate
later.  Switch order of parameters since keyboard focus is a property of
the seat.  Update all callers as appropriate.

Change was asked for by pq, May 26, 2016:

 "This should be called weston_seat_set_keyboard_focus(seat, surface).
 Keyboard focus is a property of the seat."

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-30 13:15:33 +03:00
Armin Krezović c77f258b4a desktop-shell: Avoid NULL pointer dereference
When there are no outputs present, an output pointer
can be NULL. Dereferencing such pointer will result
in a crash.

Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
2016-06-27 13:17:05 +03:00
Armin Krezović 10b0618c07 desktop-shell: Return NULL when no outputs are present
Currently, get_default_output returns a first member
of the linked list, which can never be NULL.

This is problematic, as the function would return a
dangling pointer and NULL pointer checks wouldn't
work where needed and some of the invalid members
would get accessed that way, resulting in a crash.

Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
2016-06-27 13:17:05 +03:00
Pekka Paalanen 58f98c99f5 Move weston source to compositor/
This is the start of separating weston-the-compositor source files from
libweston source files.

This is moving all the files related to the 'weston' binary. Also the
CMS and systemd plugins are moved.

xwayland plugin is not moved, because it will be turned into a
libweston feature.

To avoid breaking the build, #includes for weston.h are fixed to use
compositor/weston.h. This serves as a reminder that such files may need
further attention: moving to the right directory, or maybe using the
proper -I flags instead.

v2: Move also screen-share.c, and add a note about weston-launch.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
Acked-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: rebased]
2016-06-23 17:44:54 +03:00
David Fort 50d962fc07 desktop-shell: resize background and panel surfaces on output resize v4
When an output is resized (permanent mode switch), we should also notify the
shell client so that the panel and background fits to the new screen dimensions.

Signed-off-by: David Fort <contact@hardening-consulting.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-10 11:52:01 +03:00
Giulio Camuffo d52f3b775b compositor: remove the weston_config field in weston_compositor
The config can now be retrieved with a new function defined in weston.h,
wet_get_config(weston_compositor*).

Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-06-03 13:16:39 +03:00
Giulio Camuffo 26f62d4247 Move part of screenshooter.c to weston-screenshooter.c
This patch splits screensooter.c so that the code implementing
the private screenshooter protocol and launching the client is
moved to a weston specific file, leaving only the code that can
be shared between compositors in screenshooter.c.
Two exported functions are added in screenshooter.c to start and
stop the recorder.

Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-03 13:16:39 +03:00
Emmanuel Gil Peyrot 28834b6472 desktop-shell: Don’t reconfigure an already fullscreen surface
When we receive an wl_shell_surface::set_fullscreen request for a
surface that was already fullscreen, don’t do anything if the
parameters are the same as the initial request.

This prevents bogus or malicious clients from being able to always stay
on front by flooding the compositor with set_fullscreen requests after
the user has put them in the background with a mod+tab.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-19 17:52:46 -07:00
Quentin Glidic 5c20195e7a compositor.h: Add shell_interface.get_output_work_area
This will allow plugins to be aware of e.g. panels, to avoid covering
them with other surfaces.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-03 15:45:24 +03:00
Yong Bakos bbb783a957 desktop-shell: Use 'surface-local' to correct grammar
Correct the pluralization by simplifying with 'surface-local'.

See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-29 16:33:01 -07:00
Jonas Ådahl 10257ee5d9 desktop-shell: Get rid of some unused fields
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-22 10:31:21 +08:00
Jonas Ådahl d3a3ee980d desktop-shell: Unset the shell surface owner when it goes away
On client destruction, the shell object may be destroyed before the
shell surface objects. If this happens to two surfaces of the same
client, and one surface being destroyed results in the focus being
switched to the other, this would trigger a ping event.

The ping event sending function relies on having a valid owner, and if
the shell would be destoryed prior to the shell surface, we'd crash in
this function.

Solve this by unsetting the owner pointer when the shell client goes
away and early out in the ping event sending function if the owner is
gone.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-22 10:31:21 +08:00
Giulio Camuffo 90a6fc659f input: use doubles in the interfaces to notify of input events
This patch is a further step in the wl_fixed_t internal sanitization.
It changes the notify_* functions to take doubles instead of wl_fixed_t
but does not change how these are stored in the various input structs
yet, except for weston_pointer_axis_event.
However this already allows to remove all wl_fixed_t usage in places
like the libinput or the x11 backend.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-03-23 14:05:09 +02:00
Derek Foreman bbde643ecd shell: Don't send extra configure events on click
The click_to_activate handler fires on every mouse click for a surface
so let's be a little quicker to early return if you're clicking on the
surface that already has activation.

This prevents (among other side effects) the sending of two xdg_configure
events for every mouse click.

This should also make having two seats with keyboards behave in the same
way as a single seat.  Previously the second seat could have a keyboard
focus on the surface and prevent some of the extra processing (including
the extra configure events) from taking place.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-02-16 21:55:46 -08:00
Bryce Harrington 22b1f93432 shell: Check more thoroughly for undefined surface resource
The surface can have an undefined resource in certain situations (such
as with xwayland).  So, since NULL is a valid state for this parameter,
and since the wl_resource_*, etc. calls require their parameters to be
non-NULL, make a practice of always checking the surface resource before
making wayland calls.

update v2:
  * Fix some c/p errors for pointer names
  * Drop null ptr check in add_popup_grab; probably redundant now

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-03 19:05:12 -08:00
Peter Hutterer 87743e9303 Support axis source, axis discrete, frame and axis stop events
[jonas: only send focus wl_pointer.frame if resource supports it]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-01-19 12:33:26 +08:00
Peter Hutterer 89b6a4931e Add a weston_pointer_axis_event
Use an event struct to pass axis events around. This helps dealing with the
upcoming axis discrete changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-01-19 10:53:16 +08:00
Bob Ham 553d12488c desktop-shell: Allow binding-modifier weston.ini option to be none
Allow the binding-modifier option in weston.ini to take a value of
"none", meaning that none of the usual Super+Tab, Super+K, Super+Fn,
etc. key bindings will be enabled.

Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-01-12 09:25:28 -06:00
Bob Ham 744e65317d desktop-shell: Make zapping configurable
Add a new boolean weston.ini option, "allow-zap" to enable or disable
the Ctrl-Alt-Backspace key combination.

Signed-off-by: Bob Ham <bob.ham@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-01-12 09:24:05 -06:00
Giulio Camuffo f05d18f3ee xwm: let the shells decide the position of X windows
The xwm used to automatically send to Xwayland the position of X windows
when that changed, using the x,y of the primary view of the surface.
This works fine for the desktop shell but less so for others.
This patch adds a 'send_position' vfunc to the weston_shell_client that
the shell will call when it wants to let Xwayland know what the position
of a window is.
The logic used by the desktop-shell for that is exactly the same the xwm
used to have.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: David Fort <contact@hardening-consulting.com>
2015-12-18 11:48:25 -06:00
Jonas Ådahl 2cbf293b05 input: Keep per client pointer resources in their own structs
Keep all per client wl_pointer resources in a new struct called
'weston_pointer_client'. When focus changes, instead of moving a list
of resources between different lists, just change the focused pointer
client.

The intention with this is to make it easier to add wl_pointer
extensions that share the same focus as the corresponding wl_pointer.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-20 11:52:19 +08:00
Jonas Ådahl d2510105a6 input: Make pointer grab motion callbacks take an event struct
Instead of only passing absolute pointer coordinates, effectively
loosing motion event data, pass a struct that can potentially contain
different types of motion events, currently being absolute and relative.

A helper function to get resulting absolute coordinates was added for
when previous callbacks simply used the (x, y) coordinates.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-11-20 11:44:56 +08:00
Jonas Ådahl 5b0b770c2d Remove workspaces protocol
It doesn't fill a useful function and is not intended to be continued.
If there is need for workspace manipulation from clients a protocol
based on those future needs need to be properly designed.
workspaces.xml is probably not very relevant since it did the bare
minimum.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 15:11:08 +02:00
Jonas Ådahl 6d6fb61a32 desktop-shell: Rename protocol weston_desktop_shell
In the effort of going away from generic names of protocols only
relevant for weston, rename the weston desktop shell
weston_desktop_shell.

This also resets the version to 1, as there will be no prior versions
to weston_desktop_shell.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 14:58:58 +02:00
Jonas Ådahl 2a229338a5 Use xdg_shell protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
2015-11-19 14:49:52 +02:00
Jonas Ådahl b57f472c84 Use input method protocol from wayland-protocols
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-11-19 13:17:59 +02:00
Peter Hutterer 1118952e14 desktop-shell: use weston_pointer_send_axis
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-11-16 12:09:07 +08:00
Jonas Ådahl 0336ca0cc5 input: Pass axis events through pointer grab interfaces
Don't only send motions and buttons but also axis events through the
pointer grab interface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-11-02 14:30:16 +08:00
Jonas Ådahl 22faea11c8 desktop-shell: Add surface_keyboard_focus_lost helper
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-11-02 14:10:01 +08:00
Jonas Ådahl cd0f1acff4 desktop-shell: Make activate_binding take a view instead of surface
In preparation for further refactoring. This patch also removes a
redundant NULL check. Since we pass views, and views will always have an
associated surface, there is no point of checking if it has.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-23 17:03:54 -07:00
Marek Chalupa 6ce78992a0 shell: fix maximizing windows on a secondary output
commit f814c5dc9 changed get_output_work_area behaviour
which broke the code for positioning maximized window.
The x position was set to 2*output->x instead of to output->x

fix https://bugs.freedesktop.org/show_bug.cgi?id=92357

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-09 15:24:04 -05:00
Nicolas Guyomard 4845354cfa input-panel: Fix show_input_panel_surface crash when no surface has focus
Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-10-07 17:13:17 -07:00
Derek Foreman bdc8c721e4 cosmetic: Remove a few double semicolons
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-07 11:22:03 -07:00
Jonas Ådahl bc5d849c9d desktop-shell: NULL check whether a popup parent is a shell surface
get_shell_surface(parent) may return NULL if the client passed a
unassigned wl_surface or a wl_surface with a non-shell surface role
(such as cursor role).

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

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2015-10-07 11:43:59 -05:00
Ben Hummon 445e44cfb2 clients: Moving and rotating transient surfaces
Transient surfaces use child/parent surfaces for stacking order. This
change resloves an issue in which attempting to move or rotate a
toplevel transient surface can move or rotate its ancestor.
2015-10-06 15:24:28 -05:00
Derek Foreman 45a7c27f2b clients: If available, prefer top level surfaces for move or rotate
This stops us from rotating or moving pop-up menus by instead rotating
their parents.

This is easiest to see using a multi-seat configuration.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-09-15 06:51:15 -07:00
Derek Foreman c0c1497f99 shell: Make sure we actually have a resource in end_busy_cursor
It's actually possible to get here after the surface has been destroyed,
especially when running client apps under valgrind.

That probably shouldn't be able to segfault the compositor.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-09-14 11:33:31 -07:00
Derek Foreman f9318d1452 input: add a weston_pointer_clear_focus() helper function
Valgrind has shown that in at least one place (default_grab_pointer_focus)
we're testing uninitialized values coming out of weston_compositor_pick_view.

This is happening when default_grab_pointer_focus is called when there is
nothing on the view list, and during the first repaint when only the black
surface with no input region exists.

This patch adds a function to clear pointer focus and also set the sx,sy
co-ordinates to a sentinel value we shouldn't compute with.

Assertions are added to make sure any time pointer focus is set to NULL
these values are used.

weston_compositor_pick_view() now returns these values too.

Now the values are always initialized, even when no view exists, and
they're initialized in such a way that actually doing computation
with them should fail in an obvious way, but we can compare them
safely for equality.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-08-06 16:28:30 +01:00
Giulio Camuffo 61ed7b6bf0 input: pass the global touch coordinates to the touch grab
This makes it consistent with the pointer grab, which also gets
global coordinates and not surface relative ones, and allows to
easily filter out gestures based on compositor global hotspots.

Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-08-06 16:21:01 +01:00
Derek Foreman e4d6c83986 desktop-shell: Make resize and move functions take a pointer instead of a seat
An earlier patch made surface_resize() and surface_move() take pointers
instead of seats, this updates the weston_shell_interface resize and move to
match.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-08-06 16:16:14 +01:00
Derek Foreman e42d754843 desktop-shell: drop shell_client from the head of the surface list on destroy
This prevents a use after free when the surfaces are automatically cleaned
up later, as shell_client's freed node was still in the surface list.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-08-06 16:04:15 +01:00
Derek Foreman 1281a36e3b input: Don't test keyboard/pointer/touch pointers
Keyboards and pointers aren't freed when devices are removed, so we should
really be testing keyboard_device_count and pointer_device_count in most
cases, not the actual pointers. Otherwise we end up with different
behaviour after removing a device than we had before it was inserted.

This commit renames the touch/keyboard/pointer pointers and adds helper
functions to get them that hide this complexity and return NULL when
*_device_count is 0.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-31 15:16:09 -07:00
Derek Foreman 006cf67c77 desktop-shell: Check for device presence properly
We should be testing device counts, not pointers.  The pointers are
persistent state that never gets freed, and are an inaccurate indicator
of device presence after a release.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-31 15:16:03 -07:00
Derek Foreman 60d97311be desktop-shell: Don't call wl_list_init() in the middle of a list
seat->keyboard_focus_listener.link isn't a head, it's just sometimes a
member of the focus signal list.  Calling wl_list_init() on it puts
a loop in the list.

Instead, we remove the item then init it.  That way we can call remove on
it again later even if it hasn't been re-added to a list.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-31 15:15:59 -07:00
Derek Foreman 22276a596a zoom: Store the seat that initiated a zoom
Track the seat that initiated a seat instead of picking the first one.

Previously, if there are multiple seats then any seat can adjust the zoom
level but the zoom tracks the first seat's pointer.

Now the zoom will follow the pointer of the seat that initiated the zoom.

Additionally, if there's no pointer in the first seat, starting a zoom
with the second seat will no longer crash weston.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-29 19:54:17 -07:00
Derek Foreman 25bd8a71fc zoom: Call weston_output_activate_zoom() appropriately
No longer call weston_output_update_zoom() when trying to zoom out
on an unzoomed output.

Add an assert() to make sure update_zoom is never called without an
active zoom.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-29 19:47:31 -07:00
Derek Foreman 004b4a1dc1 desktop-shell: Put monitor to sleep when idle timer expires
Removing the screensaver had the accidental side effect of disabling
DPMS display shut down.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-23 10:54:47 -07:00
Derek Foreman d8156e22f6 exposay: Fix use after free when a view is destroyed during animation
Moving the destroy listener setup allows the animation completion handler
to be called before we free any structures it needs.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-17 19:02:28 -07:00
Derek Foreman daf846e4ea exposay: Fix logic inversion when ending keyboard grabs
I flipped a ! in cee82d6286
and the exposay keyboard grab became permanent.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-17 18:59:35 -07:00
Derek Foreman 6feb0f9f55 desktop-shell: use work area instead of panel size to constrain moves
This fixes the case where an output isn't at y = 0, where the panel height
isn't correct for constraints.

It also kills a bug - moving a window with a mod-drag off the top of the
screen clamped earlier than it should.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-17 17:46:58 -07:00
Derek Foreman 612341f1a6 desktop-shell: use output position in get_output_panel_size()
The panel size calculation needs to take the output position into account
or it's only correct when the output is at 0, 0.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-17 17:46:54 -07:00
Derek Foreman f814c5dc9d desktop-shell: add output co-ordinates to get_output_work_area()
get_output_work_area() now returns the absolute work area including the
output's offset.

This will make math a little simpler later when we use it to constrain
window moves.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-17 17:46:49 -07:00
Derek Foreman 2217f3f738 shell: Switch middle and right mouse bindings
Currently rotate is on the right mouse button and resize is on the middle.

As fantastic as rotating windows is, it's probably nicer to have resize on
the right button, especially for anyone with only 2 buttons.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-16 19:35:19 -07:00
Derek Foreman f7b2f8b0a6 desktop-shell: Use the grabbed pointer in popup_grab_button
This should be identical to the pointer in shset->seat.

A later patch prevents direct access to seat->pointer, using the
known valid pointer in the grab will be nicer than using the
getter functions that patch introduces.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:19 -07:00
Derek Foreman 8fbebbd985 desktop-shell: Make surface_resize take a pointer instead of a seat
It doesn't actually need the seat and we have to validate that the seat
has a pointer before making the call, so it's safer just to pass
the validated pointer.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:17 -07:00
Derek Foreman 74de4693b7 desktop-shell: Make surface_rotate take a pointer instead of a seat
It doesn't actually need the seat and we have to validate that the seat
has a pointer before making the call, so it's safer just to pass
the validated pointer.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:07 -07:00
Derek Foreman 794fa0e031 desktop-shell: Make surface_move take a pointer instead of a seat
It doesn't actually need the seat and we have to validate that the seat
has a pointer before making the call, so it's safer just to pass
the validated pointer.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:04:04 -07:00
Derek Foreman b7674ae4dc desktop-shell: Make surface_touch_move take a touch instead of a seat
It never actually needs the seat, and we always verify the touch pointer
before calling it, so let's just pass a touch pointer instead of having
an assumption that the seat's touch pointer has been verified.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:56 -07:00
Derek Foreman 8ae2db5b0c input: Pass the appropriate pointer type to bindings instead of a seat
Normally we need to check if a seat's [device_type]_count is > 0 before
we can use the associated pointer.  However, in a binding you're
guaranteed that the seat has a device of that type.  If we pass in
that type instead of the seat, it's obvious we don't have to test it.

The bindings can still get the seat pointer via whatever->seat if they
need it.

This is preparation for a follow up patch that prevents direct access
to seat->device_type pointers, and this will save us a few tests at
that point.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:43 -07:00
Derek Foreman cee82d6286 exposay: Test keyboard presence before using keyboard pointer
We shouldn't actually use the keyboard pointer unless we check that
a keyboard is present.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2015-07-16 19:03:32 -07:00
Derek Foreman cf7d95a688 desktop-shell: make client_initiated a bool
Make it a bool in both surface_move() and struct weston_move_grab

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-10 17:11:33 -07:00
Mario Kleiner 492c12fb8b desktop-shell: Allow fullscreen windows to mode-switch their output.
Fix desktop-shell's activate() method to only restore the output
mode on the single output on which a shell surface gets activated.

This way toplevel fullscreen surfaces can mode-switch their output
via method WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER and that
temporary mode properly persists until the surface loses its
fullscreen status, but effects like window switching and exposay
still work in the expected way.

v2: Split into a separate patch from original patch
    "Allow restore_output_mode() to work properly.",
    as suggested by Derek Foreman.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-07-02 15:14:30 +03:00
Mario Kleiner 9f4d655494 desktop-shell: Allow multiple active fullscreen windows on multi-display setup.
Desktop shell demoted all fullscreen shell surfaces on all active
outputs of a multi-display setup whenever any shell surface was
activated anywhere. This made it impossible to have multiple
fullscreen windows on separate outputs active at the same
time, as creating or activating any shell surface would disable
fullscreen status for all existing fullscreen surfaces.

Make lower_fullscreen_layer() more selective, so on request it
only demotes fullscreen surfaces on a specified weston_output.

The activate() method for a specific surface will now only request
demotion of fullscreen surfaces on the target output of the activated
surface, but leave fullscreen surfaces on unrelated outputs alone.

Desktop wide acting functions like the window switcher or exposay
will still demote all fullscreen surfaces on all outputs to
implement their effect as before.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-06-30 12:12:53 -07:00
Pekka Paalanen aa9536a992 text_backend: make destructor call explicit
We used to rely on the order in which the
weston_compositor::destroy_signal callbacks happened, to not access
freed memory. Don't know when, but this broke at least with ivi-shell,
which caused crashes in random places on compositor shutdown.

Valgrind found the following:

 Invalid write of size 8
    at 0xC2EDC69: unbind_input_panel (input-panel-ivi.c:340)
    by 0x4E3B6BB: destroy_resource (wayland-server.c:537)
    by 0x4E3E085: for_each_helper.isra.0 (wayland-util.c:359)
    by 0x4E3E60D: wl_map_for_each (wayland-util.c:365)
    by 0x4E3BEC7: wl_client_destroy (wayland-server.c:675)
    by 0x4182F2: text_backend_notifier_destroy (text-backend.c:1047)
    by 0x4084FB: wl_signal_emit (wayland-server-core.h:264)
    by 0x4084FB: main (compositor.c:5465)
  Address 0x67ea360 is 208 bytes inside a block of size 232 free'd
    at 0x4C2A6BC: free (vg_replace_malloc.c:473)
    by 0x4084FB: wl_signal_emit (wayland-server-core.h:264)
    by 0x4084FB: main (compositor.c:5465)

 Invalid write of size 8
    at 0x4E3E0D7: wl_list_remove (wayland-util.c:57)
    by 0xC2EDEE9: destroy_input_panel_surface (input-panel-ivi.c:191)
    by 0x4E3B6BB: destroy_resource (wayland-server.c:537)
    by 0x4E3BC7B: wl_resource_destroy (wayland-server.c:550)
    by 0x40DB8B: wl_signal_emit (wayland-server-core.h:264)
    by 0x40DB8B: weston_surface_destroy (compositor.c:1883)
    by 0x40DB8B: weston_surface_destroy (compositor.c:1873)
    by 0x4E3B6BB: destroy_resource (wayland-server.c:537)
    by 0x4E3E085: for_each_helper.isra.0 (wayland-util.c:359)
    by 0x4E3E60D: wl_map_for_each (wayland-util.c:365)
    by 0x4E3BEC7: wl_client_destroy (wayland-server.c:675)
    by 0x4182F2: text_backend_notifier_destroy (text-backend.c:1047)
    by 0x4084FB: wl_signal_emit (wayland-server-core.h:264)
    by 0x4084FB: main (compositor.c:5465)
  Address 0x67ea370 is 224 bytes inside a block of size 232 free'd
    at 0x4C2A6BC: free (vg_replace_malloc.c:473)
    by 0x4084FB: wl_signal_emit (wayland-server-core.h:264)
    by 0x4084FB: main (compositor.c:5465)

 Invalid write of size 8
    at 0x4E3E0E7: wl_list_remove (wayland-util.c:58)
    by 0xC2EDEE9: destroy_input_panel_surface (input-panel-ivi.c:191)
    by 0x4E3B6BB: destroy_resource (wayland-server.c:537)
    by 0x4E3BC7B: wl_resource_destroy (wayland-server.c:550)
    by 0x40DB8B: wl_signal_emit (wayland-server-core.h:264)
    by 0x40DB8B: weston_surface_destroy (compositor.c:1883)
    by 0x40DB8B: weston_surface_destroy (compositor.c:1873)
    by 0x4E3B6BB: destroy_resource (wayland-server.c:537)
    by 0x4E3E085: for_each_helper.isra.0 (wayland-util.c:359)
    by 0x4E3E60D: wl_map_for_each (wayland-util.c:365)
    by 0x4E3BEC7: wl_client_destroy (wayland-server.c:675)
    by 0x4182F2: text_backend_notifier_destroy (text-backend.c:1047)
    by 0x4084FB: wl_signal_emit (wayland-server-core.h:264)
    by 0x4084FB: main (compositor.c:5465)
  Address 0x67ea368 is 216 bytes inside a block of size 232 free'd
    at 0x4C2A6BC: free (vg_replace_malloc.c:473)
    by 0x4084FB: wl_signal_emit (wayland-server-core.h:264)
    by 0x4084FB: main (compositor.c:5465)

Looking at the first of these, unbind_input_panel() gets called when the
text-backend destroys its helper client which has bound to input_panel
interface. This happens after the shell's destroy_signal callback has
been called, so the shell has already been freed.

The other two errors come from
  wl_list_remove(&input_panel_surface->link);
which has gone stale when the shell was destroyed
(shell->input_panel.surfaces list).

Rather than creating even more destroy listeners and hooking them up in
spaghetti, modify text-backend to not hook up to the compositor destroy
signal. Instead, make it the text_backend_init() callers' responsibility
to also call text_backend_destroy() appropriately, before the shell goes
away.

This fixed all the above Valgrind errors, and avoid a crash with
ivi-shell when exiting Weston.

Also using desktop-shell exhibited similar Valgrind errors which are
fixed by this patch, but those didn't happen to cause any crashes AFAIK.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-06-26 09:33:54 +03:00
Pekka Paalanen b37ac4006a desktop-shell: remove screensaver support
This is a follow-up for the patch that removed weston-screensaver. The
aim is to clean up shell.c a little by removing non-essential
components. Vanilla Weston desktop is only a demo, external projects are
encouraged to create user-friendly desktop environments.

The support for launching a screensaver client and the protocol bindings
are removed. With them, all related configuration options are removed,
and the manuals are updated accordingly.

The screensaver protocol definition is left in desktop-shell.xml for
posterity.

This does not affect Weston's or desktop-shells ability to put screens
to sleep after inactivity. The inactivity timer continues to operate as
before. Also screen locking is unaffected.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2015-06-22 15:19:39 +03:00
Jon Cruz 867d50eea7 Unified multiple definitions of container_of() macro.
Removed duplicate definitions of the container_of() macro and
refactored sources to use the single implementation.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-15 17:11:58 -07:00
Jon Cruz d618f688d5 Moved the MIN() macro to the helper include.
Removed multiple definitions of the MIN() macro from existing
locations and unified with a single definition. Updated sources
to use the shared version.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-15 17:11:52 -07:00
Jon Cruz 4678bab13c Remove redundant #include path component.
Using the parent '../' path component in #include statements makes
the codebase more rigid and is redundant due to proper -I use.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-15 17:11:09 -07:00
Bryce Harrington af637c25f2 *-shell: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
Murray Calavera 9a51cd7d10 move text_backend initialization into the shell plugin
Whether a input method is used should be the responsibility
of the shell because some shells may not want to implement
an input method at all

Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-06-11 12:20:46 +03:00
Pekka Paalanen 23ed5f2526 desktop-shell: do not black out with startup "none"
Do not use a black blanket surface when the startup animation is
specified to be "none". This is the final fix needed to make the
screenshot test deterministic and independent of weston-desktop-shell.

Previously, the black surface would cover all outputs until
weston-desktop-shell signalled ready. Then, depending on the set
animation, either the black surface was immediately removed (none) or a
fade-in started (fade).

Now, when there is no black surface at all for "none", the compositor
will show garbage until weston-desktop-shell gets everything up. This
may be undesireable but works for tests. To have the old "none"
behaviour back, I would propose to add a new startup-animation value
"black" for it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
2015-05-26 15:43:02 +03:00
Derek Foreman 039e9be49d desktop-shell: destroy surfaces in an idle handler after fade out
It's possible for more than one animation to be taking place on a view at
the same time.  If one of those animations is the shell's fade out for
dying surfaces, its completion handler will trigger the surface destroy
signal, causing other animations on the animation list to remove themselves.

Since this removal occurs during the linked list walk, the compositor may
crash.

We move the actual surface destruction into an idle handler to avoid this.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-05-26 13:07:58 +03:00
Derek Foreman 3dd570e754 exposay: Don't crash if no pointer is present
If the compositor has never seen a mouse, exposay will crash because
the seat->pointer pointer is NULL.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-05-26 12:48:12 +03:00
Michael Vetter 2a18a52844 remove trailing whitespaces
Remove trailing whitespaces because they are not needed and jumping to
the end of al ine should do just that and not jump to the whitespace.
2015-05-15 13:12:32 -07:00
Ryo Munakata 79954ec9fe desktop-shell: set the current size in the first 'resizing' configure event
Weston has sent the first 'resizing' configure event with width=height=0.
But resizing to that size doesn't make sense.
Instead, we now send the current width and height of the surface at the beginning
of resizing.

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
2015-05-08 14:17:00 -07:00
Jonas Ådahl ee45a55dea xdg-shell: Move xdg_shell.get_xdg_popup errors to xdg_shell
They are errors that may be as a result of calling get_xdg_popup on an
xdg_shell, not a result of calling a request on xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-05-05 14:17:11 +08:00
Jonas Ådahl 49d77d20ae xdg-shell: Require proper object tree destruction
Require all child objects to be destroyed before the parent. In other
words, all popups and surfaces created by one xdg_shell instance needs
to be destroyed before the xdg_shell object, otherwise a protocol error
is raised.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-05-05 14:17:01 +08:00
Derek Foreman 4c93c08679 touch: Make weston_touch_set_focus() take a touch instead of a seat
The other set_focus() functions take the relevant type instead of a seat
already, so this is consistent.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-05-01 12:42:52 +01:00
Dima Ryazanov 497f25de57 desktop-shell: Require a popup parent to be a shell surface
Currently, the shell crashes if the parent is not a shell surface. Instead,
send an error to the client.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-04-13 15:23:13 +03:00
Giulio Camuffo a8e9b41578 xwm: tell the shell the pid of the X clients
All the surfaces from all the X clients share the same wl_client so
wl_client_get_credentials can't be used to get the pid of the X
clients.
The shell may need to know the pid to be able to associate a surface
with e.g. a DBus service.

[Pekka: fixed trivial merge conflicts.]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-03-30 16:04:57 +03:00
Manuel Bachmann dc1c3e49bb desktop-shell: remove dead unminimization code
The "set_minimized(surface, 0)" function call was never
used anywhere, and not really respecting naming
conventions.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-03-27 15:41:25 +02:00
Derek Foreman 70ac0edcab desktop-shell: don't allow negative values in drag resize
Now clamping width and height to a minimum of 1, 1 when drag resizing.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-03-18 10:34:18 -07:00
Ryo Munakata 76fb7ec272 shell,compositor-x11: Fix trivial memory leaks
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-03-09 09:26:46 +02:00
Pekka Paalanen 2829f7c42e compositor,shell: move debug key code to core
The code for the key binding that triggers debug key bindings, that is,
the code that makes mod+SHIFT+SPACE work, used to live in shell.c. I
want to make the debug key bindings available in ivi-shell too, so this
code should be shared. Move it to core.

The code was originally introduced in
commit c509d2b152
so update the copyright in binding.c to reflect that.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-03-02 16:56:01 +02:00
Jasper St. Pierre 5ba1e1d137 xdg-shell: Bump unstable version
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:59:43 +02:00
Jasper St. Pierre 084aa0b6f6 xdg-shell: Add a simple destructor request
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:59:23 +02:00
Jonas Ådahl 24185e2561 xdg-shell: Add invalid_parent error to xdg_popup
Send an invalid_parent error when the client tries to create a popup
with a paren that is neither a xdg_surface nor a xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:59:18 +02:00
Jasper St. Pierre da6ecd0cc5 xdg-shell: Send an error when the client uses the not-topmost popup
Either in destroy or get_xdg_popup.

[jadahl: Verify that the new popup is the top most when mapping instead
of creating. Some renaming.]

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:59:11 +02:00
Jasper St. Pierre 14f330c619 xdg-shell: Remove the flags from get_xdg_popup
There haven't been any ideas for flags, so we don't need a useless,
unused parameter hanging around. Any future ideas should be done with a
new request entirely.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:59:05 +02:00
Jasper St. Pierre ecf2a0f1ca xdg-shell: Remove the serial from popup_done
It doesn't serve any purpose, as it's a serial that the client gave to
the server when starting the popup, which the client already has.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:58:57 +02:00
Jasper St. Pierre 66bc949b72 xdg-shell: Take a xdg_surface as the parent surface
There is no other valid surface that we should be using here.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-27 14:58:35 +02:00
Jonas Ådahl 01193aeb12 desktop-shell: Fix coding style of add_popup_grab
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-23 15:41:57 +02:00
Jonas Ådahl c2b101114f desktop-shell: Simplify popup_end_grab popup_done sending loop
Can just use wl_list_for_each_safe instead of dealing with pointers
ourself.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2015-02-23 15:37:22 +02:00
Jonas Ådahl bf48e21fa1 desktop-shell: Fail if get_xdg_surface is called on an xdg_surface
If a client calls xdg_shell.get_xdg_surface on a surface that is already
an xdg_surface would, prior to this patch, succeed, but cause weston to
crash later when trying to configure. This patch instead sends a role
error to the client complaining that it already is an xdg_surface.

Note that .._set_role() only fails when changing roles, not when setting
the same role twice.

The same is done for xdg_popup.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-02-06 17:46:05 -08:00
Giulio Camuffo 6b4b24155f xwm: support maximizing xwayland windows
This patch adds the maximize button to the window frame for the windows
which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell
via a new method in weston_shell_interface.
Additionally, it also listens for the wm hints coming from the client,
but it doesn't support maximizing a window only vertically or horizontally.
The window will be maximized only when both directions are maximized.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-02-02 16:00:10 -08:00
Derek Foreman 8aeeac827f desktop-shell: Remove unnecessary type casts
Remove a few instances of casting weston_seat to weston_seat.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
2015-02-02 15:00:18 -08:00
Derek Foreman 7ef3bed03c desktop-shell: Don't crash on zoom without a pointer in the seat
The zoom effect zooms at the seat's current pointer location.  When no
pointer is present the zoom key bindings cause a crash.

Instead, check for the absence of a pointer and log a warning.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-30 14:11:29 -08:00
Giulio Camuffo 7a8d67dedf shell: fix positioning of maximized surfaces with a custom geometry 2015-01-27 15:27:39 -08:00
Pekka Paalanen b502654b9f compositor: Implement JSON-timeline logging
Logging is activated and deactivated with the debug key binding 't'.
When activated, it creates a new log file, where it records the events.
The log file contains events and detailed object information entries in
JSON format, and is meant to be parsed in sequence from beginning to the
end.

The emitted events are mostly related to the output repaint cycle, like
when repaint begins, is submitted to GPU, and when it completes on a
vblank. This is recorded per-output. Also some per-surface events are
recorded, including when surface damage is flushed.

To reduce the log size, events refer to objects like outputs and
surfaces by id numbers. Detailed object information is emitted only as
needed: on the first object occurrence, and afterwards only if
weston_timeline_object::force_refresh asks for it.

The detailed information for surfaces includes the string returned by
weston_surface::get_label. Therefore it is important to set
weston_timeline_object::force_refresh = 1 whenever the string would
change, so that the new details get recorded.

A rudimentary parser and SVG generator can be found at:
https://github.com/ppaalanen/wesgr

The timeline logs can answer questions including:
- How does the compositor repaint cycle work timing-wise?
- When was the vblank deadline missed?
- What is the latency from surface commit to showing the new content on
  screen?
- How long does it take to process the scenegraph?

v2: weston_surface::get_description renamed to get_label.
v3: reafctor a bit into fprint_quoted_string().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-08 15:02:56 +02:00
Pekka Paalanen 8274d901f1 compositor: add weston_surface_set_label_func()
When printing out logs from Weston's actions, mainly for debugging, it
can be very difficult to identify the different surfaces.  Inspecting
the configure function pointer is not useful, as the configure functions
may live in modules.

Add vfunc get_label to weston_surface, which will produce a short,
human-readable description of the surface, which allows identifying it
better, rather than just looking at the surface size, for instance.

Set the label function from most parts of Weston, to identify cursors and
drag icons, and panels, backgrounds, screensavers and lock surfaces, and
the desktop shell's application surfaces.

v2: renamed 'description' to 'label', so we get
	weston_surface_set_label_func().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-12-08 14:20:20 +02:00
Pekka Paalanen a4bac9e0e0 desktop-shell: don't crash input-panel if no kbd focus
If a keyboard exists but it has no current focus, yet something asks the
input-panel to come up, we would crash here. Check that there is a focus
before attempting to use it.

Maybe there should not even exist a case where input-panel tries to come
up without a keyboard focus, but I am not sure there is no race where it
could happen.

In any case, this fix was brought up by the ivi-shell work, where I
suppose you can somehow hit it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Tanibata, Nobuhiko <ntanibata@jp.adit-jv.com>
2014-11-24 13:47:32 +02:00
Marek Chalupa e9fe467453 xwayland: fix fullscreening
set_fullscreen has been sending configure before changing the state
and xwayland windows added border to the fullscreen size.

This fixes the bug:
https://bugs.freedesktop.org/show_bug.cgi?id=83502

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-21 15:14:55 +02:00
Derek Foreman 6ae7bc982f compositor: Refactor weston_output_mode_switch()
This breaks weston_output_mode_switch() into 3 functions:
weston_output_mode_set_native()
weston_output_mode_switch_to_temporary()
weston_output_mode_switch_to_native()

Differences from previous behaviour:
SET_NATIVE didn't set current_scale (now it does)
SET_TEMPORARY could set mode and scale independently - now it can't.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-05 13:15:13 +02:00
Pekka Paalanen 50b6747903 compositor: send error for surface role resets
With the more accurate definition of wl_surface roles in Wayland,
enforce the restriction: a role is always set permanently, and
attempting to change it is a protocol error.

This patch is based on Jasper's patch:
http://lists.freedesktop.org/archives/wayland-devel/2014-August/016811.html

The difference in this patch compared to his are:

- send role errors on the interface whose request triggers it, not on
  wl_surface

- an interface could have several requests assigning different roles,
  cannot use wl_interface as the unique key; use an arbitary string
  instead

- ensure in window-manager.c that create_shell_surface() ->
  create_common_surface() is never called with surface->configure set,
  to avoid compositor abort

- use wl_resource_post_no_memory() where appropriate instead of
  hand-rolling it with wl_resource_post_error()

Ideally we would not add weston_surface::role_name field, but use
weston_surface::configure. At the moment this is not possible though,
because at least shell.c uses several different roles with the same
configure function. Drag'n'drop uses two configure functions for the
same role. The configure hook is also reset in several places,
which is not good for role tracking.

This patch overlooks the wl_surface roles assigned in privileged
extensions: screensaver, panel, background, lock, input panel.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-10-08 13:16:30 +03:00
Pekka Paalanen e972b27f34 shell: don't crash on create_common_surface() failure
Noticed while reading code, that create_common_surface() may return
NULL, and callers of its direct callers check for NULL, but the
intermediate function in between would crash.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-10-01 14:58:46 +03:00
Derek Foreman 69c6273f28 shell: fix weston_output_mode_switch() usage
Calling weston_output_mode_switch() with WESTON_MODE_SWITCH_RESTORE_NATIVE
will result in the mode being set "back" to the passed in mode - so the
passed mode should be the native mode.

Additionally, weston_output_mode_switch() should be called when
output->original_mode is non-NULL (which indicates we had a temporary
mode set).  The comparison to current_mode results in a lot of
log chatter.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-22 14:38:13 +03:00
Derek Foreman 4b1a0a1d07 cosmetic: update comments that refer to weston_surface_update_transform()
weston_surface_update_transform() no longer exists, except in comments.

Fix that.

[Pekka Paalanen: don't lose the full comment in compositor-drm.c.]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-11 11:52:56 +03:00
Marek Chalupa 8b771af986 xdg-shell: fix maximizing in multi-head setup
Set the right position of maximized window. Up until now we ignored
output's "position" and were using only the working area
of output which is in output-relative coordinates. This led to
showing the maximized window always on the first output.

This, along with the previous patch, fixes
https://bugs.freedesktop.org/show_bug.cgi?id=82967

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-10 16:33:13 +03:00
Marek Chalupa bfbb64bb75 xdg-shell: update shsurf->output when maximizing
shsurf->output is the output that user expects the shell surface
is on. When maximizing, we don't have any explicit setting of the output
like in the case of fullscreening, so set the output to the one that
the surface is currently on. In the case that the surface is not mapped yet,
(if it ever happens) use the same heuristics as for fullscreening.

This fixes the size sent with configure event, when maximizing a window.
The size is now picked up by the correct output, but the maximized
window position is still wrong. [Pekka Paalanen]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82967
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-10 16:26:00 +03:00
Pekka Paalanen 974c094060 fix asprintf warnings
Fix recently introduced compiler warnings:

desktop-shell/shell.c: In function 'shell_configuration':
desktop-shell/shell.c:588:10: warning: ignoring return value of
'asprintf', declared with attribute warn_unused_result [-Wunused-result]

src/screenshooter.c: In function ‘screenshooter_binding’:
src/screenshooter.c:291:10: warning: ignoring return value of
‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]

src/text-backend.c: In function ‘text_backend_configuration’:
src/text-backend.c:944:10: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-05 14:45:09 +03:00
Marek Chalupa 052917aa2a xdg-shell: handle clients launched in fullscreen
When client is lauched in fullscreen, it is placed on the
first output, because it is not mapped and
shell_surface_set_output() therefore sets default output.

Since we have no better way how to position newly created windows,
(http://lists.freedesktop.org/archives/wayland-devel/2014-May/thread.html#14568)
set the output to the one that has currently focus. Priority has
the touch focus, then pointer and then keyboard focus.

This fixes bug
https://bugs.freedesktop.org/show_bug.cgi?id=69780

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-05 12:10:12 +03:00
Derek Foreman 362656bfa3 touch-input: Don't dereference NULL pointer during full screen fade
If a full screen program is fading out and a touch start happens, it
will result in a NULL pointer dereference when weston_touch_set_focus
tries to derefernce view->surface->resource.

Instead, this patch sets the focus to NULL, which should be the
same as if the program was destroyed during the touch anyway.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78706
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-05 10:32:09 +03:00
Jonny Lamb 76cf1feb3b desktop-shell: implement touch popup grabs
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-09-04 13:34:57 +03:00
Pekka Paalanen 2e62e4ad71 shell: quit weston, if weston-desktop-shell dies early
If weston-desktop-shell dies soon after launch, or maybe cannot be
executed at all, let weston exit rather than letting the user stare at a
black screen.

But, do not exit weston, if weston-desktop-shell dies later, as the user
may already have apps open, and those apps would likely still function
correctly. This gives the user the opportunity to save his work and
close the apps properly.

This should make one class of "I see only black screen" failures obvious.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2014-09-01 10:18:59 +03:00
Pekka Paalanen 826dc14ec4 shell: fix race on desktop-shell exit
The desktop shell plugin registers both a wl_client destroy signal
listener, and a sigchld handler, when launching weston-desktop-shell.
However, nothing guarantees in which order do the wl_client destructor
and the sigchld handler run.

Luckily, the sigchld handler cannot interrupt any code, because we
handle the signal via signalfd, which means it is handled like any event
in the compositor's main event loop.

Still, shell.c has a race, that when lost, can cause a crash, as
described in bug #82957.

If the sigchld handler happens to run first, it will try to launch a new
weston-desktop-shell without removing the destroy listener from the old
wl_client first. This leads to list corruption, that may cause a crash
when the old wl_client gets destroyed.

Simply removing the destroy listener in the sigchld handler is not
enough, because respawning sets shell->child.client pointer, and if
the wl_client destructor runs after, it will reset it to NULL.

OTOH, the wl_client destroy handler cannot reset shell->child.process,
because that would cause the sigchld handler in weston core to not find
the process tracker anymore, and report that an unknown process exited.

Turns out, that to make everything work, we would need to wait for both
the wl_client destructor and the sigchld handler to have run, before
respawn. This gets tricky.

Instead, solve the problem by removing shell->child.process. Use the new
weston_client_start() which automatically creates and manages the struct
weston_process. The shell does not need to know about the process exit,
it only needs to know about the client disconnect. Weston-desktop-shell
will never attempt to reconnect, and it would not work even if it did,
so disconnect is equivalent to weston-desktop-shell exiting.

This should permanently solve the race for weston-desktop-shell.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82957
Cc: Boyan Ding <stu_dby@126.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2014-08-28 10:15:38 +03:00
Arnaud Vrac 4263119d02 desktop-shell: fix invalid memory access when shell execution fails
In this case wl_client_add_destroy_listener() was called with a NULL
client, which is invalid.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-27 16:57:55 +03:00
Ondřej Majerech ae9c4fc39f desktop-shell: Replace magic constants with named ones
Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
2014-08-27 16:03:49 +03:00
Derek Foreman c7210434d4 tests: allow running make check without make install
desktop shell and weston keyboard both refer to themselves prefixed by
LIBEXECDIR, however this is only valid once installed.  make check will
currently either fail or run pre-existing versions.

This patch adds a way to override that location by setting the env var
WESTON_BUILD_DIR - which is then set by the test env script so make check
will test the versions in the build directory regardless of whether they're
installed or not.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-22 17:47:33 +03:00
Pekka Paalanen 71182aed84 xdg-shell: bump experimental protocol version
The experimental versioning has not been updated when it was supposed
to. Let's try to be better at it now, as xdg-shell is close to have its
first stable version.

Bump the version now to bring the world into the same exact version.

There may be some protocol changes still coming, but we try to land them
before 1.6 gets out. Those changes will bump the experimental version
again as needed.

When 1.6.0 is released, the experimental version will no longer be
bumped, and no incompatible protocol changes will be made. Xdg-shell.xml
file will move to Wayland in 1.7.0, drop the experimental versioning,
and become stable.

Cc: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-21 17:47:20 +03:00
Jonny Lamb d73c694afd desktop-shell: use panel location to calculate correct sizes and ranges
Now the client can let us know where the panel is using
desktop_shell.set_panel_position, we can correctly calculate where to
put new views and how big maximized views should be.

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-20 17:06:57 +03:00
Jonny Lamb 765760dc71 desktop-shell: add set_panel_position to help place views onscreen
Panels are always assumed to be on the top edge of the output. If this
is not the case views will be placed under the panel, wherever it is,
and maximize doesn't use the correct space allocated for views.

By telling the server on which edge the panel is located, it can
correctly calculate where to put new views and how big maximized views
should be.

[Pekka Paalanen: the user of this protocol so far is Maynard.]

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-20 17:06:19 +03:00
Jonas Ådahl 61917c84e3 shell: Update focused surface pointer coordinates in popup grab
The commit 'input: Send leave and enter pair when the surface moves
under the cursor' introduced focused surface local pointer coordinates
to keep track of if a surface had been moved or transformed in a way
that the pointer posititon relative to that surface would change.
Update these coordinates also for the popup grab as otherwise every
pointer motion during a popup grab results in leave and then enter
events.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-18 15:36:39 +03:00
Jonny Lamb f322f8efea desktop-shell: add close-animation config option for destroying surfaces
At the moment when surfaces are destroyed they are faded out but let's
make it configurable!

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-18 13:27:11 +03:00
Jasper St. Pierre 666bc9234a desktop-shell: Add a missing return; in an error path 2014-08-08 14:59:48 -07:00
Jasper St. Pierre c91408f3fb Don't bother destroying resources after sending an error
An error makes the client exit, which cleans up the resources anyway.

Note (Jason Ekstrand):
This is safe for two reasons.  First, we should be handling object
destruction nicely anyway.  Second, in each of these cases, the resources
don't have any implementation or destruction set so it has absolutely no
effect on the rest of weston whether we destroy it now or later.
2014-08-08 14:57:17 -07:00
Jonny Lamb e84ab4ef4d desktop-shell: don't assume there's a pointer when mapping a popup 2014-08-07 16:23:10 +03:00
Giulio Camuffo 412e6a59eb compositor: keep track of the weston_layer a weston_view is in
This introduces a new struct, weston_layer_entry, which is now used
in place of wl_list to keep the link for the layer list in weston_view
and the head of the list in weston_layer.
weston_layer_entry also has a weston_layer*, which points to the layer
the view is in or, in the case the entry it's the head of the list, to
the layer itself.
2014-07-23 12:34:33 -07:00
Jasper St. Pierre ccf48fb4f9 shell: Replace set_margin with set_window_geometry
Currently, there is a fun flicker when toggling maximization or
fullscreen on a window in mutter or more sophisicated compositors
and WMs.

What happens is that the client want so go maximized, so we
calculate the size that we want the window to resize to (640x480),
and then add on its margins to find the buffer size (+10 = 660x500),
and then send out a configure event for that size. The client
renders to that size, realizes that it's maximized, and then
says "oh hey, my margins are actually 0 now!", and so the compositor
has to send out another configure event.

In order to fix this, make the the configure request correspond to
the window geometry we'd like the window to be at. At the same time,
replace set_margin with set_window_geometry, where we specify a rect
rather than a border around the window.
2014-07-17 13:59:01 -07:00
Jasper St. Pierre bd65e50875 Interpret the size in the configure event as window geometry
The size of the configure event has always been specified as in window
geometry coordinates, but it was never implemented this way.
2014-07-17 13:58:45 -07:00
Boyan Ding 32abdbbad9 shell: fix segfault in fullscreen binding
Commit 9aa8ce69 forgot to set shsurf->fullscreen_output in
fullscreen_binding(), causing segfault when fullscreening using key
bindings. This patch fixes that.

https://bugs.freedesktop.org/show_bug.cgi?id=79828
Signed-off-by: Boyan Ding <stu_dby@126.com>
2014-06-25 19:59:26 -07:00
Emilio Pozuelo Monfort 5872b6821b desktop-shell: Don't assume there is a pointer when resizing
Fixes a crash on touch devices without a pointer, when touching
the window frame of a client.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
2014-06-23 13:41:30 -07:00
Jonny Lamb 7e7d485164 desktop-shell: make background applications less dark 2014-06-18 17:14:40 -07:00
Emilio Pozuelo Monfort 5905ebcc33 exposay: fix crash when navigating with the keyboard
Commit a7592019 introduced an optimization that caused some
exposay struct members to not be properly initialized, particularly
cur_output, leading to crashes in some circumstances (e.g. pressing
the down arrow key after going to exposay).

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
2014-06-18 17:14:40 -07:00
Jasper St. Pierre 81ff075bf4 xdg-shell: Add show_window_menu request 2014-05-23 09:43:17 -07:00
Jasper St. Pierre 851799e791 shell: Make margin double-buffered state that's applied on commit 2014-05-12 23:34:05 -07:00
Jasper St. Pierre 9aa8ce6985 shell: Don't use the helper methods in xdg_shell implementations
With most of the code in send_configure_for_surface, the helper
methods don't give us that much benefit, so stop using them. We
can't kill them off, as they're part of the shell interface and
used by the WM.
2014-05-12 23:34:05 -07:00
Jasper St. Pierre 6458ec3410 shell: Centralize management of sending configure requests
Currently, there's a giant bug in how xdg-shell state management
is done. If a client calls set_fullscreen and then set_maximized,
it will get two configure events:

  => set_fullscreen
  <= configure(800, 600, [STATE_FULLSCREEN])

  => set_maximized
  <= configure(800, 560, [STATE_FULLSCREEN, STATE_MAXIMIZED])

Since fullscreen takes precedence over maximized, the client will
render full-screen at 800x600 first, and then 800x560 next. As
a result, the surface gets the wrong size.

This is because the code that sends out configure requests is
"immediate" -- when an app calls set_maximized, we immediately
send out the configure event that would have happened if we
transitioned immediately into maximized mode.

In wl_shell, this is correct behavior. However, in xdg-shell,
this is wrong. State needs to be more carefully managed in
xdg-shell, as states aren't exclusive.

Pull all the code that sends out configure events out and send
them centrally, based on Weston's on surface state management.
This should work with both wl_shell and xdg_shell's strategies.
2014-05-12 23:34:05 -07:00
Jasper St. Pierre 973d7879e3 xdg-shell: Turn "activated" into a state
This drops two events, and makes new window decorations race-free with
an attach in-flight.
2014-05-12 23:34:05 -07:00
Jasper St. Pierre 5befdda84f xdg-shell: Turn the resizing heuristics into an explicit state
Currently, there's a race condition. When resizing from the left, and
a client attaches a buffer after the resize ends, you suddenly see the
buffer jump to the right, because the resize ended while multiple
attaches were in-flight. Making resize a state can fix this, as the
server can now know exactly when the resize ended, and whether a commit
was before or after that place.

We don't implement the correct tracking in this commit; that's left as
an exercise to the reader.

Additionally, clients like terminals might want to display resize popups
to display the number of cells when in a resize. They can use the hint
here to figure out whether they are resizing.
2014-05-12 23:34:05 -07:00
Jasper St. Pierre ab2c108137 xdg-shell: Rework the state system
The states system, so far, has been a complicated mix of weird APIs
that solved a real race condition, but have been particularly ugly
for both compositors and clients to implement.
2014-05-12 23:33:59 -07:00
Jasper St. Pierre c815d62b85 xdg-shell: Rename set_transient_for to set_parent
It's a confusing name that comes from the ICCCM. The ICCCM is best
forgotten about.

With the addition of the potential new "transient" role meaning a
parent-relative toplevel like a long-lived popup, used for e.g.
tooltips, the set_transient_for name will become even more confusing.
2014-05-13 00:35:30 -04:00
Kristian Høgsberg c991513483 desktop-shell: Damage the black view when we remove it
We should be using weston_view_unmap() here, or maybe just destroying the
black view, but let's do a minimal, safe fix for the 1.5 release.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=78501
2014-05-09 16:24:07 -07:00
Ander Conselvan de Oliveira 6d43f045e3 shell: Don't allow maximized surfaces to be moved with touch
Moving a maximized surface with the pointer is already not possible,
so make the behavior with touch consistent.

https://bugs.freedesktop.org/show_bug.cgi?id=78208
2014-05-09 13:33:36 -07:00
Ander Conselvan de Oliveira 6e56ab41d9 shell: Fix crash when restoring focus state during workspace change
The check to avoid calling weston_keyboard_set_focus() for a seat that
didn't have a keyboard in restore_focus_state() was cheking the wrong
seat (the one from the previous loop). That caused a crash when
switching workspaces if there was an extra seat that didn't have a
keyboard.

https://bugs.freedesktop.org/show_bug.cgi?id=78349
2014-05-09 12:51:28 -07:00
Ander Conselvan de Oliveira 9c6217e6dc shell: Fix artifacts caused by workspace change animation
Views that extend past the bottom of the output are still visible after
the workspace animation ends but before its layer is hidden. When the
layer was hidden, nothing would cause those regions to be repainted,
leading to artifacts.

https://bugs.freedesktop.org/show_bug.cgi?id=78363
2014-05-09 12:49:54 -07:00
Kristian Høgsberg 4779241516 xwayland: Fix fullscreen mode
With xdg_shell wl_shell starting to diverge in how they work, there's
less shared code in set_fullscreen().  The problem is that the xwayland
window manager calls into set_fulscreen() which now doesn't complete
the fullscreen transition.  Add shell_interface_set_fullscreen() for
the shell interface set_fullscreen hook to use.

https://bugs.freedesktop.org/show_bug.cgi?id=78230
2014-05-04 13:47:06 -07:00
Jasper St. Pierre ac985be8ce compositor: Remove the edges parameter from send_configure
send_configure was originally modelled after
wl_shell_surface::send_configure, which takes these arguments. However,
the X WM and xdg_surface::configure variants don't use these arguments.

We already store the resize edges for a surface while it's being
resized, so just use the saved state in the wl_shell_surface variant.
2014-04-30 20:53:15 -07:00
Kristian Høgsberg 6d50b0f2a1 desktop-shell: Remove output_move listener on shutdown
https://bugs.freedesktop.org/show_bug.cgi?id=78138
2014-04-30 20:46:25 -07:00
Kristian Høgsberg e5c1ae9368 xwayland: Set decoration margin for xwayland windows 2014-04-30 16:28:41 -07:00
Kristian Høgsberg a4b620e7e7 desktop-shell: Further consolidate move/resize grab checks
This moves the check for shsurf->grabbed into surface_move() and
surface_resize(), which are shared with the xwayland code.  This prevents
trying to resize or move an xwayland window with multiple pointers.
2014-04-30 16:05:49 -07:00
Kristian Høgsberg e0b9d5be84 xwayland: Make resizing work again
9c376b54ea fixed the crash when a client goes
away during a resize grab.  The shsurf->resource is set to NULL in that
case and we were trying to send out events to a NULL resource.  However,
xwayland shell surfaces are created by the xwayland module and don't have a
resource.  We use a different function pointer for sending the configure
events that handle the events inside xwayland instead of sending protocol
events.

To fix all this, we just move the check for a NULL resource into the
functions that we use for sending configure events for wl_shell and
xdg_shell.
2014-04-30 13:45:53 -07:00
Xiong Zhang 62899f5124 shell.c: Set dirty for visible views on destroyed output
The geometry for visible views will keep unchanged,
weston_view_set_position() doesn't mark these views
as dirty. So there is no chance for them to reassign output, then
these views will disappear.

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

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
2014-04-30 10:59:30 -07:00
Ander Conselvan de Oliveira ef6a7e46eb shell: Don't map surfaces of type SHELL_SURFACE_NONE
When commit 07926d90 factored out the code that chooses in which layer
a surface is added to, it changed the behavior for surfaces with no
type. Instead of not adding it to any layer, the surface is added to
the current workspace.

This patch restores the old behavior.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77527
2014-04-30 09:09:32 -07:00
Jason Ekstrand 024177cecb desktop-shell: Properly handle seat hotplugging
Previously, desktop-shell would only create its internal shell_seat object
for each seat available when the desktop-shell module is loaded.  This is a
problem any time seats are created dynamically.  In particular, the Wayland
and RDP backends create seats on an as-needed basis and they weren't
getting picked up proprely by desktop-shell.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77649
2014-04-29 16:49:59 -07:00
Kristian Høgsberg 3434b33b19 desktop-shell: Remove unused variables 2014-04-29 16:38:23 -07:00
Emilio Pozuelo Monfort 9e7c7598aa desktop-shell: Properly handle lowered fullscreen surfaces
lower_fullscreen_surface() was removing fullscreen surfaces from
the fullscreen layer and inserting them in the normal workspace
layer. However, those fullscreen surfaces were never put back in
the fullscreen layer, causing bugs such as unrelated surfaces
being drawn between a fullscreen surface and its black view.

Change the lower_fullscreen_surface() logic so that it lowers
fullscreen surfaces to the workspace layer *and* hides the
black views. Make this reversible by re-configuring the lowered
fullscreen surface: when it is re-configured, the black view
will be shown again and the surface will be restacked in the
fullscreen layer.

https://bugs.freedesktop.org/show_bug.cgi?id=73575
https://bugs.freedesktop.org/show_bug.cgi?id=74221
https://bugs.freedesktop.org/show_bug.cgi?id=74222
2014-04-29 16:33:56 -07:00
Kristian Høgsberg ae356aef58 desktop-shell: Keep windows on screen when moving
We add a primitive constraining function to at least prevent users from
moving the window up under the panel.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73421
2014-04-29 16:03:58 -07:00
Kristian Høgsberg 6110d07777 desktop-shell: Raise new windows over fullscreen apps
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=74219
2014-04-29 15:15:45 -07:00
Kristian Høgsberg 74071e056a desktop-shell: End popup when starting a touch shell grab
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77345
2014-04-29 15:01:16 -07:00
Kristian Høgsberg 7b83ae433f desktop-shell: Reject resize if we're already grabbed
This rejects resizing a window that's currently being moved.  This can
be done using a touch screen and a pointer or just two seats.
2014-04-29 14:50:25 -07:00
Kristian Høgsberg d0b40ed451 desktop-shell: Reject window move in common_surface_move()
We move the check for shsurf->grabbed from surface_move() and
surface_touch_move() up top common_surface_move()
2014-04-29 14:47:46 -07:00
Ander Conselvan de Oliveira 9c376b54ea shell: Fix crash when a client is destroyed during the resize grab
If a client exists during a resize grab, the resource for the shell
surface being resized is destroyed. The shell surface is not destroyed
immediately, however, because of the window close animation. In that
case, the compositor would crash trying to send configure events to
the surface being resized, since it would pass a NULL pointer to
wl_resource_post_event().

The code for the resize grab was already able to handle the surface
going away, so expand it to also handle the resource going away and
fix the crash.

https://bugs.freedesktop.org/show_bug.cgi?id=77344
2014-04-29 13:33:29 -07:00
Ander Conselvan de Oliveira 15f9a26bb1 shell: Fix memory leaks caused by the window close animation
In order to do the window close animation, a reference for a destroyed
surface is kept. However, the reference count was also increased for
unmapped surfaces, in which case the animation wouldn't run. Since the
reference count was decremented in the animation done function, it would
never be decreased for unmapped surfaces, causing them to not be
released.

The close animation also changed how shell surfaces are released. The
destroy function for its resource was changed to not deallocate the
surface, and instead keep it around until the animation finishes and
the weston surface is destroyed. The destruction should happen in the
destroy listener for the weston surface, but it wouldn't destroy the
shell surface in the case the resource was still valid, assuming that
it would be freed in the resource destroy function.
2014-04-29 13:33:26 -07:00
Jonas Ådahl 1679f232e5 libinput: Forward frame events to clients
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77353

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2014-04-21 16:03:28 -07:00
Manuel Bachmann 5082ad6b28 shell: display the input panel on the active output
We now dynamically move the input panel (i.e. virtual
keyboard) surface to the output containing the currently
focused surface.

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

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
2014-04-21 14:34:15 -07:00
Ander Conselvan de Oliveira 75c373c76c shell: Destroy a previous input panel animation when showing it again
It is possible that an input panel will be shown quickly, hidden and
shown again, before the animation for the first appeareance finished.
In that case, another animation would be created and the effect of the
two combined could cause the panel to not appear in the screen.

This patch fixes this by keeping a reference to the previous animation
and deleting it when a new one is created.
2014-04-16 22:33:48 -07:00
Jason Ekstrand 9e9512f017 desktop-shell: Get rid of get_shell_client
We now carry the shell_client around with each shell_surface.  This is much
more reliable than tacitly assuming that there is only one wl_shell or
xdg_shell instance bound to a particular wl_client.  In particular, weston
would crash when a client bound to both wl_shell and xdg_shell even if it
only ever used one of them.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2014-04-16 22:29:01 -07:00
Ander Conselvan de Oliveira 304996d182 shell: Fix view repositioning logic for output move and destroy
Previously, the repositioning logic would iterate the compositor's list
of layers and move the views on those layers. However, that failed in
two different ways: it didn't cover hidden workspaces and crashed when
the display was locked.

This patch changes the logic to explicit iterate over all the layers
owned by the shell. The iteration is done through a helper function,
shell_for_each_layer().

https://bugs.freedesktop.org/show_bug.cgi?id=76859
https://bugs.freedesktop.org/show_bug.cgi?id=77290
2014-04-11 10:05:19 -07:00
Ander Conselvan de Oliveira 641796c31a shell: Keep shsurf->fullscreen_output set after unset_fullscreen()
When a fullscreen surface gets the maximized state, the function
reset_surface_type() is called and that causes unset_fullscreen() to be
called. That function would set the value of shsurf->fullscreen_output
to NULL. However, since the surface still has the fullscreen state, it
will be configured as a fullscreen surface again, and an attempt to
access that field would cause the compositor to crash.

Fix the crash by keeping the value of fullscreen_output around after
unset_fullscreen(). This is safe since the value is only used when a
surface has the fullscreen state and is replaced on a new request to
make the surface fullscreen.

https://bugs.freedesktop.org/show_bug.cgi?id=76867
2014-04-10 10:20:54 -07:00
Ander Conselvan de Oliveira facc0ccf06 shell: Damage below child surfaces on move to different workspace
When moving from a surface from visible workspace to an invisible one
via a popup menu, the area below the menu wouldn't be repainted.

https://bugs.freedesktop.org/show_bug.cgi?id=76973
2014-04-10 10:06:22 -07:00
Ander Conselvan de Oliveira 4e20e9b847 shell: Disarm the screensaver timeout timer on terminate_screensaver()
The timer was left running after the screensaver was terminated. When
it triggered, a fade out that would in turn cause the screen to be
locked was started. Since that could happen without the compositor
emitting the idle signal, there would be no wake signal to make the
shell show the lock screen, so the system was left unresponsive
until the idle signal actually triggered.

https://bugs.freedesktop.org/show_bug.cgi?id=70923
2014-04-10 10:02:35 -07:00
Neil Roberts b4a91708e3 Reset the keyboard focus on all seats when the compositor is locked
Before commit 2f5faff7f9 when the compositor is locked it would
reset the keyboard focus on all of the seats as part of pushing the
focus_state. This was removed because it now always keeps track of the
focus_state in the workspace instead of waiting until the state is
pushed. However this had the side effect that the active surface would
retain focus when the compositor is locked. This patch just makes it
explicitly set the keyboard focus to NULL on all of the seats when
locking. This will be restored based on the workspace's state when
unlocking.

https://bugs.freedesktop.org/show_bug.cgi?id=73905
2014-04-10 09:40:28 -07:00
Neil Roberts 4237f50e11 Reset focus on unknown seats when restoring focus state
The focus_state list on a workspace only contains entries for seats
which have a keyboard focus on that workspace. For workspaces that
have no surfaces the list will be empty. That means that when a
workspace with no surfaces is switched to it would previously leave
the keyboard focus unaffected and you could still type in the surface
on the old workspace.

This patch makes it instead reset the keyboard focus to NULL for seats
without a focus_state. It does this by temporarily stealing the
compositor's list of seats while it iterates the focus_states. After
all of the focus states have been processed any seats remaining in
this temporary list have their focus reset.

https://bugs.freedesktop.org/show_bug.cgi?id=73905
2014-04-10 09:32:09 -07:00
Ander Conselvan de Oliveira e5a1aee694 shell: Allow unresponsive surfaces to be moved again
Commit c85f1d45 caused the move of an unresponsive surface to be no
longer possible, since the grabbed flag would prevent the move grab
to start while the busy grab was still active.
2014-04-09 10:44:32 -07:00
Kristian Høgsberg f0ce581b92 desktop-shell: Activate surface on right click too
This raises the surface to the top on right click as well, which fixes
pop stacking.

https://bugs.freedesktop.org/show_bug.cgi?id=74831
2014-04-07 11:52:17 -07:00
Bryan Cain a46b946cb3 shell: Fix segfault from trying to access a destroyed popup shell surface
The shell_destroy_shell_surface function only set the backing resource to
NULL, leaving an unusable surface in the popup_grab list until the surface's
fading animation finished and it could be freed. This caused a segfault if
the shell tried to forcibly break the grab during that time interval due to
the compositor losing the keyboard focus.

https://bugs.freedesktop.org/show_bug.cgi?id=77072
2014-04-06 22:47:26 -07:00
Giulio Camuffo c6ab3d52f5 compositor: let the shells create the screenshooter 2014-04-02 11:39:19 -07:00
Manuel Bachmann 805d2f536a shell: position input panel layer above fullscreen layer
When a client calls the input panel (weston-keyboard e.g.)
and then goes fullscreen, the panel will not be hidden
anymore.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
2014-04-02 10:35:26 -07:00
Manuel Bachmann c1ae2e817e compositor: use Mod-Tab to show/raise minimized surfaces
Temporarily show minimized surfaces when switching between
surfaces with the keyboard. If the final selected one was
minimized, it will be restored.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
2014-04-02 10:27:27 -07:00
Manuel Bachmann 50c87dbd95 compositor: implement xdg_surface_set_minimized()
We now handle the client-side xdg_surface_set_minimized()
call, and eventually hide the target surface by moving it
to a dedicated layer.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
2014-04-02 10:27:13 -07:00
Pekka Paalanen 952b6c8004 compositor: reorganize struct weston_buffer_viewport
Queueing in the Presentation extension requires splitting the viewport
state into buffer state and surface state. To conveniently allow
assigning only one, the other, or both, reorganize the
weston_buffer_viewport structure.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-04-01 16:46:40 -07:00
Jasper St. Pierre fe9671e30e shell: Correct error message when we already have an xdg surface
It was referencing get_shell_surface, which is absolutely wrong.
2014-03-25 10:59:20 -07:00
Kristian Høgsberg b033c5e1d0 shell: Only animate window closing for mapped windows
https://bugs.freedesktop.org/show_bug.cgi?id=76415
2014-03-20 14:49:07 -07:00
Kristian Høgsberg 160fe75b32 shell: Animate window closing
This provides an example of keeping a weston_surface alive after the client
destroys it.  We install a destroy listener for the resource, so that we'll
be notifified when the client destroys it.  Then we increase the weston_surface
refcount so that we keep the surface and initiate an animation.  When
the animation finishes we can finally destroy the surface.
2014-03-19 16:51:53 -07:00
Kristian Høgsberg c7680b09dd xdg-shell: Bump unstable version to 3 2014-02-19 10:14:46 -08:00
Kristian Høgsberg 283bf373a1 shell: Consolidate state changes into xdg_surface_change_state
This makes xdg_surface_change state the canonical place for changing
surface state and moves much of the duplicated code into one place.
2014-02-19 09:50:40 -08:00
Jasper St. Pierre 8c6aa45f97 xdg-shell: Replace the set_* atrocity with a new approach
Rather than require that the client implement two methods for every state,
simply have one global request, change_state, and one global event,
request_change_state.
2014-02-19 09:50:40 -08:00
Jasper St. Pierre b223a72147 xdg-shell: Rename focused_set / focused_unset to activated / deactivated
To try and make the distinction between this event and keyboard focus.
2014-02-18 16:39:01 -08:00
Jasper St. Pierre 63a9c336f3 Reorder the xdg_shell implementations to fit the spec'd order 2014-02-18 19:20:17 -05:00
Emilio Pozuelo Monfort a75920190e exposay: avoid needlessly activating the active view
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
2014-02-18 14:07:08 -08:00
Emilio Pozuelo Monfort f942b73a1c exposay: don't crash if a view goes away
When a view was destroyed while we were on exposay, we didn't
remove it from the list of views, and so when leaving exposay
we were trying to animate (and sometimes activate) a
non-existent view, causing a crash.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
2014-02-18 14:04:39 -08:00
Emilio Pozuelo Monfort 3b6e68e2c1 exposay: arrange views per-output
https://bugs.freedesktop.org/show_bug.cgi?id=73173
2014-02-18 14:04:24 -08:00
Kristian Høgsberg dd62abafa1 shell: Use the per-client responsiveness tracking for wl_shell as well 2014-02-12 21:29:11 -08:00
Kristian Høgsberg e11ef64534 compositor: Drop core ping_handler callout
This was always a little iffy.  At least it could have been a signal,
but we now have focus signal, so lets just use that.  We lose
the ability to detect unresponsive clients at key event time, but we
could add that back by adding a key_signal.
2014-02-11 16:35:22 -08:00
Kristian Høgsberg 239902b323 client: Fix shell unstable version check
Use a static assert to catch mismatch between implementation and
interface version.  Fix window.c to not use XDG_SHELL_VERSION_CURRENT,
which will fail to catch version mismatches.  The implementation version
must updated manually when the implementation is updated to use the new
interface.
2014-02-11 16:22:10 -08:00
Kristian Høgsberg 2bff94e057 xdg-shell: Move "ping" and "pong" to xdg_shell, not xdg_surface
Responsivenes is a per-client thing so we move the ping/pong functionality
to xdg_shell.  Having this per-window was carries over from the EWMH
protocol, where the WM has no other way to do this.  In wayland, the
compositor can directly ping the client that owns the surface.
2014-02-11 16:22:10 -08:00
Jasper St. Pierre 7407345446 xdg-shell: Add set_margin request
This is used to figure out the size of "invisible" decorations, which we'll
use to better know the visible extents of the surface, which we can use for
constraining, titlebars, and more.
2014-02-06 13:05:03 -08:00
Kristian Høgsberg 44cd1968f2 xdg-shell: Drop edges arg from xdg_surface configure event 2014-02-05 21:37:58 -08:00
Ander Conselvan de Oliveira c94d6229dc compositor: Move view repositioning logic into shell
Remove the listener for output destroy from weston_view and instead
iterate views owned by the shell in its own output destroy listener.

This simplifies the code a bit since keeping the view listening for the
destroy on the right output was a bit complicated. This also removes the
function pointer output_destroyed from weston_view. The only user for it
was desktop shell, but now this is all handled in shell.c.
2014-02-05 17:36:00 -08:00
Ander Conselvan de Oliveira a8a9baf873 compositor: Remove weston_output::move_signal
Since that signal is per output, it is necessary to track in which
output a view is in so that the signal is handled properly.

Instead, add a compositor wide output moved signal, that is handled by
the shell. The shell iterates over the layers it owns to move views
appropriately.
2014-02-05 17:32:35 -08:00
Emilio Pozuelo Monfort 7908bffdf9 dim-layer: fix dimming for unfocused surfaces
Unfocusing a surface should dim it when dim-layer is enabled,
but this got broken in commit 83ffd9.
2014-02-05 17:26:45 -08:00
Kristian Høgsberg 4c72f5721e shell: Remove elaborate if-statement with empty body 2014-02-05 13:36:01 -08:00
Kristian Høgsberg 0b7d9958a8 shell: Handle wl_shell surfaces created by xwayland correctly
When xwayland creates a shell surface we don't have a resource.  The
recently added shell_surface_is_wl_shell/xdg_surface() tests don't
handle that very well.

For now, we assume that a surface without a resource is created from
xwayland and is a wl_shell surface.  We'll want to modify that to be a
xdg surface eventually, but for now this stops weston from crashing.
2014-02-03 15:50:38 -08:00
Quentin Glidic 088ba5e475 Makefile.am: Fix protocol source files usage
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2014-02-01 21:21:39 -08:00
Jasper St. Pierre faf27a9a3b weston: Send xdg_surface_send_focused_[un]set when focusing surfaces 2014-02-01 01:41:01 -08:00
Emilio Pozuelo Monfort adaa20c017 desktop-shell: initialize children link
Since commit 9046d2, when destroying a surface, we remove all the
links from its children. But when the child surfaces are destroyed,
those links will be removed again, but since they were not properly
initialized, weston will crash.

Call shell_surface_set_parent instead which removes the link and
sets parent while also initializing the link, thus avoiding this
crash.
2014-02-01 01:29:13 -08:00
Emilio Pozuelo Monfort 38b58eba74 desktop-shell: maximize the surface with the kbd focus
We don't have focus-follows-mouse, so it makes more sense to
maximize or fullscreen the surface that has the keyboard focus,
not the one behind the pointer.
2014-02-01 01:26:34 -08:00
Kristian Høgsberg bc00dbe4f5 build: Move desktop-shell/Makefile.am into toplevel Makefile.am 2014-02-01 00:07:21 -08:00
Kristian Høgsberg d500bf1ac9 shell: Properly track the focus state surface
We have to move the surface destroy listener around as we track the
currently focused surface.  Introduce a helper function,
focus_state_set_focus() for this and use throughout.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73768
2014-01-22 12:25:20 -08:00
Ricardo Vieira f1c3bd8e81 shell: Don't move maximized window
We'll want to ask the client to unmaximize once we get support for that in
xdg-shell, but for now, just refuse moving a maximized window.
2014-01-20 10:36:28 -08:00
Kristian Høgsberg 0837fa9626 shell: Add mod+shift left-click as a resize binding
This lets us use compositor-initiated resize on laptops with touchpads and
no middle buttons.
2014-01-20 10:35:26 -08:00
U. Artie Eoff cf5737aa41 shell: assert get_shell_surface() != NULL as appropriate
Various functions that operate on a weston_surface assume the
surface has a shell_surface.  That is, they unconditionally
deref the get_shell_surface() result.  Hence, if for some reason
the call to get_shell_surface() returned NULL to those functions then
a segmentation fault would occur and the program would crash.  So,
adding an assert(...) on the get_shell_surface() return value adds an
extra sanity check and does not change this behavior.  The assert also
adds an extra benefit to the programmer by documenting that the function
expects and requires the weston_surface to have a shell_surface and
would be a program logic error, otherwise.

The assert() also silences some static analyzers about the possible
NULL deref.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:06:05 -08:00
U. Artie Eoff 0b23b2bd58 shell: validate create_focus_surface results
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:05:42 -08:00
U. Artie Eoff b571910584 shell: validate get_animation_type parameter
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:05:04 -08:00
U. Artie Eoff c4c7a4f921 input-panel: validate return value of get_default_view
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:04:56 -08:00
U. Artie Eoff 6d6d190b30 exposay: remove redundant NULL check in highlight_surface
exposay_highlight_surface() is called from exposay_pick(),
exposay_layout(), and exposay_maybe_move() where the esurface
parameter is already validated prior to the call.  This makes
the 'esurface' NULL check redundant.  This assumes any future
calls to exposay_highlight_surface() will also validate the
'esurface' parameter prior to the call.

This fixes the logic in exposay_highlight_surface so static
analyzers don't complain about the possibility that 'view'
might be NULL deref'd when a 'esurface' == NULL condition is
true.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:04:27 -08:00
Kristian Høgsberg 87d3b61355 shell: Don't start a fade animation if we don't have an output
When the last window of the X11 compositor is closed during a fade or
while locked, we'll try to start a fade back to the lock screen.  However,
if we closed the last window, there are no outputs left and the animation
will try to run with surface->output == NULL.

https://bugs.freedesktop.org/show_bug.cgi?id=73665
2014-01-19 21:48:10 -08:00
Kristian Høgsberg 8fe412d35b Revert part of 17bccaed42
Commit 17bccaed42 accidentally reverted
the fix for 73490 from 5cbc763404.
2014-01-17 16:40:49 -08:00
Kristian Høgsberg 27d5fa8922 shell: Cancel popups when triggering screensaver
This is part of the fix for bug 72540.  We cancel the popup grab when the
screensaver kicks in so that the screen unlock dialog can get input events.
The bigger problem is in mesa however, where we try to allocate new buffers
as cairo-gles2 does a gratuituous (but valid) eglMakeCurrent() as we
remove the tooltip or popup-menu.

Since we removed the weston_layer with the regular surfaces, EGL blocks
waiting for a frame event that never comes.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72540
2014-01-17 16:22:50 -08:00
Kristian Høgsberg 8e80a31ba4 shell: Stop moving surfae after touch point 0 goes up
The grab stays alive as long as at least one touch point is down.  If touch
point 0 is lifted while other touch points are down, the surface will jump
around when touch point 0 is put down again.

This change marks the grab as inactive once touch point 0 is lifted
and then ignores touch events until all touch points eventually are
lifted and the grab terminates.

https://bugs.freedesktop.org/show_bug.cgi?id=73750
2014-01-17 15:18:35 -08:00
Kristian Høgsberg e61d2f4812 shell: Don't assign keyboard focus for seats without keyboard
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73570
2014-01-17 12:19:06 -08:00
Kristian Høgsberg 17bccaed42 input: Handle unplugging the output for a touchscreen device
A paired touch screen will stop sending events if its corresponding
output is unplugged.  An unpaired touchscreen will pick the new primary
output.

https://bugs.freedesktop.org/show_bug.cgi?id=73637
2014-01-16 17:08:26 -08:00
Kristian Høgsberg d56ab4eb18 shell: Disable exposay by default
Add a config file option to enable it, but leave it off by default.  Exposay
still triggers too many lock-ups or stuck grabs and triggers under X even
when the Wayland window doesn't have keyboard focus.
2014-01-16 16:52:12 -08:00
Kristian Høgsberg 5cbc763404 shell.c: Not all seats have pointers
Don't look up the pointer focus in ping_timeout_handler() if the
seat doesn't have a pointer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73490
2014-01-15 11:46:38 -08:00
Kristian Høgsberg 211b517e8c shell: Move maximize and fullscreen bindings to mod + SHIFT
mod + f and mod + m conflict with too many application bindings, in
particular if mod is mapped to ALT.
2014-01-11 13:58:33 -08:00
Kristian Høgsberg 9046d2424a shell: Orphan child windows when a shell surface is destroyed
We now track the child surfaces of a shell surface and the child surfaces
have a pointer back to their parent.  We need to clean all this up and
NULL out the childrens parent pointers when a shell surface is destroyed.

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72931
2014-01-10 00:25:30 -08:00
Kristian Høgsberg d6d3b377f8 keyboard: Make debug output less verbose
The keyboard is too chatty, make it use a dbg() function for logging
which defaults to disabled.

Also drop a noisy fprintf() in input_panel_configure().
2014-01-09 23:58:14 -08:00
Kristian Høgsberg 70f2901989 shell: Make sure we still have touch or pointer focus when moving/resizing
It's possible to touch a surface to move it and let go before we get
to common_surface_move(), in which case we don't have a touch focus
when we get there.  For pointers, we could click a surface, but have the
surface go away before we get to common_surface_move(), in which
case the button count is non-zero, but we don't have a surface.

In either case we crash, so let's add a check to make sure we still
have a focus surface before we try to move it.

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73448
2014-01-09 15:43:17 -08:00
Rafal Mielniczuk b2917a2fed shell: run surface bindings only when focus surface is not NULL
This fixes the crash when move, rotate or resize binding is activated
while exposay effect is active.

Steps to reproduce:
- activate exposay
- try to rotate the surface with mod + right mouse button
- crash

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72885
2014-01-08 22:17:40 -08:00
Emilio Pozuelo Monfort 1a26f1baba exposay: set an alpha on fullscreen surfaces
This makes the desktop background actually draw when there is
a fullscreen surface and we go to exposay.
2014-01-07 21:46:36 -08:00
Emilio Pozuelo Monfort e6bbe5a90d exposay: fix infinite loop with fullscreen surfaces
We were calling exposay_highlight_surface() inside a wl_list_for_each
loop for a layer, but exposay_highlight_surface() calls activate()
which calls shell_surface_update_layer(), which removes the surface
from its layer and reinserts it, causing an infinite loop.

Call exposay_highlight_surface() outside the for_each to avoid this.

https://bugs.freedesktop.org/show_bug.cgi?id=72404
2014-01-07 21:41:18 -08:00
Kristian Høgsberg 0ed6750541 shell: Only assign focus on touch if there is a touch focus surface
Similar to 7c4f6cc145, if we don't have
a background image from the desktop-shell client or the touch point
for some other reason doesn't hit a surface we trigger a
segfault as we try to deref the seat->touch->focus NULL pointer.

For touch, another problem could be fudgey calibration that ends up
giving touch coordinates outside the output space.

https://bugs.freedesktop.org/show_bug.cgi?id=72839
2014-01-02 23:00:11 -08:00
Kristian Høgsberg 9f7e331a20 xwm: Handle WM_TRANSIENT_FOR
Set up X windows that are transient for another window as transient
surfaces in shell.c.  This keeps the transient windows on top of their
parent as windows are raised, lowered for fullscreened.

https://bugs.freedesktop.org/show_bug.cgi?id=69443
2014-01-02 22:55:04 -08:00
Kristian Høgsberg 0e45e8712a shell: Start the input panel slide slightly on the output
If a surface is not on any output, scheduling a repaint for it is a no-op.
weston_view_schedule_repaint() schedules repaints for all outputs that
overlap with the surface extents, but if the surface is completely
outside all outputs nothing will be scheduled.  Fix this for now by starting
the slide slightly into the output.
2014-01-02 01:33:42 -08:00
Kristian Høgsberg 2eebcd34fc shell: Test for surface->width == 0 to see if input-panel was unmapped
The input-panel codes tries to see determine if a buffer has not yet
been attached (or a NULL buffer has been attached), and doesn't map
the input panel surface yet in that case.  However, it test for
buffer_ref being NULL, which can happen for other reasons.  The right
test is to see if surface->width is 0, which means that either a
buffer hasn't yet been attached or a NULL buffer has been attached.

https://bugs.freedesktop.org/show_bug.cgi?id=72519
2014-01-02 01:27:38 -08:00
Kristian Høgsberg c30c8a3db5 shell: Always set input-panel position on initial configure
If we're not currently showing the input panels, we still need to set the
panel position so that it's set when we later need to show them.  This fixes
the initial flicker of the input panel in the wrong position when we first
show it.
2014-01-02 00:45:19 -08:00
Kristian Høgsberg 8bc525c60d shell.c: Set state_changed for xwayland surfaces as well
Fixes the problem where xwayland surfaces pop up at 0,0 always.
2014-01-01 22:34:49 -08:00
Kristian Høgsberg 7c4f6cc145 shell: Only assign focus on click if there is a pointer focus surface
If we don't have a background image from the desktop-shell client or the
pointer for some other reason doesn't have a focus we trigger a
segfault as we try to deref the seat->pointer->focus NULL pointer.

https://bugs.freedesktop.org/show_bug.cgi?id=73066
2014-01-01 16:28:32 -08:00
Kristian Høgsberg 8662349394 shell.c: Back out alt-tab functionality
This is still fairly unstable, causes lockups with fullscreen and exposay,
leaves small preview surfaces on-screen if used on the same modifier as
mod-tab.  We also only need on mod-tab implementation so lets see if we
can consolidate the current and this alt-tab implementation in 1.5.

https://bugs.freedesktop.org/show_bug.cgi?id=72610
2014-01-01 16:10:44 -08:00
Jason Ekstrand 6228ee235f Fix the size of surfaces created in create_black_surface
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2014-01-01 14:01:14 -08:00
Kristian Høgsberg ead5242e07 shell: Fix up previous broken commit 2014-01-01 13:51:52 -08:00
Kristian Høgsberg d55db69c94 Revert "shell: Change stacking order calculation for popup surfaces"
Popup windows are relative to a plain wl_surface, so that custom surfaces
can have popups.  This used for the desktop-shell panel for example.  Also,
popups should be immediately on top of their parent surface, as they
typically represent an extension of an UI element in the parent surface
such as a combo box or menu.

This reverts commit da704d97fa.

Conflicts:
	desktop-shell/shell.c

https://bugs.freedesktop.org/show_bug.cgi?id=72547
2014-01-01 12:26:14 -08:00
Kristian Høgsberg a1df7acb78 shell: Set state_changed when we make a surface transient
If we don't mark the state as changed, we don't copy over next_state to
state and we fail to treat the surface as a transient.  In particular,
we give it a random intial position instead of mapping it at the given
parent relative position.

https://bugs.freedesktop.org/show_bug.cgi?id=72532
2013-12-31 15:01:09 -08:00
Ander Conselvan de Oliveira 312ea4ca42 shell: Handle the desktop shell client destroy signal
Set the internal pointer for the client to NULL. This fixes a
segmentation fault at shutdown, where the shell would hang up before
and cause libwayland to call wl_client_destroy(). When the shell was
destroyed later, another call to wl_client_destroy() would cause the
crash.

https://bugs.freedesktop.org/show_bug.cgi?id=72550
2013-12-22 13:45:36 -08:00
Jason Ekstrand 5c11a3340b Add a weston_surface_set_size function
Surfaces that are created by clients get their size automatically updated
by the attach/commit.  Surfaces created directly by shells (such as black
surfaces) sometimes need to be manually resized.  This function allows you
to do that while being somewhat less messy than messing with the internals
of weston_surface manually.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-12-16 17:23:09 -08:00
Ander Conselvan de Oliveira fc63fddcee shell: Reset fullscreen and maximized state on output unplug
When a view is moved to another output because its current output was
unplugged, remove the fullscreen and maximized state.
2013-12-16 17:23:08 -08:00
Zhang, Xiong Y 31236932a1 desktop-shell: Invalidate saved position when output is destroyed
If the saved position for a fullscreen or maximized output view is in an
output that has been unplugged, the coordinates don't make sense
anymore. In that case, invalidate them and use the initial position
algorithm when changing them back to the basic state.

Signed-off-by: Zhang, Xiong Y <xiong.y.zhang@intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2013-12-16 17:23:08 -08:00
Giulio Camuffo 1aaf3e42e2 sdk: make C++11 plugins build again
compositor.h must not define a 'static_assert' macro, since that
conflicts with the new 'static_assert' in the standard and breaks
the build.
2013-12-09 16:20:48 -08:00
Jasper St. Pierre cf389f5917 Update .gitignore 2013-12-09 12:15:41 -08:00
Jasper St. Pierre 8f180d44f5 shell: Fix set_transient_for with a NULL parent 2013-12-09 11:34:09 -08:00
Kristian Høgsberg 8d344a0548 shell: Make sure the shell implementation and protocol versions match 2013-12-08 22:27:11 -08:00
Kristian Høgsberg c8f8dd894e desktop-shell: Drop next_type from shell_surface
The surface type now no longer changes and we track pending state changes in
next_state.  Instead of testing type != next_type to detect changes in
state, we just look at state_changed.
2013-12-05 23:20:44 -08:00
Kristian Høgsberg 4804a301db shell: Put xwayland surface at the top of the fullscreen layer
An xwayland surface corresponds to a override-redirect window under X,
which is typically a menu or a popup window.  They typically appear
with a keyboard and mouse grab and by nature of being override-redirect
these window can appear anywhere on screen and in the stack.

We need to resort to heuristics to decide where to place the
override-redirect in our surface stack, and for now we'll just put it on
top of everything.  That's going to be correct for almost all cases of
clicking to open a menu, but we can revisit and refine if we run into
a case that needs better handling.
2013-12-05 22:43:03 -08:00
Kristian Høgsberg 41fbf6f7fd desktop-shell: Make set_toplevel() clear surface states
This is used from wl_shell and xwayland and we need to make sure
xwayland also gets this behavior.
2013-12-05 22:31:25 -08:00
Kristian Høgsberg e960b3f012 desktop-shell: Set fullscreen flags in common code path
Just as for set_maximized() we can move the setting of the fullscreen and
state_changed flags into the common set_fullscreen() function.  This
function is also used from the xwayland wm to set fullscreen windows, and
with this change that now works again.
2013-12-05 22:04:42 -08:00
Kristian Høgsberg c2745b14f0 desktop-shell: Set maximized flags in common code path
We can set the maximized and state_changed flags in set_maximized(),
which is shared between shell_surface_set_maximized() and
xdg_surface_set_maximized().
2013-12-05 22:00:40 -08:00
Rafael Antognolli 5031cbe7b4 shell: Don't try to switch to a NULL shell surface.
Fixes the crash from alt+tab when there's a fullscreen surface.
2013-12-05 15:37:29 -08:00
Rafael Antognolli db59f9a53f shell: Set a surface as TOPLEVEL instead of the old surface types.
Since internally there's no more SHELL_SURFACE_FULLSCREEN and
SHELL_SURFACE_MAXIMIZED, the surface must be set to
SHELL_SURFACE_TOPLEVEL on the respective functions.

This fixes the bug when clients start already in fullscreen mode. In
that case, they aren't set first to toplevel, and then change to
fullscreen. They are set as fullscreen directly, not receiving the
SHELL_SURFACE_TOPLEVEL type on the set_fullscreen function.
2013-12-05 15:15:11 -08:00
Rafael Antognolli 44a3162eea shell: Add missing break to a case statement inside set_surface_type.
This should fix the surface not going back to its original position
after unsetting fullscreen or maximized states.

https://bugs.freedesktop.org/show_bug.cgi?id=72321
2013-12-05 12:02:36 -08:00
Kristian Høgsberg b7fd89192f build: Fix out-of-tree build for desktop-shell 2013-12-04 12:57:02 -08:00
Rafael Antognolli ba5d2d76af shell: Fix activate logic on surface map.
It should activate the newly mapped surface if not locked.
2013-12-04 11:55:03 -08:00
Kristian Høgsberg 677a5f5ac2 desktop-shell: Split out input-panel code 2013-12-04 11:03:24 -08:00
Kristian Høgsberg 1ef231377c desktop-shell: Split out exposay immplementation 2013-12-04 10:20:02 -08:00
Kristian Høgsberg 19d1e6b185 desktop-shell: Move to new desktop-shell subdirectory 2013-12-04 10:20:02 -08:00