masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

"top" and "left" frame parameters #106

Open titaniumbones opened 3 years ago

titaniumbones commented 3 years ago

Is it possible to use the "top" and "left" frame parameters with pgtk on Wayland? I find that no matter where my frame is located on my screen, (frame-parameter (selected-frame) 'top) returns 0, while (set-frame-position (selected-frame) 0 0) returns t, but doesn't actually move the frame.

Running pgtk emacs from a couple of days ago, on a linux laptop with Gnome on Wayland.

fejfighter commented 3 years ago

Hi @titaniumbones,

This is expected behaviour.

Wayland does not have global coordinates available to clients applications displaying on the screen. Instead each app gets a surface (and additional subsurfaces). so setting the frame position to be located at 0,0 would move it to that location inside the surface, which is where the main frame should already be.

There is a similar thread on emacs-devel about this.

the gtk window documentation covers some of this https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-position