guake icon indicating copy to clipboard operation
guake copied to clipboard

Guake always appears on mouse display regardless of Guake Preferences

Open givascu opened this issue 4 years ago • 15 comments

Describe the bug

Guake appears on mouse display even though "always on primary" option is checked in Guake Preferences -> Main Window -> Placement -> Appear on display. Same thing happens when "0 (primary)" option is checked. These options seem to have no effect.

Expected behavior

Guake should appear on primary display, as per the checked option in Guake Preferences.

Actual behavior

Guake appears on mouse display regardless of what is checked in Guake Preferences.

To Reproduce

  1. Go to Guake Preferences -> Main Window -> Placement -> Appear on display.
  2. Toggle each option, one at a time.
  3. Use the "Toggle Guake visibility" keyboard shortcut to open Guake.
  4. Guake appears on mouse display everytime. The "Appear on display" options in Guake Preferences seem to have no effect on Guake's behavior.

$ guake --support

Guake Version: 3.6.3

Vte Version: 0.58.3

Vte Runtime Version: 0.58.3


GTK+ Version: 3.24.13

GDK Backend: gi.GdkWaylandDisplay


Desktop Session: gnome


Display: wayland-0

RGBA visual: True

Composited: True

  • Monitor: 0 - BOE 0x06ee
    • Geometry: 1920 x 1080 at 0, 1200
    • Size: 310 x 170 mm²
    • Primary: False
    • Refresh rate: 60.01 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DEL DELL U2415
    • Geometry: 1920 x 1200 at 0, 0
    • Size: 520 x 320 mm²
    • Primary: False
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown

givascu avatar Dec 06 '19 11:12 givascu

Although not exactly the same issue, I think my issue is related to this one.

I have the option to appear on mouse display enabled. I have a two-monitor setup and my mouse is on one of the two screens. I open Guake on one screen and move my mouse to the other screen. When I click on a window on the other screen Guake jumps to that screen. If I then click on the first screen, it does not jump back.

Another case: If I open Guake, then click on a window on the same screen and then click on a window on the other screen, it does not jump to that screen.

I would guess that appear on mouse display is supposed to open on the screen where your mouse is and stay there.

The output of guake --support below:

Guake Version: 3.6.3 Vte Version: 0.52.2 Vte Runtime Version: 0.52.2

GTK+ Version: 3.22.30 GDK Backend: GdkX11.X11Display

Desktop Session: ubuntu

Display: :0 RGBA visual: True Composited: True

  • Monitor: 0 - DP-1
    • Geometry: 2560 x 1600 at 1920, 0
    • Size: 641 x 401 mm²
    • Primary: True
    • Refresh rate: 59.86 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - eDP-1
    • Geometry: 1920 x 1080 at 0, 520
    • Size: 344 x 193 mm²
    • Primary: False
    • Refresh rate: 60.06 Hz
    • Subpixel layout: unknown

OmerSakar avatar Dec 17 '19 12:12 OmerSakar

I have the same problem - guake always appears on mouse display - although it is configured to always appear on a specific display.

Distribution is Fedora 31

output of guake --support:

Guake Version:		3.6.3

Vte Version:		0.58.3

Vte Runtime Version:	0.58.3

--------------------------------------------------
GTK+ Version:		3.24.13

GDK Backend:		GdkX11.X11Display

--------------------------------------------------
Desktop Session: gnome

--------------------------------------------------
Display: :0

RGBA visual: True

Composited: True

* Monitor: 0 -  XWAYLAND0
    * Geometry:		1920 x 1080 at 1920, 0
    * Size:		480 x 270 mm²
    * Primary:		True
    * Refresh rate:	59.96 Hz
    * Subpixel layout:	unknown
* Monitor: 1 -  XWAYLAND1
    * Geometry:		1920 x 1080 at 0, 0
    * Size:		480 x 270 mm²
    * Primary:		False
    * Refresh rate:	59.96 Hz
    * Subpixel layout:	unknown

simonCor avatar Dec 23 '19 09:12 simonCor

Can reproduce this issue on guake v 3.6.3 on linux mint xfce If you set in Geometry the max height and width and then restart guake it will now display on mouse even though its not activated drag height or width to any other than max will work for me, even after restart

NingPing avatar Jan 04 '20 15:01 NingPing

Hmmm i tested it. Showed another issue: The Gemoetry settings does not change anything.

Guake keeps to open in full screen no matter what is set in Geometry. (The "Start fullscreen"-option is not active).

simonCor avatar Jan 08 '20 08:01 simonCor

TL;DR moving windows under Wayland cannot be done

I just looked into it and I found that code-wise, the window position does not change at all, neither does the monitor index - it stays at the configured index. I highly suspect our wayland setups have something to do with that. I will investigate further.

EDIT: @simonCor I do encounter the fullscreen issue as well with my 3.6.3 production instance. This issue is not there anymore with a build from master (3.7.1 or so).

EDIT2: this is where I am at: when I change the window_rect x and y values in https://github.com/Guake/guake/blob/fb8a6ff974758c724db97d0dc22f8e3b3e0e95e9/guake/guake_app.py#L674

and do a print(self.window.get_position()) afterwards, I can see that the self.window Gtk.Window object gets updated and "moved". However, the movement is NOT reflected by the window manager or wayland. The window stays where it is - exactly

