guake icon indicating copy to clipboard operation
guake copied to clipboard

Window drifts downwards each time you invoke the terminal

Open RZarifov opened this issue 1 year ago • 12 comments

Describe the bug Each time you hit F12 the window appear slightly lower than the top edge of the screen, and when you hide it and reveal it again it appears slightly lower than it was previously. So each time you reveal it, it drifts downwards, and slightly sideways.

Expected behavior It appears stuck towards the top edge of the screen.

Actual behavior Described above.

To Reproduce Manjaro linux with i3wm.
It is not fullscreen. Occupies exactly half the height of the screen. Full width.


$ guake --support
Guake Version:		3.11.dev0

Vte Version: 0.72.1

Vte Runtime Version: 0.72.1


GTK+ Version: 3.24.37

GDK Backend: <GdkX11.X11Display


Desktop Session: i3-with-shmlog


Display: :0

RGBA visual: True

Composited: True

  • Monitor: 0 - PHL DP-2
    • Geometry: 3840 x 2160 at 0, 0
    • Size: 697 x 392 mm²
    • Primary: True
    • Refresh rate: 59.996 Hz
    • Subpixel layout: unknown

RZarifov avatar Jun 10 '23 12:06 RZarifov

I've been having the same issue for a little while, I'm also running i3, though I'm on Arch.

I notice that the position resets every time that I open a new tab and then starts moving again each time that I open 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: <GdkX11.X11Display


Desktop Session: None


Display: :1

RGBA visual: True

Composited: True

  • Monitor: 0 - DEL DisplayPort-2
    • Geometry: 2560 x 1440 at 1050, 120
    • Size: 597 x 336 mm²
    • Primary: True
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DEL DisplayPort-0
    • Geometry: 1050 x 1680 at 0, 0
    • Size: 474 x 296 mm²
    • Primary: False
    • Refresh rate: 59.883 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - DEL DisplayPort-1
    • Geometry: 1680 x 1050 at 3610, 315
    • Size: 474 x 296 mm²
    • Primary: False
    • Refresh rate: 59.883 Hz
    • Subpixel layout: unknown

funnyboy-roks avatar Jun 14 '23 17:06 funnyboy-roks

See: https://github.com/Guake/guake/issues/2047#issuecomment-1587733164

On Wed, Jun 14, 2023, 13:57 Funny @.***> wrote:

I've been having the same issue for a little while, I'm also running i3, though I'm on Arch.

I notice that the position resets every time that I open a new tab and then starts moving again each time that I open 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: <GdkX11.X11Display

Desktop Session: None

Display: :1

RGBA visual: True

Composited: True

  • Monitor: 0 - DEL DisplayPort-2
    • Geometry: 2560 x 1440 at 1050, 120
    • Size: 597 x 336 mm²
    • Primary: True
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown
  • Monitor: 1 - DEL DisplayPort-0
    • Geometry: 1050 x 1680 at 0, 0
    • Size: 474 x 296 mm²
    • Primary: False
    • Refresh rate: 59.883 Hz
    • Subpixel layout: unknown
  • Monitor: 2 - DEL DisplayPort-1
    • Geometry: 1680 x 1050 at 3610, 315
    • Size: 474 x 296 mm²
    • Primary: False
    • Refresh rate: 59.883 Hz
    • Subpixel layout: unknown

— Reply to this email directly, view it on GitHub https://github.com/Guake/guake/issues/2184#issuecomment-1591742879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3QA2DJL6OVQPUOG7QYRB3XLH3R7ANCNFSM6AAAAAAZBUWDJU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mlouielu avatar Jun 16 '23 13:06 mlouielu

@trinaldi trinaldi is a good man ,he tell me the right way to slove the problem. I copy his rely to u @Xeizzeth Xeizzeth

You can get the 3.9 version from the Arch Archive

sudoedit /etc/pacman.conf and add guake to IgnorePkg (line 25 for me): ... IgnorePkg = guake ... Inside the directory where you downloaded the guake-3.9.0-3-any.pkg.tar.zst file, run sudo pacman -U guake-3.9.0-3-any.pkg.tar.zst

liqiang0330 avatar Jun 20 '23 15:06 liqiang0330

