PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

Scratch windows not always opening at the center of the screen when `center-new-windows` is true

Open madx opened this issue 2 years ago • 11 comments
trafficstars

Describe the bug I am using ULauncher as my application launcher/shortcut provider. It opens at random places of the screen depending on if I have other applications opened even though I've set it to always open on the scratch layer and I have center-new-windows set to true in my Mutter configuration.

To Reproduce Steps to reproduce the behavior:

  1. Have no window on screen
  2. Open ULauncher: it properly spawns in the center
  3. Have a window opened
  4. Open ULauncher: it appears in a corner of the screen

See attached video for a demo

Expected behavior ULauncher always open in the center of the screen.

Screenshots Screencast from 2023-11-17 11-11-26.webm

System information: Please execute ./gather-system-info.sh in you PaperWM clone and paste the output below.

Distribution: Ubuntu
GNOME Shell 45.0-1ubuntu2
PaperWM branch/tag: Installed from EGO.
{
  "_generated": "Generated by SweetTooth, do not edit",
  "description": "Tiling window manager with a twist",
  "name": "PaperWM",
  "settings-schema": "org.gnome.shell.extensions.paperwm",
  "shell-version": [
    "45"
  ],
  "url": "https://github.com/paperwm/PaperWM",
  "uuid": "[email protected]",
  "version": 62,
  "version-name": "45.4.1"
}
Enabled extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
quick-settings-tweaks@qwreey
[email protected]
[email protected]
[email protected]
[email protected]
steal-my-focus-window@steal-my-focus-window

Additional context To be honest I'm not sure if this is a PaperWM or a Mutter bug but I don't think I had a recent Mutter update and it was working properly last week

madx avatar Nov 17 '23 10:11 madx

Well, easy way to tell - disable PaperWM, logout, login and see if it still happens.

jtaala avatar Nov 17 '23 10:11 jtaala

Hmm - I can't reproduce this:

https://github.com/paperwm/PaperWM/assets/30424662/6cfe2758-e44b-446d-9390-0666ca931d8f

jtaala avatar Nov 17 '23 10:11 jtaala

Well, easy way to tell - disable PaperWM, logout, login and see if it still happens.

Yup I was thinking about testing that, so I just did, and it works correctly:

Screencast from 2023-11-17 12-13-36.webm

As soon as I reenable PaperWM the behavior is back.

Which version of ULauncher / Mutter are you using?

madx avatar Nov 17 '23 11:11 madx

I actually have the same issue with Smile so I don't think this is a ULauncher issue

madx avatar Nov 17 '23 11:11 madx

Just double-checking you have ulauncher in winprops as scratch?

Can you disable your center-new-windows setting and retest?

jtaala avatar Nov 17 '23 11:11 jtaala

Ulauncher is v5.15.6 Mutter is 45.1-1

jtaala avatar Nov 17 '23 11:11 jtaala

ha - apparently I have center-new-windows enabled:

image

jtaala avatar Nov 17 '23 11:11 jtaala

I'll keep trying to reproduce - if it's PaperWM and I can reproduce (and if it was working fine last week) then we'll be able to bisect and find the issue.

jtaala avatar Nov 17 '23 11:11 jtaala

Okay, one thing to check if PaperWM could be conflicting with another extension - can you try disable all other extensions (and just leave PaperWM enabled) and the logout/login again?

jtaala avatar Nov 17 '23 11:11 jtaala

Thanks for your help on this, I will try the different techniques and I'll also try bisecting with older versions of the extension!

madx avatar Nov 17 '23 12:11 madx

Alright, I did more investigation and I think we can mostly forget the above: it happens only when I have windows in the scratch layer. See the screencast below:

Screencast from 2023-11-17 15-54-43.webm

What I did change last week was that I have set KeepassXC (which uses an old and ugly Qt) as always on the scratch layer because it was messing around with the windowing (window was appearing on screens it wasn't supposed to be in)

I can work around this by not having it always opened and hopefully you can reproduce the behaviour with other apps.

I'm gonna make an uneducated guess at what could cause the issue: if the virtual screen of the scratch layer is wider than the physical screen, computations for the center could be messed up?

I will rename this issue accordingly as it is not specifically related to ULauncher.

madx avatar Nov 17 '23 15:11 madx