(x, y from top left corner) monitor
(49,49) 1680 x 1050
(38, 64) 1920 x 1200 primary with top bar
(50,52) 1920 x 1200

Also I tried getting the guake window with EWMH but there the guake windows do not show up at all.

EDIT3:

  • https://stackoverflow.com/questions/48319631/gtk3-move-child-window-on-wayland?rq=1
  • https://gitlab.freedesktop.org/wayland/wayland/issues/110

basically says, that it will never work.

$ guake --support

Guake Version: 3.7.1

Vte Version: 0.58.3

Vte Runtime Version: 0.58.3


GTK+ Version: 3.24.14

GDK Backend: gi.GdkWaylandDisplay


Desktop Session: gnome


Display: wayland-0

RGBA visual: True

Composited: True

  • Monitor: 0 - DEL DELL U2412M
    • Geometry: 1920 x 1200 at 3600, 0
    • Size: 520 x 320 mm²
    • Primary: False
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - SAM SyncMaster
    • Geometry: 1680 x 1050 at 0, 0
    • Size: 470 x 300 mm²
    • Primary: False
    • Refresh rate: 59.88 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - HWP HP LP2475w
    • Geometry: 1920 x 1200 at 1680, 0
    • Size: 540 x 350 mm²
    • Primary: False
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown

freimair avatar Feb 18 '20 15:02 freimair

hate to do this but for all you guys having trouble with wayland and gnome-shell:

try this shell extension and terminator

freimair avatar Feb 18 '20 20:02 freimair

try this shell extension and terminator

Is "quake-mode" extension going to work on newer versions of gnome-shell? Seems that the latest supported shell on the extensions page is only 3.30.

givascu avatar Feb 19 '20 08:02 givascu

Hui thanks @freimair - this is cool and works.

I use it on gnome Version 3.34.3 - no problems.

simonCor avatar Feb 19 '20 08:02 simonCor

I think I have it in #1765

can you guys confirm?

Just add

window.move(window_rect.x, window_rect.y) before window.maximize() at line 267 in the file /usr/lib/python3.8/site-packages/guake/utils.py, or whichever python version you have. To know exactly which file to modify, execute locate 'guake/utils.py' and look for the one in /usr/lib

Reference: https://stackoverflow.com/a/39386341/3476100

gchamon avatar May 28 '20 15:05 gchamon

@gchamon thanks for taking the time to investigate this. I'll give it a try as soon as I get back to my dual monitor setup.

givascu avatar May 29 '20 07:05 givascu

@gchamon - sorry for taking too long to respond. I've tested your suggestion, but unfortunately, it doesn't fix the bug for me, it still reproduces. Please let me know how can I assist you further should you choose to continue investigating this.

givascu avatar Jun 16 '20 08:06 givascu

I had the same issue on my Fedora 35 (guake 3.7.0). Now I have a frankenguake running (pip install + adding the /data-directory from git) and I don't experience the issue anymore. So I assume it is fixed and I'm looking forward to some updated fedora packages.

$ guake --support (with bug)

Guake Version: 3.7.0

Vte Version: 0.66.2

Vte Runtime Version: 0.66.2


GTK+ Version: 3.24.31

GDK Backend: GdkX11.X11Display


Desktop Session: gnome


Display: :0

RGBA visual: True

Composited: True

  • Monitor: 0 - XWAYLAND10
    • Geometry: 2560 x 1440 at 1920, 0
    • Size: 600 x 340 mm²
    • Primary: True
    • Refresh rate: 59.91 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - XWAYLAND11
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 530 x 300 mm²
    • Primary: False
    • Refresh rate: 59.96 Hz
    • Subpixel layout: unknown
$ guake --support (without bug, different display setup)

Guake Version: 3.8.5

Vte Version: 0.66.2

Vte Runtime Version: 0.66.2


GTK+ Version: 3.24.31

GDK Backend: <GdkX11.X11Display


Desktop Session: gnome


Display: :0

RGBA visual: True

Composited: True

  • Monitor: 0 - XWAYLAND53
    • Geometry: 1920 x 1080 at 1920, 0
    • Size: 530 x 300 mm²
    • Primary: True
    • Refresh rate: 59.962 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - XWAYLAND54
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 530 x 300 mm²
    • Primary: False
    • Refresh rate: 59.962 Hz
    • Subpixel layout: unknown

I will also add an output without the bug on the same setup as where I had the bug.

white-gecko avatar Mar 30 '22 14:03 white-gecko

Coming back on this: it still happens on GNOME Shell 42.5 with Wayland as GDK backend and the following guake version:

$ guake --version
Guake Terminal: 3.7.0
VTE: 0.68.0
VTE runtime: 0.68.0
Gtk: 3.24.34

It doesn't seem to reproduce with X11 as GDK backend though.

givascu avatar Sep 20 '22 07:09 givascu

I have installed the latest guake from pip, which does not have the bug. So I think this issue is a matter of creating up to date packages for guake but not an issue in the guake source code anymore. So this could be closed.

white-gecko avatar Dec 11 '23 14:12 white-gecko

I have installed the latest guake from pip, which does not have the bug. So I think this issue is a matter of creating up to date packages for guake but not an issue in the guake source code anymore. So this could be closed.

Thanks @white-gecko, installing from pip worked for me too.

deivid11 avatar Jan 28 '24 19:01 deivid11