Find a file
Pekka Paalanen 01388e253e shell: keyboard focus and restacking fixes for sub-surfaces
The shell needs to redirect some actions to the parent surface, when
they originally target a sub-surface. This patch implements the
following:

- Move, resize, and rotate bindings always target the parent surface.

- Opacity (full-surface alpha) binding targets the parent surface. This
  is broken, because it should change the opacity of the whole compound
  window, which is difficult to implement in the renderer.

- click_to_activate_binding() needs to check the shell surface type from
  the main surface, because sub-surface would produce SHELL_SURFACE_NONE
  and prevent activation.

- Also activate() needs to check the type from the main surface, and
  restack the main surface. Keyboard focus is assigned to the original
  (sub-)surface.

- focus_state_surface_destroy() needs to handle sub-surfaces: only the
  main surface will be in a layer list. If the destroyed surface is
  indeed a sub-surface, activate the main surface next. This way a
  client that destroys a focused sub-surface still retains focus in the
  same window.

- The workspace_manager.move_surface request can accept also
  sub-surfaces, and it will move the corresponding main surface.

Changes in v2:
- do not special-case keyboard focus for sub-surfaces
- fix surface type checks for sub-surfaces in shell, fix restacking of
  sub-surfaces in shell, fix focus_state_surface_destroy()

Changes in v3:
- Renamed weston_surface_get_parent() to
  weston_surface_get_main_surface() to be more explicit that this is
  about sub-surfaces
- Fixed move_surface_to_workspace() to handle keyboard focus on a
  sub-surface.
- Used a temporary variable in several places to clarify code, instead
  of reassigning a variable.
- Fixed workspace_manager_move_surface() to deal with sub-surfaces.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:34:54 -04:00
clients protocol: add sub-surfaces 2013-05-10 14:05:59 -04:00
data window.c: frame_button: Maximize, minimize, close, icon buttons in window frame 2012-05-10 16:19:33 -04:00
man weston.ini: document background-type 2013-05-01 13:40:50 -04:00
protocol protocol: add sub-surfaces 2013-05-10 14:05:59 -04:00
shared Fix compiler warnings 2013-04-03 20:40:44 -04:00
src shell: keyboard focus and restacking fixes for sub-surfaces 2013-05-10 14:34:54 -04:00
tests tests: add sub-surface protocol tests 2013-05-10 14:32:58 -04:00
wcap wcap: Fix typo in usage output. 2012-07-23 14:25:14 -04:00
.gitignore gitignore: Ignore test-driver 2013-03-28 14:04:05 -04:00
autogen.sh Update autotools configuration 2010-11-06 21:04:03 -04:00
configure.ac Add initial color management framework code 2013-05-10 12:51:08 -04:00
COPYING Add COPYING 2012-04-25 10:17:42 -04:00
Makefile.am Makefile.am: Distribute weston.ini sample 2013-02-25 13:04:40 -05:00
notes.txt Add informal notes file 2012-10-25 15:00:42 -04:00
README Flesh out README a bit, link to building instructions 2012-07-20 12:26:23 -04:00
weston.ini Add initial color management framework code 2013-05-10 12:51:08 -04:00

Weston

Weston is the reference implementation of a Wayland compositor, and a
useful compositor in its own right.  Weston has various backends that
lets it run on Linux kernel modesetting and evdev input as well as
under X11.  Weston ships with a few example clients, from simple
clients that demonstrate certain aspects of the protocol to more
complete clients and a simplistic toolkit.  There is also a quite
capable terminal emulator (weston-terminal) and an toy/example desktop
shell.  Finally, weston also provides integration with the Xorg server
and can pull X clients into the Wayland desktop and act as a X window
manager.

Refer to http://wayland.freedesktop.org/building.html for buiding
weston and its dependencies.