flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

[macOS] Area selection doesn't work right away after clicking on "Take screenshot"

Open AmandaBSobrinho opened this issue 2 years ago • 5 comments

Flameshot Version

Flameshot v12.0.0 (b4737f8a) Compiled with Qt 5.15.3 darwin: 20.6.0 osx: 11.6

Installation Type

Using the ready-made package from Github Releases

Operating System type and version

macOS Big Sur version 11.6.5

Description

Hello! I noticed that, on macOS, if you try to select an area right after clicking on "Take screenshot", the selection won't work. You have to click again for the selection to work (you can see that in the attached video).

However, if you wait a little (2 seconds) after clicking on "Take screenshot", the selection will work.

Steps to reproduce

  1. Run flameshot (GUI) and click on "Take screenshot"
  2. Click in the screen to try to select the screenshot area
  3. Notice that the area is not marked
  4. Click again, then the area is marked

Screenshots or screen recordings

https://user-images.githubusercontent.com/16309667/175384052-c3f4ca05-19bd-406b-bab6-2d3ac5e21a5e.mov

System Information

  1. macOS Big Sur version 11.6.5
  2. Full HD (1920x1080) 120 Hz

AmandaBSobrinho avatar Jun 23 '22 19:06 AmandaBSobrinho

How to install the previous version? I updated and now it no longer works on my macOS either.

JMultimidia avatar Jun 25 '22 00:06 JMultimidia

@JMultimidia would you please explain the issue you have? Also, have you read our troubleshooting page? https://flameshot.org/docs/guide/troubleshooting/#all-opened-applications-go-away-and-only-the-blank-desktop-is-visible-for-selection

mmahmoudian avatar Jun 25 '22 06:06 mmahmoudian

I can confirm this.

borgmanJeremy avatar Jun 28 '22 14:06 borgmanJeremy

Same here using Catalina 10.15.7.

willycamargo avatar Jul 01 '22 12:07 willycamargo

Same with Monterey 12.5.1.

maycon avatar Sep 13 '22 18:09 maycon

I confirm this issue for macOS Monterey 12.5 too. It appears that mouse events take a bit of time to start coming in when using full-screen mode. When showing the capture widget in normal mode, the selection works immediately. You can try this out yourself by calling m_captureWindow->show() instead of m_captureWindow->showFullScreen().

https://github.com/flameshot-org/flameshot/blob/bd3431a9f5af89f013966c45933115a6bb56eaae/src/core/flameshot.cpp#L120-L124

Obviously, the drawback of this is that you lose full-screen mode.

Tomasito665 avatar Oct 02 '22 18:10 Tomasito665

It looks like the issue lies in the Qt framework. I set up a demo application to test this out and mouse move events will consistently take ~700ms to start coming in when using full-screen mode versus ~30ms in normal screen mode. I have no idea why. In the meantime, I asked the StackOverflow gods for help: https://stackoverflow.com/q/73941230/5508855.

Tomasito665 avatar Oct 04 '22 09:10 Tomasito665

@Tomasito665 thanks for putting that together. Out of curiosity if you build against Qt 6.4 or 6.3 is the behavior the same?

borgmanJeremy avatar Oct 04 '22 11:10 borgmanJeremy

@borgmanJeremy no, but I think that's worth testing out. I will do that later today.

Tomasito665 avatar Oct 04 '22 12:10 Tomasito665

I have just tried it out with Qt 6.4: same behavior... 😓

Tomasito665 avatar Oct 04 '22 16:10 Tomasito665

For reference, I filed a Qt bug report for this: https://bugreports.qt.io/browse/QTBUG-107202

Tomasito665 avatar Oct 06 '22 17:10 Tomasito665