Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guake moving to another monitor on mouse click #1720

Open
J-Schaefer opened this issue Feb 13, 2020 · 45 comments
Open

Guake moving to another monitor on mouse click #1720

J-Schaefer opened this issue Feb 13, 2020 · 45 comments

Comments

@J-Schaefer
Copy link

Hello,
since the last update the guake terminal is moving to the monitor I click into when it's opened.

To recreate the issue you need to have Guake opened on one window and right after clicking into the Guake terminal or opening it, click on any window or the free desktop surface on the other monitor. It only seems to work one time after Guake got the focus.

I installed Guake from this repository: ppa:linuxuprising/guake. I hope this helps recreating and fixing the issue.

Best,

Jeroen


$ guake --support

Guake Version: 3.7.0

Vte Version: 0.52.2

Vte Runtime Version: 0.52.2


GTK+ Version: 3.22.30

GDK Backend: GdkX11.X11Display


Desktop Session: ubuntu


Display: :1

RGBA visual: True

Composited: True

  • Monitor: 0 - HDMI-0
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 531 x 299 mm²
    • Primary: True
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DP-1
    • Geometry: 1920 x 1080 at 1920, 0
    • Size: 531 x 299 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
@J-Schaefer J-Schaefer changed the title Guake moving to monitor on mouse click Guake moving to another monitor on mouse click Feb 13, 2020
@sphh
Copy link

sphh commented Feb 16, 2020

I can confirm this behaviour.

$ guake --support

Guake Version: 3.7.0

Vte Version: 0.52.2

Vte Runtime Version: 0.52.2


GTK+ Version: 3.22.30

GDK Backend: GdkX11.X11Display


Desktop Session: cinnamon


Display: :0

RGBA visual: True

Composited: True

  • Monitor: 0 - eDP1
    • Geometry: 2736 x 1824 at 0, 0
    • Size: 260 x 170 mm²
    • Primary: True
    • Refresh rate: 59.96 Hz
    • Subpixel layout: unknown
  • Monitor: 1
    • Missing, since I write this from my laptop without the second monitor plugged in...

@Charlie789
Copy link

Same here.
Also I noticed, that I can't hide terminal window by clicking on any window on the monitor with terminal opened. I can see that after click, guake terminal disappear for a moment and appears immediately on top. The only option to hide is to press F12. It behaves like I have 'always on top' turned on (but I dont). Before the update it was working.

$ guake --support Guake Version: 3.7.0

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 - DVI-D-0
    • Geometry: 1080 x 1920 at 0, 0
    • Size: 531 x 299 mm²
    • Primary: True
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DP-1-3
    • Geometry: 1920 x 1080 at 1080, 399
    • Size: 531 x 299 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown

@urdh
Copy link

urdh commented Feb 17, 2020

Same here. Also, I can no longer maximize the window using Super+; it immediately un-maximizes.

$ guake --support

Guake Version: 3.7.0

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 - eDP-1-1
    • Geometry: 1920 x 1080 at 2160, 840
    • Size: 309 x 174 mm²
    • Primary: True
    • Refresh rate: 60.02 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DP-1-2-2-1
    • Geometry: 1080 x 1920 at 0, 0
    • Size: 527 x 296 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - DP-1-2-2-8
    • Geometry: 1080 x 1920 at 1080, 0
    • Size: 527 x 296 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown

@kevthehermit
Copy link

Same Here

$ guake --support

Guake Version: 3.7.0

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 - eDP-1
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 293 x 162 mm²
    • Primary: True
    • Refresh rate: 60.03 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DP-1-1-8
    • Geometry: 2560 x 1440 at 1920, 0
    • Size: 597 x 336 mm²
    • Primary: False
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - DP-2
    • Geometry: 2560 x 1440 at 4480, 0
    • Size: 597 x 336 mm²
    • Primary: False
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown

@la5942
Copy link

la5942 commented Feb 27, 2020

Presumably you don't have Appear on mouse display option selected under Preferences->Main Window->Placement?

@NargiT
Copy link

NargiT commented Feb 28, 2020

Same here with checked ✔️ Appear on mouse display

When I disabled it, I do not have the bug anymore, but then I loose the mouse display feature.

I would expect as before. Open the term where ever the mouse is, but do not change focus on mouse click.

$ guake --support

Guake Version: 3.7.0

Vte Version: 0.52.2

Vte Runtime Version: 0.52.2


GTK+ Version: 3.22.30

GDK Backend: GdkX11.X11Display


Desktop Session: ubuntu


Display: :1

RGBA visual: True

Composited: True

  • Monitor: 0 - HDMI-1
    • Geometry: 1920 x 1080 at 1920, 0
    • Size: 521 x 293 mm²
    • Primary: True
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - HDMI-2
    • Geometry: 1920 x 1080 at 3840, 0
    • Size: 531 x 299 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - DP-1
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 531 x 299 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown

