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 window opens in the middle of screen in Ubuntu when using Wayland #1844

Closed
lapisdecor opened this issue Apr 16, 2021 · 14 comments
Closed

Comments

@lapisdecor
Copy link

lapisdecor commented Apr 16, 2021

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Guake.

For how to run the latest Guake in your computer, please refer to Install from source.

Describe the bug
Guake window opens in the middle of screen in Ubuntu when using Wayland

Expected behavior
Guake window opens on the top of the screen

Actual behavior

It opens on the middle of the screen

To Reproduce
Install Ubuntu 21.04 beta or Ubuntu 20.04, install guake and press F12


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.6.3

Vte Version: 0.62.3

Vte Runtime Version: 0.62.3


GTK+ Version: 3.24.25

GDK Backend: gi.GdkWaylandDisplay


Desktop Session: ubuntu


Display: wayland-0

RGBA visual: True

Composited: True

  • Monitor: 0 - AOC Q3279WG5B
    • Geometry: 2560 x 1440 at 0, 0
    • Size: 730 x 430 mm²
    • Primary: False
    • Refresh rate: 74.97 Hz
    • Subpixel layout: unknown
@fedevx
Copy link

fedevx commented Apr 19, 2021

@lapisdecor I was getting the same issue, which brought me here. However, our environments are not the same:

$ guake --support

Guake Version: 3.7.0

Vte Version: 0.64.0

Vte Runtime Version: 0.64.0


GTK+ Version: 3.24.28

GDK Backend: GdkX11.X11Display


Desktop Session: gnome-xorg


Display: :1

RGBA visual: True

Composited: True

  • Monitor: 0 - BOE eDP-1
    • Geometry: 1920 x 1080 at 0, 0
    • Size: 344 x 194 mm²
    • Primary: True
    • Refresh rate: 240.00 Hz
    • Subpixel layout: unknown

Because of that, I started testing and found something that worked for me (and might work for you) was the following:

  1. Get Guake's Preferences
  2. Select the "Main Window" tab
  3. Use the "Height" and "Width" sliders until the window is visible in the correct position and size again.

@ryanerwin
Copy link

I'm getting the same behavior on Ubuntu 21.04.

Using Gnome-tweak-tool if I set:
If it set "Windows > Center new Windows"
Then guake will always appear in the center of the screen...

I can drag it to the correct (top bar) location, but after I hide it, it will reappear in the center again

If using Gnome-tweak-tool I disable the "Center new windows" setting,

Then new windows will appear somewhere else on screen, but still not in the correct location.

Note I've always used the "center new windows" setting, but it was never a problem with Guake until Ubuntu 21.04.

$ guake --support

Guake Version: 3.6.3

Vte Version: 0.62.3

Vte Runtime Version: 0.62.3


GTK+ Version: 3.24.25

GDK Backend: gi.GdkWaylandDisplay


Desktop Session: ubuntu


Display: wayland-0

RGBA visual: True

Composited: True

  • Monitor: 0 - DEL Dell U4919DW
    • Geometry: 5120 x 1440 at 0, 0
    • Size: 1200 x 340 mm²
    • Primary: False
    • Refresh rate: 29.98 Hz
    • Subpixel layout: unknown

@Davidy22
Copy link
Collaborator

A patch that may fix this has just been merged. Can you confirm whether or not this is fixed in the current git main? If you can't compile, updates when the next version is released are also welcome.

@lapisdecor
Copy link
Author

Pressing F11 multiple times eventually puts the window in the top position but if I press F12 again it goes to the center.
this on wayland, on xorg works fine:

guake --version
Guake Terminal: 3.6.3
VTE: 0.64.2
VTE runtime: 0.64.2
Gtk: 3.24.30

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu Impish Indri (development branch)
Release:	21.10
Codename:	impish

@mlouielu
Copy link
Collaborator

I believe this is an won't fix for Wayland, as in Wayland didn't provide absolute coordinate system, please see: #1632 (comment)

@brightghost
Copy link

