Guake / guake

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

Guake moving to another monitor on mouse click #1720

Open J-Schaefer opened 4 years ago

J-Schaefer commented 4 years ago

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
sphh commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

NargiT commented 4 years ago

Same here with checked :heavy_check_mark: 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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

NargiT commented 4 years ago

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

J-Schaefer commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

In my local install I removed the code from the commit 5205ce2b3360d19e1a53a7996c502a33a435f794 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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.

jonnyabu1 commented 4 years ago

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 commented 4 years ago

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

phiberoptick commented 4 years ago

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 commented 4 years ago

Downgrade to 3.6.3 helped me

DanitiKain commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

diegoduncan21 commented 3 years ago

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 commented 3 years ago

Can confirm that https://github.com/Guake/guake/pull/1774/commits/9bfd2bcbe326dc5d5500cbc6a01d73535ddb0f27 works

fermino commented 3 years ago

It works out here too! v3.7.0

JanezStupar commented 3 years ago

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

Iakobs commented 3 years ago

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

stiltr commented 3 years ago

@JanezStupar & @Iakobs, did you try https://github.com/Guake/guake/issues/1720#issuecomment-741529867?

OscarHanzely commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Hi Thanks for the input, I did close the Guake instance. Removed the old application. (Did not reboot the host though). Installed new app version. Started it manually the first time and inside the guake window run the --version command. Is that correct procedure or something could be still hanging? Please let me know.

On Tue, Mar 15, 2022 at 10:10 AM David Yang @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/Guake/guake/issues/1720#issuecomment-1068171712, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJL6FZ4RNDVH36ID5HXCQF3VACY5VANCNFSM4KUQVMOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Davidy22 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@OscarHanzely I see you gave a thumbs down on my other comment mentioning this, but as seen in https://github.com/Guake/guake/issues/1720#issuecomment-741529867 you can just apply the change yourself. No compiling needed.

OscarHanzely commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 7 months ago

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