@la5942
Copy link

la5942 commented Feb 28, 2020

I would expect as before. Open the term where ever the mouse is, but do not change focus on mouse click.

Pretty sure it was never meant to work this way. The terminal appears on your mouse display as per the option, it doesn't seem like a bug to me?

@J-Schaefer
Copy link
Author

Same here with checked Appear on mouse display

When I disabled it, I do not have the bug anymore, but then I loose the mouse display feature.

I would expect as before. Open the term where ever the mouse is, but do not change focus on mouse click.

$ guake --support

Yes, disabling the Appear on mouse display works for me as well.

@la5942
Copy link

la5942 commented Feb 28, 2020

@J-Schaefer Can you close the issue if you have a confirmed solution?

@NargiT
Copy link

NargiT commented Feb 28, 2020

I would expect as before. Open the term where ever the mouse is, but do not change focus on mouse click.

Pretty sure it was never meant to work this way. The terminal appears on your mouse display as per the option, it doesn't seem like a bug to me?

before If I click on another screen, as my terminal was already open it was not moving the it to mouse place.

This is the scenario that we expect
Given - not visible terminal (toggled)
When - toggle open terminal with mouse position on screen 1
Then - Terminal is open on screen 1
When - Click with mouse on screen 2
Then - Terminal stays on screen 1 *

What happens since the upgrade

  • Already toggled open terminal moves to screen 2

@J-Schaefer
Copy link
Author

@J-Schaefer Can you close the issue if you have a confirmed solution?

Well, the solution is to disable one of the options. But I don't believe that the jumping of the window after it has been opened is a feature of Guake. So it's no real solution unfortunately.

@J-Schaefer
Copy link
Author

J-Schaefer commented Feb 28, 2020

I would expect as before. Open the term where ever the mouse is, but do not change focus on mouse click.

Pretty sure it was never meant to work this way. The terminal appears on your mouse display as per the option, it doesn't seem like a bug to me?

before If I click on another screen, as my terminal was already open it was not moving the it to mouse place.

This is the scenario that we expect
Given - not visible terminal (toggled)
When - toggle open terminal with mouse position on screen 1
Then - Terminal is open on screen 1
When - Click with mouse on screen 2
Then - Terminal stays on screen 1 *

What happens since the upgrade

  • Already toggled open terminal moves to screen 2

Thanks for the clarification! It's really comprehensible. I do appreciate that.

@InfinitePuddle
Copy link

