pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
418 stars 51 forks source link

Window Focus falls back to parent on system file dialog when interacting with mouse #455

Open BrunoWallner opened 2 months ago

BrunoWallner commented 2 months ago

Description

When using something like rfd to open a file dialog window, the focus properly switches to the new window. But while interacting with it with the mouse, the focus will switch back to its parent and it is impossible to click anything in the file dialog. A workaround is to use super + ←↓↑→ to focus it again and then use keyboard inputs only to interact with the child.

How to reproduce

  1. clone https://codeberg.org/BrunoWallner/apoxel with commit ID: e331ddc66f4a0613c25ea38c2bbecc4a170f711c
  2. cd into path
  3. run: cargo r --release
  4. on the Load world menu select vox importer and click on the Open file button
  5. use the mouse to interact with window that just opened up

System information

ryanabx commented 2 months ago

Just to clarify - you can interact with the focused window keyboard inputs, but not mouse inputs?

If so that'd be similar to an issue I have with visual studio code where sometimes a window will completely lose the ability to receive any kind of mouse event, but keyboard events are fine

BrunoWallner commented 2 months ago

Just to clarify - you can interact with the focused window keyboard inputs, but not mouse inputs?

If so that'd be similar to an issue I have with visual studio code where sometimes a window will completely lose the ability to receive any kind of mouse event, but keyboard events are fine

Yes exactly that is the case. At first it is properly focused and I can use keyboard inputs, but after interacting with the mouse, the focus is lost and I cannot either click on it or use the keyboard.