pywlroots icon indicating copy to clipboard operation
pywlroots copied to clipboard

Future API improvements

Open heuer opened this issue 1 year ago • 2 comments

This issue is intended to collect and discuss API improvement suggestions.

  • pointer: Replace dx and dy properties with delta_x and delta_y. The PointerMotionEvent has the properties "delta_x" and "delta_y". The other events call the same thing "dx" and "dy"
  • xwayland: Surface.or_surface_wants_focus: ~~The name makes no sense at all. The underlying function is called xwayland_or_surface_wants_focus which makes sense, but in the context of the surface, the "or" makes no sense. Suggestion: Surface.wants_focus~~ See comment below.

heuer avatar May 14 '24 11:05 heuer

The "or" stands for "override redirect" (not for ||) and basically means an unmanaged surface. Those are used in X11 for popups / tooltips and the like. See https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/0.17/include/wlr/xwayland/xwayland.h?ref_type=heads#L262 for more details.

Consolatis avatar May 28 '24 21:05 Consolatis

The "or" stands for "override redirect" (not for ||) and basically means an unmanaged surface. Those are used in X11 for popups / tooltips and the like. See https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/0.17/include/wlr/xwayland/xwayland.h?ref_type=heads#L262 for more details.

Thank you. You're right. I read the wlr function name (by mistake) like "either xwayland or a surface". I'm unsure, even knowing my mistake, if I like the method name, though. ;)

Anyway, thanks for clearing up!

heuer avatar May 28 '24 21:05 heuer