flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.5k stars 1.57k forks source link

Keyboad shortcuts not working on Pop!_OS when tiling mode is on #2315

Closed pinsard closed 2 years ago

pinsard commented 2 years ago

Flameshot Version

Flameshot v11.0.0 () Compiled with Qt 5.11.3 linux: 5.15.11-76051511-generic pop: 21.10

Installation Type

AppImage

Operating System type and version

Linux, Pop!_OS 21.10, Cosmic DE, X Window

Description

Tool shortcuts (arrow, rectangle etc) do work fine when tiling mode is turned off in Cosmic. When tiling is on, Flameshot reports the following message at the right bottom of the screen: Flameshot has lost focus. Keyboard shortcuts won't work until you click somewhere. It happens both with DEB and AppImage formats.

I did see a KDE related complaint, but that seems to be about starting Flameshot gui, not about tool shortcuts.

Steps to reproduce

  1. On flameshot gui
  2. press A on the keyboard to activate the arrow tool

Screenshots or screen recordings

No response

System Information

System:    Kernel: 5.15.11-76051511-generic x86_64 bits: 64 Desktop: GNOME 40.5 Distro: Pop!_OS 21.10 
Machine:   Type: Laptop System: Dell product: Latitude 7480 v: N/A serial: <filter> 
           Mobo: Dell model: 083N35 v: A01 serial: <filter> UEFI: Dell v: 1.24.1 date: 12/15/2021 
Battery:   ID-1: BAT0 charge: 43.5 Wh (98.4%) condition: 44.2/60.0 Wh (73.7%) 
CPU:       Info: Dual Core model: Intel Core i5-7300U bits: 64 type: MT MCP cache: L2: 3 MiB 
           Speed: 1149 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 1149 2: 800 3: 799 4: 747 
Graphics:  Device-1: Intel HD Graphics 620 driver: i915 v: kernel 
           Device-2: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.13 driver: loaded: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.2.2 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel 
           Sound Server-1: ALSA v: k5.15.11-76051511-generic running: yes 
           Sound Server-2: PulseAudio v: 15.0 running: yes 
           Sound Server-3: PipeWire v: 0.3.32 running: yes 
Network:   Device-1: Intel Ethernet I219-LM driver: e1000e 
           IF: enp0s31f6 state: down mac: <filter> 
           Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi 
           IF: wlp2s0 state: up mac: <filter> 
           IF-ID-1: wwan0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb 
           Report: hciconfig ID: hci0 state: up address: <filter> bt-v: 2.1 
Drives:    Local Storage: total: 238.47 GiB used: 87.5 GiB (36.7%) 
           ID-1: /dev/sda vendor: LITE-ON model: CV8-8E256-11 SATA 256GB size: 238.47 GiB 
Partition: ID-1: / size: 48.97 GiB used: 12.58 GiB (25.7%) fs: ext4 dev: /dev/sda2 
           ID-2: /boot/efi size: 1022 MiB used: 189.4 MiB (18.5%) fs: vfat dev: /dev/sda1 
           ID-3: /home size: 167.19 GiB used: 74.73 GiB (44.7%) fs: ext4 dev: /dev/sda4 
Swap:      ID-1: swap-1 type: partition size: 16.6 GiB used: 0 KiB (0.0%) dev: /dev/dm-0 
Sensors:   System Temperatures: cpu: 42.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 277 Uptime: 4d 18h 29m Memory: 15.51 GiB used: 4.68 GiB (30.2%) Shell: Zsh inxi: 3.3.06 
mmahmoudian commented 2 years ago

@pinsard didn't you mentioned in https://github.com/flameshot-org/flameshot/issues/2031#issuecomment-1013317610 that this is not a Flameshot issue? What is the difference between this new issue and the old one?

pinsard commented 2 years ago

Yeah, I did. However, after my comment you mentioned another issue that presents the same behavior on Windows. I decided to wait for the final release of 11 and confirmed the issue persisted. Then I thought it might be better to raise an issue. What made me think of that was the last item in the Bug Fixes topic on the Release Notes for 11.0:

Fixed a problem with some window managers where Flameshot would lose focus and shortcuts would stop working.

Well, apparently Cosmic was not covered, maybe because there were no previous confirmation. I'm sorry if I tought it would be a problem caused by Cosmic (and probably it is) on the first place (because they're the ones who are messing around with Gnome), but if no one brings that to attention, it will probably become one of those situations that existes forever.

Now it is a matter of investigation and waiting. And funding. :(

borgmanJeremy commented 2 years ago

This actually might already be resolved in upstreams. I do most of my Linux development on Arch and have basically every DE installed so I can test the latest and greatest DE's with Flameshot.

If I install the latest version of pop-shell for the AUR on top of the current version of Gnome on Arch, i cannot replicate this.

I can try PopOS 21.10 in a VM with the latest version of pop-shell if you hit a dead end.

pinsard commented 2 years ago

Nah. Lemme do it. I'll install a nightly build or download and compile the source. What do you recommend?

borgmanJeremy commented 2 years ago

On Arch i built from source. It's all typescript so it built really fast.

pinsard commented 2 years ago

Compiled from source, still same behavior. But now I have the source code and will have a look at it. At the bare minumum, I'll learn something, for sure.

Flameshot v11.0.0 (5ab76e2) Compiled with Qt 5.15.2 linux: 5.15.11-76051511-generic pop: 21.10

pinsard commented 2 years ago

I confirm that after a recent update from Pop!_OS, the issue was solved.

Flameshot About Flameshot v11.0.0 (5ab76e2) Compiled with Qt 5.15.2 linux: 5.15.15-76051515-generic pop: 21.10

$ uname -a
Linux lt-5 5.15.15-76051515-generic #202201160435~1642693824~21.10~97db1bb SMP Thu Jan 20 17:35:05 U x86_64 x86_64 x86_64 GNU/Linux

This update included a fix to the recently discovered CVE-2021-4034 - I saw "polkit" scrolling up during the upgrade. Anyways... as I didn't replace Flameshot and the shortcuts started to work again after the OS upgrade, it was probably something related to the tiling support, as I suspected since the beginning.

Closing the issue.