In my local install I removed the code from the commit 5205ce2 which restored the expected functionality for the terminal positioning on mouse click. (I'm not familiar with the issue that commit was fixing though, so I may see some side effects from this.)

@abd3lraouf
Copy link

In my local install I removed the code from the commit 5205ce2 which restored the expected functionality for the terminal positioning on mouse click. (I'm not familiar with the issue that commit was fixing though, so I may see some side effects from this.)

I've reverted that commit manually and it worked as expected, thanks

@InFerYes
Copy link

I believe I have the same issue. I have 3 monitors, and when I used to drop Guake on the left monitor to work on the center it used to stay there, but now it pops up on the monitor where I click the mouse. Once Guake lost its focus it will stay, but accidentally selecting it while tabbing will make Guake appear on the monitor with the mouse again.

@tytan652
Copy link

tytan652 commented Mar 31, 2020

It seems the functions set_final_window_rect from RectCalculator is used at each window_event due to the commit 5205ce2 with the call of the function unfullscreen, causing the change of the monitor where Guake is shown.

tytan652 referenced this issue Mar 31, 2020
…ow manager

Expect handling from accel-key fullscreen toggle, also handle from window state changed.

Because if you bind same accel-key for fullscreen in window manager, you will not trigger it
from Guake toggle fullscreen, instead from wm.

This should fix wierd window size & position when first using Guake fullscreen toggle, then
toggle fullscreen by wm hotkey.
@jonnyabu1
Copy link

I will confirm this is a recent change in behavior. I have 3 monitors. I open Guake on one, say the right one. If I click out of Guake onto anything on the right monitor, then click something in the middle or left monitor, it stays in place on the right monitor. If I do not click out of Guake, it moves monitors when I click on the middle or right monitor. Since this was never needed before, more often than not I forget to click out of Guake ( an uneeded extra click ) and end up just getting rid of Guake and opening Tilix since it doesn't move around on me.

This is a recent change in behavior. Previously it stayed where it was. As for the check box in Preferences > Main Windows > Appear on mouse display, this is not really a good solution. If I uncheck it I can set which monitor to open on and that partially works as it will stay there. However, that presumes I always want it to open on one monitor, which is not the case. For me, I will use all three monitors at times depending on what I have open and where these open windows are placed. Otherwise I'd have to move everything I'm working on on one monitor to another one then open Guake so I can continue to do what I'm doing in my other windows. That or sacrifice one monitor specifically for Guake and not have anything else open on it, thus making it almost a wasted monitor as there's only specific times I use I use the terminal for more than 10 seconds. I suppose if I had a terminal open 100% of the time that would be acceptable.

In the end I would like to see a return of the previous functionality where once I open it on a monitor, it stays there unless I tell it to move. Not move on its own accord.

Thanks for the work on Guake! I do appreciate the program and like to use it, when it's not jumping around all over the place :p

@VintageCake
Copy link

This is still an issue that is very annoying with multi-monitor setups.

@phiberoptick
Copy link

I can confirm this as well. Looking at the date of the commit & release that appears to be about the time I started having the issue as well.

I started using guake a few years ago mainly due to being stuck on a tiny laptop screen at the time for the benefit of hiding and tabs (and maybe a little Quake nostalgia...) and it just grew on me.

Since I never use the fullscreen toggle I'll probably do the same as @AbdElraoufSabri and manually revert it and build a temporary substitute for the current package I am using from the Arch community repo.

Thank you to the author and all the maintainers for all your hard work!

`

$ guake --support

Guake Version: 3.7.0

Vte Version: 0.60.0

Vte Runtime Version: 0.60.0


GTK+ Version: 3.24.14

GDK Backend: GdkX11.X11Display


Desktop Session: xfce


Display: :0.0

RGBA visual: True

Composited: False

  • Monitor: 0 - BOE eDP1
    • Geometry: 1366 x 768 at 1920, 328
    • Size: 340 x 190 mm²
    • Primary: True
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - SAM DP2
    • Geometry: 1920 x 1080 at 3286, 16
    • Size: 480 x 270 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - VIZ HDMI1
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 850 x 480 mm²
    • Primary: False
    • Refresh rate: 60.00 Hz
    • Subpixel layout: unknown
      `

@artturik
Copy link

Downgrade to 3.6.3 helped me

@DanitiKain
Copy link

Downgrade or install different drop down terminal seems to be only option. Really sucks when you have mouse set to activate on hover. Just keeps popping a terminal on ever screen move. I love guake but need another option to only open on mouse position when activated not on click or on focus.

@stiltr
Copy link

stiltr commented Dec 9, 2020

I applied PR #1774 and that seems to have fixed the problem for me.
I just modified utils.py and restarted guake. For me it was located at /usr/lib/python3.7/site-packages/guake/utils.py, but it will probably depend on your distro.

@jonnyabu1
Copy link

jonnyabu1 commented Dec 9, 2020

I applied PR #1774 and that seems to have fixed the problem for me.
I just modified util.py and restarted guake. For me it was located at /usr/lib/python3.7/site-packages/guake/utils.py, but it will probably depend on your distro.

I can confirm that this looks to be working for me as well. Finally! Good stuff

For me, on Manjaro it was located in /usr/lib/python3.8/site-packages/guake/utils.py

@andrezap
Copy link

thanks @stiltr, it worked perfectly! I can confirm on pop os!

@diegoduncan21
Copy link

Downgrade to 3.6.3 helped me

https://ubuntu.pkgs.org/20.04/ubuntu-universe-i386/guake_3.6.3-2_all.deb.html works, ty.

@KristjanTammekivi
Copy link

Can confirm that 9bfd2bc works

@fermino
Copy link

fermino commented Apr 15, 2021

It works out here too!
v3.7.0

@JanezStupar
Copy link

3.6.3 stopped working after recent update.... So I guess I'm off to find a replacement....

@Iakobs
Copy link

Iakobs commented May 27, 2021

Hi! This is still happening to me in version 3.7.0 in a virtual machine

@stiltr
Copy link

stiltr commented May 27, 2021

@JanezStupar & @Iakobs, did you try #1720 (comment)?

@OscarHanzely
Copy link

OscarHanzely commented Mar 11, 2022

The issue still persists, can somebody permanently apply the PR on the release version to fix an issue that was happening for years now? Why there is a reluctance from developers to fix the clear bug?

FYI the fix from the PR is no longer working nor relevant as the code changed

@Davidy22
Copy link
Collaborator

Missed cleaning up this issue because it wasn't linked in #1775, which was merged and released as part of Guake 3.8. #1774 was not merged because it was broken, and the submitter closed it to create another fix which was merged. Judging by the dredge, I assume that 1775 didn't fix it either? What version of Guake are you running?

@OscarHanzely
Copy link

OscarHanzely commented Mar 14, 2022

The latest shipped with Ubuntu 21.10

oscar (11:20):~$ guake --version
Guake Terminal: 3.7.0
VTE: 0.64.2
VTE runtime: 0.64.2
Gtk: 3.24.30

I also tested the latest version for Debian and same behavior. just getting some errors on certain commands which may be the case of non approved distro

oscar (11:30):~$ guake --version
/home/oscar/.local/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.39ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
Guake Terminal: 3.8.5
VTE: 0.64.2
VTE runtime: 0.64.2
Gtk: 3.24.30

@Davidy22
Copy link
Collaborator

3.8.x should have the patch. Did you confirm that you stopped the running instance of 3.7 and tested 3.8? guake --version actually reports a different version number to the one that is currently active if you updated and haven't killed the previously running one. If 3.8 does still encounter the issue then 1775 didn't fix the issue, does applying 1774 resolve it for you? It was presumably closed by the submitter because 1775 was better but if 1774 fixes the issue and the one merged doesn't then we can look at getting it merged in.

@OscarHanzely
Copy link

OscarHanzely commented Mar 15, 2022 via email

@Davidy22
Copy link
Collaborator

Exiting Guake should be enough. Can test 1774 once I have a second monitor to test since 1775 apparently didn't do it, but the submitter probably retracted it for a reason and we may need to look into this more.

@OscarHanzely
Copy link

Would I be able to get a nightly build or something from the branch you mentioned so I can install and test it myself ? or maybe I would need to compile it on my machine I guess, right ?

@stiltr
Copy link

stiltr commented Mar 19, 2022

@OscarHanzely I see you gave a thumbs down on my other comment mentioning this, but as seen in #1720 (comment) you can just apply the change yourself. No compiling needed.

@OscarHanzely
Copy link

@stiltr I tried that one, thats why I voted thumbs down, it does not work any more at all. But @Davidy22 talks about some 1775 that was closed, which I may need to search for.

@Davidy22
Copy link
Collaborator

1774 was the one that was closed, 1775 is already merged into a released version of Guake. If you have tested 1774 as per the instructions on the comment you put a thumbs down on, then neither resolve the issue for you and we need to find something else to solve this.

@OscarHanzely
Copy link

I am happy to help, as many may have the same issue. Is there any debug information I can turn on and provide some logs?

@Davidy22
Copy link
Collaborator

Starting Guake with guake --verbose will make Guake tell a lot more, and it might say something helpful at the moment that Guake moves monitors. I suspect this is something we need to dive into documentation for though.

@OscarHanzely
Copy link

OscarHanzely commented Mar 23, 2022

Sorry for the delay guys, so I was observing today from the verbose what is happening. Here are logs and particular events:

When Guake is launched or gained focus by clicking on the terminal window following event is triggered:

set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  hdisplacement = 0
  vdisplacement = 0
Current monitor geometry
  window_rect.x: 1920
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
aligning to center!
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 1920
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=1920, root_y=0)
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>

I started by opening the terminal visibility with F12 on my RIGHT monitor. Which coordinates for x would be 1920. Both monitors are same resolution.

Every time the window loses the focus by clicking anywhere outside of it, regardless if its the same monitor, or second unrelated monitor, the event is triggered but with different coordinates:
Same monitor (my right):

set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  hdisplacement = 0
  vdisplacement = 0
Current monitor geometry
  window_rect.x: 1920
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
aligning to center!
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 1920
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=1920, root_y=0)
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>

