[PATCH weston v2 00/24] Initial Xwayland window positioning, with XWM reordering

Pekka Paalanen ppaalanen at gmail.com
Wed Dec 21 14:39:58 UTC 2016


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Hi all,

for the history and motivation of this series, please refer to:
https://phabricator.freedesktop.org/T7622

Most importantly, you can see the introduction and motivation here:
https://lists.freedesktop.org/archives/wayland-devel/2016-November/031976.html

This patch series is also available as a branch:
https://git.collabora.com/cgit/user/pq/weston.git/log/?h=x11-positioning-v2

In this v2, patches 1-6 are exactly the same as v1. The old patch 7 is
now patch 24.

The reason for the new patches 7-23 is the clean-up and the new
operating sequence called for in T7622. I tried to keep each patch as
simple and straightforward as possible, hence the number of them.

I have refactored xwayland/window-manager.c a lot around the window
MapRequest handling and decoration repainting, hopefully the code is
now also a little more readable. This was necessary so that the actual
behavioral changes would not drown in the churn.

The functionality in the final patch of this series depends on the
Xwayland series:
https://patchwork.freedesktop.org/series/16610/

However, the Xwayland patches are not a requirement - without them
things should still work, if a bit more glitchy than with.

Below is the debug log for starting 'xeyes'. It shows the end result
of the patch series (without --geometry). The log is an async mix of
prints from Weston and Xwayland. Particularly notice the "xwayland:
win 2097202 allow_commits = 0" from Xwayland in the middle of Weston
output.

Note, that in the log:
- decors are drawn only twice
- Xwayland does not commit before decor are drawn

When looking at timings in logs like this, it is important to note two things:
1) starting the very first X11 client will have wildly different timings than
any later one, and 2) whether Xwayland actually uses GLAMOR or not may play a
part.

This series should be a nice ground work for further XWM improvements,
_NET_WM_SYNC_REQUEST for instance. ;-)

Happy winter holidays everyone!
I'll be back mid-January or so.


Thanks,
pq

client(400000): Reserved pid(27079).
client(400000): Reserved cmdname(xeyes) and cmdargs(NULL).
AllocNewConnection: client index = 2, socket fd = 7
[16:03:30.562] XCB_CREATE_NOTIFY (window 4194314, at (0, 0), width 150, height 100)
[16:03:30.562] XCB_PROPERTY_NOTIFY: window 4194314, WM_CLIENT_LEADER: WINDOW/32, length 4 (value_len 1): huh?
[16:03:30.563] XCB_MAP_REQUEST (window 4194314, 0x989f00, frame 2097202, 150x100 @ 0,0)
[16:03:30.563] XWM: schedule repaint, win 4194314
[16:03:30.563] XCB_PROPERTY_NOTIFY: window 4194314, xwayland: win 2097202 allow_commits = 0
WM_PROTOCOLS: ATOM/32, length 4 (value_len 1): WM_DELETE_WINDOW
[16:03:30.564] XCB_CREATE_NOTIFY (window 2097202, at (0, 0), width 226, height 197, ours)
[16:03:30.564] XCB_REPARENT_NOTIFY (window 4194314, parent 2097202, event 624)
[16:03:30.564] XCB_REPARENT_NOTIFY (window 4194314, parent 2097202, event 2097202)
[16:03:30.564] XCB_CONFIGURE_NOTIFY (window 4194314) 38,59 @ 150x100
[16:03:30.564] XCB_PROPERTY_NOTIFY: window 4194314, WM_STATE: WM_STATE/32, length 8 (value_len 2): huh?
[16:03:30.564] XCB_PROPERTY_NOTIFY: window 4194314, _NET_WM_STATE: ATOM/32, length 0 (value_len 0): 
[16:03:30.564] XCB_PROPERTY_NOTIFY: window 4194314, _NET_WM_DESKTOP: CARDINAL/32, length 4 (value_len 1): huh?
[16:03:30.564] XCB_MAP_NOTIFY (window 4194314)
[16:03:30.564] XCB_MAP_NOTIFY (window 2097202, ours)
[16:03:30.564] XCB_CLIENT_MESSAGE (WL_SURFACE_ID 37 0 0 0 0 win 2097202)
[16:03:30.564] XWM: draw decoration, win 4194314
[16:03:30.565] XWM: create weston_surface 0xe4cb20
[16:03:30.565] XWM: map shell surface, win 4194314, weston_surface 0xe4cb20, xwayland surface 0xe4cea0
[16:03:30.565] XWM: win 4194314 geometry: 32,32 162x133
xwayland: win 2097202 allow_commits = 1
[16:03:30.566] weston_desktop_xwayland_surface_committed: xwayland surface 0xe4cea0
[16:03:30.566] XWM: schedule repaint, win 4194314
[16:03:30.566] XWM: draw decoration, win 4194314
[16:03:30.567] XWM: win 4194314 geometry: 32,32 162x133
[16:03:30.567] XCB_MAPPING_NOTIFY
[16:03:30.567] XCB_MAPPING_NOTIFY
[16:03:30.568] XCB_CONFIGURE_NOTIFY (window 2097202) 29,238 @ 226x197
[16:03:30.568] weston_desktop_xwayland_surface_committed: xwayland surface 0xe4cea0
[16:03:30.639] weston_desktop_xwayland_surface_committed: xwayland surface 0xe4cea0



Pekka Paalanen (24):
  xwayland: WM debug prints
  xwayland: add set_toplevel_with_position to internal API
  libweston-desktop: add set_xwayland_position API
  xwayland: detect initially positioned X11 windows
  shell: implement set_xwayland_position
  libweston-desktop/xwayland: react to geometry changes
  desktop-shell: debug set_position_from_xwayland
  libweston-desktop/xwayland: debug commits
  xwm: detect legacy fullscreen on MapRequest
  xwm: clarify props[] in weston_wm_window_read_properties()
  xwm: move frame_set_title() into draw_decoration()
  xwm: move set_title and set_pid
  xwm: debug changes to override-redirect flag
  xwm: debug print deleted property name
  xwm: postpone geometry dirtying from pending.opaque
  xwm: delete dead flags from weston_wm_window_draw_decorations()
  xwm: split weston_wm_window_draw_decoration()
  xwm: move fini near init in set_pending_state
  xwm: split out weston_wm_window_set_pending_state_OR()
  xwm: schedule repaint from MapRequest
  xwm: debug when weston_surface gets created
  xwm: explain the read_properties() in xserver_map_shell_surface()
  xwm: do not draw decor twice on map
  xwm: use _XWAYLAND_ALLOW_COMMITS

 desktop-shell/shell.c                  |  43 ++++
 libweston-desktop/internal.h           |   5 +
 libweston-desktop/libweston-desktop.c  |  10 +
 libweston-desktop/libweston-desktop.h  |  33 +++
 libweston-desktop/xwayland.c           |  22 ++
 xwayland/window-manager.c              | 397 ++++++++++++++++++++++++---------
 xwayland/xwayland-internal-interface.h |   2 +
 xwayland/xwayland.h                    |   1 +
 8 files changed, 411 insertions(+), 102 deletions(-)

-- 
2.10.2



More information about the wayland-devel mailing list