I am using kitty with tdrop and it works perfectly.

https://github.com/noctuid/tdrop

On Tue, Aug 22, 2023, 02:21 eissalaken @.***> wrote:

Is there a fix for this besides installing an older version (which fails to install on manjaro using the steps above)? The Kitty developer is hostile to implementing quake drop-down functionality like Guake, and Yakuake comes with a bunch of KDE dependencies.

— Reply to this email directly, view it on GitHub https://github.com/Guake/guake/issues/2184#issuecomment-1687026294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4L57DDM3E5DDKLTJHA5LXWPC5HANCNFSM6AAAAAAZBUWDJU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

madhur avatar Aug 22 '23 02:08 madhur

The drift seems to be caused by the .present and .deiconify methods in some configurations / desktop environments. I was able to see it in the logs by running in debug mode (-v):

Current window position: (root_x=0, root_y=0)
Current window position: (root_x=0, root_y=27)
Current window position: (root_x=2, root_y=45)
Current window position: (root_x=4, root_y=63)
Current window position: (root_x=6, root_y=81)
Current window position: (root_x=8, root_y=99)

Here is a fix/workaround that worked for me:

Insert a line at 741 with this self.window.move(window_rect.x, window_rect.y) in this file https://github.com/Guake/guake/blob/master/guake/guake_app.py#L741

So it becomes:

        self.window.move(window_rect.x, window_rect.y)
        log.debug("Current window position: %r", self.window.get_position())
        self.restore_pending_terminal_split()
        self.execute_hook("show")

For me the file is located in /usr/lib/python3.11/site-packages/guake/guake_app.py though your path may be different.

I can submit a PR for this if a maintainer is willing to merge it in

jpribyl avatar Aug 24 '23 17:08 jpribyl

@jpribyl I tried your workaround and so far it's working perfectly.

Thanks!

trinaldi avatar Aug 24 '23 17:08 trinaldi

@trinaldi I see that you're a contributor, should I open a PR? I don't see a ton of info on the contribution process.. is it essentially just PR and link the issue?

jpribyl avatar Aug 24 '23 17:08 jpribyl

Sure. I tried building from source with your addition and it compiled with no errors/warnings.

I'm also lost on how to run pytest in order to see if it crashes some test cases, though.

trinaldi avatar Aug 24 '23 17:08 trinaldi

Sorry it took a while to get around to checking in, if you make a PR I can check and merge it @jpribyl. CI should run the pytest cases automatically on your PR and in your branch if you host that on github.

Davidy22 avatar Oct 07 '23 08:10 Davidy22

Had the same issue with awesomewm on Ubuntu Mantic (23.10) which ships with guake 3.10. Applied @jpribyl's fix to line 728 in /usr/lib/python3/dist-packages/guake/guake_app.py makes it work correctly. Thanks for the workaround.

dochego avatar Oct 19 '23 13:10 dochego

The drift seems to be caused by the .present and .deiconify methods in some configurations / desktop environments. I was able to see it in the logs by running in debug mode (-v):

Current window position: (root_x=0, root_y=0)
Current window position: (root_x=0, root_y=27)
Current window position: (root_x=2, root_y=45)
Current window position: (root_x=4, root_y=63)
Current window position: (root_x=6, root_y=81)
Current window position: (root_x=8, root_y=99)

Here is a fix/workaround that worked for me:

Insert a line at 741 with this self.window.move(window_rect.x, window_rect.y) in this file https://github.com/Guake/guake/blob/master/guake/guake_app.py#L741

So it becomes:

        self.window.move(window_rect.x, window_rect.y)
        log.debug("Current window position: %r", self.window.get_position())
        self.restore_pending_terminal_split()
        self.execute_hook("show")

For me the file is located in /usr/lib/python3.11/site-packages/guake/guake_app.py though your path may be different.

I can submit a PR for this if a maintainer is willing to merge it in

PERFECT, I found the same issue you did and was messing around in the file for a while and couldn't get my fix to work, but this one did thank you :)

N1ck9141 avatar Nov 04 '23 15:11 N1ck9141

Thanks! The fix recommended by @jpribyl also solves this for me.

Paethon avatar Dec 31 '23 14:12 Paethon