Secodn monitor, my left (coordinates 0,0)

set_final_window_rect
  height_percents = 50
  width_percents = 100
  halignment = 0
  valignment = 0
  hdisplacement = 0
  vdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1080
  window_rect.width: 1920
aligning to center!
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 540
  window_rect.width: 1920
Updated window position: (root_x=1920, root_y=0)
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>

So it makes total sense, the current monitor geometry changes X value from 1920 to 0 and therefore the RESIZING MAIN WINDOW TO THE FOLLOWING VALUES: log shows window_rect.x: going from 1920 to 0 or vice versa.

Now the big question is, why is this resizing window event even triggered when window looses the focus ? :)

Interestinghly though, even though it shows in third log output, that window is resized to window_rect.x: 0 the same log shows that it thinks window did not change Updated window position: (root_x=1920, root_y=0). That may be the root cause where to look for the bug.

@OscarHanzely
Copy link

I just want to report, that I recently upgraded to Ubuntu 22.04 LTS and after the upgrade, the Guake stays on the spot. No more moving to another monitor with a click. Not sure what changed, as there is tons of settings reset to default, including new kernel, but it solved the problem.

@66Ton99
Copy link

66Ton99 commented Dec 14, 2023

3 years and no fix ;(
I had to use 3.6.3 version :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests