Wayland: Unable to access window position, finding the window under the cursor doesn't work #98928

Open
opened 2022-06-16 12:18:08 +02:00 by Campbell Barton · 4 comments

Wayland can't access window positions. From what I can tell this is an intentional limitation and there aren't ways to access this information.

This means functions such as WM_window_find_under_cursor doesn't work.

From the user perspective the following functionality wont work.

  • "Swap Areas" / SCREEN_OT_area_swap isn't able to swap areas with another window.
  • Some "Eyedropper" functions such as datadropper_win_area_find wont be able to access other windows.
  • Dragging items between windows doesn't work (see wm_event_cursor_other_windows).

Currently GHOST_SupportsWindowPosition() has been added to prevent other windows being found when they shouldn't be.


NOTE: there is a proposed solution that might allow Blender to restore the positions of windows saved in a file: see: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/18

Wayland can't access window positions. From what I can tell this is an intentional limitation and there aren't ways to access this information. This means functions such as `WM_window_find_under_cursor` doesn't work. From the user perspective the following functionality wont work. - "Swap Areas" / `SCREEN_OT_area_swap` isn't able to swap areas with another window. - Some "Eyedropper" functions such as `datadropper_win_area_find` wont be able to access other windows. - Dragging items between windows doesn't work (see `wm_event_cursor_other_windows`). Currently `GHOST_SupportsWindowPosition()` has been added to prevent other windows being found when they shouldn't be. --- NOTE: there is a proposed solution that might allow Blender to restore the positions of windows saved in a file: see: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/18
Author
Owner

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Author
Owner

Note that while it's not possible to access the absolute window locations, a way to workaround this could be to define one window being the parent of all other windows, in that case it's possible to find the window location relative to the parent window, although this requires the child windows to be popups. See: xdg_popup_listener.configure.


In the case of dragging items, we could look into supporting OS-level drag & drop, instead of bypassing the windowing system in the case of Blender dragging into other Blender windows.

Note that while it's not possible to access the absolute window locations, a way to workaround this could be to define one window being the parent of all other windows, in that case it's possible to find the window location relative to the parent window, although this requires the child windows to be popups. See: `xdg_popup_listener.configure`. --- In the case of dragging items, we could look into supporting OS-level drag & drop, instead of bypassing the windowing system in the case of Blender dragging into other Blender windows.
Campbell Barton changed title from Wayland unable to access window position, finding the window under the cursor doesn't work to Wayland: Unable to access window position, finding the window under the cursor doesn't work 2022-08-08 02:16:41 +02:00
Member

@ideasman42 hi, this report is now displayed under "Untriaged reports list" (after Gitea migration).
From report description, this seems a known issue/limitation for Wayland, can you confirm it in that case?
Or is this fixed already? :)

@ideasman42 hi, this report is now displayed under "Untriaged reports list" (after Gitea migration). From report description, this seems a known issue/limitation for Wayland, can you confirm it in that case? Or is this fixed already? :)
Pratik Borhade added
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-02-15 14:36:32 +01:00
Campbell Barton added
Type
Known Issue
and removed
Type
Report
labels 2023-02-16 05:33:03 +01:00
Campbell Barton removed the
Status
Needs Info from Developers
label 2023-02-16 05:35:58 +01:00
Author
Owner

@PratikPB2123 it's a known issue, I opened it to keep track of any problems related to the inability to know absolute positions of windows.

(set as known-issue).

@PratikPB2123 it's a known issue, I opened it to keep track of any problems related to the inability to know absolute positions of windows. (set as known-issue).
Campbell Barton added the
Interest
Wayland
label 2023-03-21 10:22:34 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#98928
No description provided.