pywebview icon indicating copy to clipboard operation
pywebview copied to clipboard

Moving window and selecting screen does not work on Wayland

Open mrckompadre opened this issue 2 years ago • 3 comments

Specification

  • pywebview version: 4.4.1
  • operating system: Linux Wayland
  • web renderer:

Description

The x, y and screen parameters do not work in the Wayland composer.  Works correctly on Xorg

Practicalities

  • NO

  • NO

mrckompadre avatar Feb 02 '24 07:02 mrckompadre

+!

paulocoutinhox avatar Feb 02 '24 16:02 paulocoutinhox

Is this GTK or QT?

r0x0r avatar Feb 03 '24 21:02 r0x0r

QT. Testing was carried out on KDE Plasma 5

mrckompadre avatar Feb 03 '24 23:02 mrckompadre

I have been having the same issue on my own lately, this time using GTK on Wayland Gnome session

Both move_window or even the default position do not affect the window position. Moreover, the easy_drag or even the pywebview-drag-region do not seem to work either on wayland

All these do work correctly when switching to a x11 Gnome session

edit: also confirming this on 4.4.1

peeweek avatar Feb 28 '24 10:02 peeweek

It seems that you cannot programmatically move a window in Wayland. See for example https://stackoverflow.com/questions/72891037/work-arounds-for-lack-of-qwidgetmove-under-wayland

r0x0r avatar Feb 29 '24 08:02 r0x0r

Window position handling in Wayland is the responsability of the Desktop Manager. This functionality is usually implemented in support libraries provided by the graphical shell. For example with Gnome, you would write an extension in JavaScript using the Shell API and invoke functions such as https://gjs-docs.gnome.org/meta14~14/meta.window#method-move_frame to set the window position, and communicate between your regular application and the extension using whatever means you want (sockets, dbus,...)

Unfortunately there doesn't seem to be a way to access this API from a regular application, so pywebview wouldn't be able to do it in a non intrusive fashion, much less in a desktop agnostic way.

ElDonad avatar Mar 06 '24 11:03 ElDonad

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 06 '24 02:04 github-actions[bot]

The message to post on the issue when closing it. If none provided, will not comment when closing an issue.

github-actions[bot] avatar Apr 11 '24 02:04 github-actions[bot]