Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.37k stars 577 forks source link

Window always appears on first mouse display #2190

Open twistedturtle opened 11 months ago

twistedturtle commented 11 months ago

I can't find an issue quite like this one, but perhaps I didn't use the right filters.

Describe the bug

I have appear on mouse display enabled. When guake is first toggled it correctly appears on the monitor with the mouse cursor. With subsequent toggles it will always appear on the monitor it first appeared on, ignoring where the mouse cursor is.

The problem seems to be in Guake.show(), RectCalculator.set_final_window_rect() returns the correct position, but self.window.move() has no effect.

# guake -v
Updated window position: (root_x=0, root_y=1)
...
Current window position: (root_x=1920, root_y=1)

However if I move the window after it's been "presented", like so

self.window.present()
self.window.move(window_rect.x, window_rect.y)

ie in guake_app.py, move line 699 to somewhere between line 729 and 740 (inclusive), the window is moved properly and the expected behaviour is re-established.

Line numbers match master branch at time of writing (v3.10 a011f8a).

Expected behavior

When toggled to show, guake should appear on whatever monitor the mouse cursor is currently on (then stay there until hidden).

Actual behavior

When guake is first toggled, it correctly appears on the monitor with the mouse cursor. With subsequent toggles it will always appear on the monitor it first appeared on, ignoring where the mouse cursor is.

To Reproduce

Not sure if it matters but I'm using Manjaro. DE is Mate. Have multiple monitors, and enable appear on mouse display. Start guake, press F12 to show it on one monitor, then hide it and try to show it on another monitor.

It may be window manager specific, as the docs for Gtk.Window.move() say this:

Asks the [window manager][gtk-X11-arch] to move window to the given position. Window managers are free to ignore this; most window managers ignore requests for initial window positions (instead using a user-defined placement algorithm) and honor requests after the window has already been shown.


Please run $ guake --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting. And make sure you run the command OUTSIDE the Guake.

$ guake --support Guake Version: 3.11.dev0 Vte Version: 0.72.2 Vte Runtime Version: 0.72.2 -------------------------------------------------- GTK+ Version: 3.24.38 GDK Backend:
kiarn commented 11 months ago

I have exactly the same problem with the Mate desktop on debian sid. Moving the window after the present() method solves the problem.

Thanks to @twistedturtle for providing a temporary fix !

stouracp commented 8 months ago

I have some issue on Fedora 39 with wayland, and 4 screens. The guake is still on primary screen.

stouracp commented 8 months ago

Just discovered, guake appears, on the screen, where is guake setting opened.

jsalgado78 commented 8 months ago

Some issue on Fedora 38 with Wayland (with Xorg works fine) and 2 screens (laptop and external monitor). The guake is still on laptop screen.

novaTopFlex commented 2 months ago

On my system, the Guake terminal appears to move between monitors in my (rare) multi-monitor setups, as the physical monitors are connected to one another and both claim to be display :0. If your displays are virtual displays created with VNC (probably TigerVNC as Xrandr extensions are not available or supported on TightVNC), then the displays will be clearly different. This is why I could theoretically have multiple different Guake sessions running on different windows at once, if I could run the application in parallel.

emrahbillur commented 1 month ago

Same issue now. Ignoring configuration to show guake on mouse display, Guake always appears on laptop display with the size of external display. Here is guake --support output

Guake Version:      3.6.3

Vte Version:        0.60.3

Vte Runtime Version:    0.60.3

--------------------------------------------------
GTK+ Version:       3.24.20

GDK Backend:        GdkX11.X11Display

--------------------------------------------------
Desktop Session: ubuntu

--------------------------------------------------
Display: :1

RGBA visual: True

Composited: True

* Monitor: 0 - SAM DP-1
    * Geometry:     3440 x 1440 at 0, 0
    * Size:     798 x 334 mm²
    * Primary:      True
    * Refresh rate: 59.97 Hz
    * Subpixel layout:  unknown
* Monitor: 1 - AUO eDP-1
    * Geometry:     1920 x 1200 at 817, 1440
    * Size:     301 x 188 mm²
    * Primary:      False
    * Refresh rate: 60.02 Hz
    * Subpixel layout:  unknown
lordvcs commented 1 month ago

On Ubuntu 24.04, I have the same issue