Guake / Guake/guake

Window always appears on first mouse display

Open
#2,190 10 comments 5 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
604
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/Guake/guake/commit/a011f8afad5f2519f489d10cf4277bdea28f0ec9)).

**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()](https://docs.gtk.org/gtk3/method.Window.move.html) 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:

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.