The information in that issue seems to be wrong or outdated. Can confirm this is working correctly for me in Gnome+Wayland after disabling "Center new Windows" in gnome-tweak-tool as suggested by @ryanerwin. Inclined to think this is a bug with gnome-tweak-tool's ability to identify and exempt floating windows under Wayland.

@Davidy22
Copy link
Collaborator

Davidy22 commented Nov 6, 2021

Can original reporter confirm if this fixes the issue?

@lapisdecor
Copy link
Author

I can confirm that when I disable "Center new Windows" on gnome-tweak-tools the problem disapears and Guake window works fine.

@Davidy22
Copy link
Collaborator

Alright, closing since problem apparently came from another program.

@brightghost
Copy link

I take it all back--I've raised this issue against gnome-shell but we've determined it is in fact guake that's the culprit.

Though there is code to force guake to use the "x11 backend", it doesn't seem to be working properly, as I'm still seeing Wayland:

$ guake --support

Guake Version: 3.6.3

Vte Version: 0.64.2

Vte Runtime Version: 0.64.2


GTK+ Version: 3.24.30

GDK Backend: gi.GdkWaylandDisplay


Desktop Session: ubuntu


Display: wayland-0

RGBA visual: True

Composited: True

  • Monitor: 0 - ACI ASUS PB258
    • Geometry: 2560 x 1440 at 0, 0
    • Size: 550 x 310 mm²
    • Primary: False
    • Refresh rate: 59.95 Hz
    • Subpixel layout: unknown

The positioning only superficially appears to work when "center-new-windows" is disabled because Wayland happens to place the window at the top-left corner. You will see if you try to position it elsewhere, or set the width less than 100%, it does not work.

On the other hand, if I force it to use the x11 backend as suggested in @mlouielu 's linked comment, I can position it freely. So the bug here seems to be that the GDK_BACKEND=x11 guake config is not properly being applied.

(Postscript: I don't know much about the state of affairs with Wayland beyond it being my desktop's default, but when you say "this is a WONTFIX for Wayland," I take that to mean this functionality cannot be implemented on a system using Wayland. In fact, it can work on such a system, or at least one using mutter- we just need to ensure we are using its XWayland support, which evidently allows it to coexist peacefully on a Wayland desktop.)

@lapisdecor
Copy link
Author

lapisdecor commented Nov 11, 2021 via email

@Davidy22
Copy link
Collaborator

Davidy22 commented Nov 11, 2021

From your guake --support output, I see the version is slightly behind:

Guake Version: 3.6.3

The code you linked to was added in 3.8, so it won't be in the version of Guake that you are currently running and getting your guake --support output from. It also only affects propagating the variable to terminals inside guake, and should have nothing to do with how Guake itself behaves. 3.8 did fix the GDK backend force generally though, as the line that does the force in the original commit seems to have been in a do-nothing place until it was moved in 3.8.

I think you'll find that updating to 3.8 does do the force as expected, although it has also been the subject of some amount of objection; see #1934. I created #1963 removing the line and related code in response to it so that removing the x11 force can enter consideration and anyone who has objections can voice them, but it hasn't gotten much discussion in favor or against it in the PR, so #1934 would probably be the place to go if you want to duke it out with the people in favor of actually for real removing the line.

My ancient machine is running cinnamon, xorg, haven't yet actually had the chance to see a guake wayland issue for myself since cinnamon fully doesn't support wayland but I'm in for an upgrade from my 11 year old machine soon and I'll probably choose a DE that does support wayland for the new machine so I can actually join in on this and test fixes on my own machine instead of just taking other people's word that their code/recommended change works.

@lapisdecor
Copy link
Author

I don't really know what I'm talking about, I didn't test it. I don't know the way Guake works, I'm new to this project; I just wanted to help, so I did a search of the repository for GDK_BACKEND to find places where it might get set and I only find that one.
If I had the money I would buy you a new machine, believe me.

@Davidy22
Copy link
Collaborator

oh my new machine's already in the mail and eagerly awaited, just taking a while. You can get a version that uses x11 properly by default by grabbing the latest version of Guake, it's just somewhat contested whether it should be default or not.

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

6 participants