Commit graph

26 commits

Author SHA1 Message Date
John Lindgren
5d0faa2333 xwayland: Process unmanaged client configure requests more quickly
This is a similar fix to 065c37d3f5 but for unmanaged windows.  The issue
could be seen for example when moving the undocked Search Tool window in
Audacious.  For unmanaged windows, we don't track any pending move/resizes,
so just process all client configure requests immediately.
2022-07-23 20:37:59 +02:00
Johan Malm
bfff9d02c7 xwayland.c: fix position bug
Set node position in the configure/set_geometry handlers when moving a
window in response to a client request.

Steps to reproduce weird positioning fixed by this patch:

1. Start leafpad
2. Open Help->About
3. Move the dialog
4. Close the dialog
5. Open it again
6. Drag it and observe a jump in position

There is also an xwayland PyQt5 script in PR #428 which demonstrates
jumpy position.
2022-07-04 18:25:52 +01:00
John Lindgren
80792d446f (Partly) fix handling of client-initiated configure requests
- Add missing call to wlr_scene_node_set_position() in
  unmanaged_handle_commit() -- this fixes moving unmanaged XWayland
  windows.

- Update view->pending_move_resize when we receive a configure request
  for a managed XWayland surface -- this fixes moving managed but
  undecorated XWayland windows.

- Also update view->pending_move_resize when we move a surface while a
  configure request is already pending -- this fixes a discrepancy
  between displayed and actual position for XWayland windows that try to
  set their own initial position, but then get overridden by labwc's
  positioning.

Moving undecorated XWayland windows is still really glitchy -- it appears
that an XWayland window gets sent incorrect mouse motion coordinates when
there is a pending configure request moving the window itself.
2022-07-03 12:59:36 +01:00
Consolatis
2ed7a10779 Chase wlroots: every scene_node parent is now a tree
Chases wlroots ccd0f85c2a36308e35b153c7f9653abac7659af3
wlr_scene: Only allow parenting on a wlr_scene_tree
2022-06-07 07:13:37 +01:00
Johan Malm
71f8aca66b xwayland-unmanaged: wl_list_remove() missing listeners on destroy 2022-06-05 23:34:04 +02:00
Johan Malm
cbc80c196c xwayland-unmanaged: remove excessive logging 2022-06-05 23:34:04 +02:00
Joshua Ashton
538fa1f244 xwayland-unmanaged: Fix set_geometry using container_of of wrong member
Fixes a segfault with starting Steam.
2022-06-05 21:54:26 +01:00
Johan Malm
2a14e8271b xwayland-unmanaged: fix typo 2022-06-05 09:55:25 +01:00
Johan Malm
9dcabbcfdd xwayland-unmanaged: prepare for handling more events
Sway handles some xwayland events that labwc still does not. This commit
just starts to rig up some handlers for these with log messages if they
are caught.

  - set_geometry: try to handle, but cannot find an application that uses
    it, so is untested.
  - request_activate - just log caught event
  - override_redirect - just log caught event
2022-06-05 09:45:58 +01:00
Johan Malm
96315def57 xwayland-unmanaged: put all surfaces under server->unmanaged_tree
...in order to render all unmanaged surfaces above views just like sway
does it:

e5728052b5/sway/desktop/render.c (L1148)

Fixes issue #367
2022-06-05 08:35:03 +01:00
Jelle De Loecker
61675b521c xwayland-unmanaged: focus parent surface on unmap
Re-focus on parent surface if it is available

Fixes #352 relating to JetBrains and Intellij focus issues
2022-05-30 16:14:32 +01:00
Consolatis
163179dda1 Chase wlroots: wlr_scene_surface
To update the wlroots subproject use
meson subprojects update wlroots
2022-05-26 06:48:00 +01:00
Johan Malm
81f216b6a2 xwayland: handle set_override_redirect events
This is needed to allow X11 applications to create surfaces as
non-override_redirect and then change them to override_redirect later

Without this gitk-menus and rofi are treated as xwayland-views with
associated server-side-decoration and forced positioning.
2022-05-03 20:45:30 +01:00
Johan Malm
bd9ac3478a Remove src/damage.c 2022-03-01 20:54:52 +00:00
Johan Malm
e289100a54 xwayland-unmanaged: fix dereference NULL pointer bug
Discovered when right-clicking names in hexchat
2022-03-01 20:45:31 +00:00
Consolatis
17d83402ee xwayland.c: Fix xwayland views activating themself before mapping 2022-02-23 21:47:01 +00:00
Consolatis
a2523081e2 Handle 'lost' unmanaged xsurfaces + improve cursor handling 2022-02-23 21:47:01 +00:00
Johan Malm
532656ad5b Use wlroots scene-graph API
Move xdg-shell and xwayland-shell surfaces to new API

Also render alt-tab on-screen-display by converting cairo-surface to
wlr_buffer
2022-02-23 21:46:48 +00:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
Johan Malm
54804fd3df Implement damage tracking 2021-01-09 22:51:20 +00:00
Johan Malm
9342b2b414 seat: refactor seat_focus_surface() 2020-10-08 20:22:52 +01:00
Johan Malm
8e2b3ea89a seat: remove seat_focused_surface() 2020-10-07 21:49:58 +01:00
Johan Malm
e400700a4a seat: refactor seat_focus_surface() 2020-10-06 21:31:01 +01:00
Johan Malm
96e05057a3 Update .clang-format
Align with wlroots style
2020-09-28 20:41:41 +01:00
Johan Malm
e99d0bb34e labwc.h: remove "extern struct server server" 2020-09-08 20:18:12 +01:00
Johan Malm
8e7f2e78cd Add xwayland-unmanaged.c
Handle xwayland override_direct surfaces separately from the view
struct - in order to simplify code, particularly in view.c
2020-09-04 20:25:20 +01:00