flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

Screen configuration updates not picked up on Windows

Open toelke opened this issue 2 years ago • 3 comments

Flameshot Version

v12.1.0

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), Using the ready-made package from Github Releases, Compiled from source

Operating System type and version

Windows 10 & 11

Description

When the screen configuration changes (screens removed, tablet rotated), flameshot only shows the overlay gui on the "old" parts of the screens.

I have traced the issue to ScreenGrabber::desktopGeometry() (https://github.com/flameshot-org/flameshot/blob/master/src/utils/screengrabber.cpp#L185-L196) where QGuiApplication::screens returns stale data. I am rather certain that this is a Qt bug, but I want to add it here for completeness and to save others from doing the debugging I did.

Steps to reproduce

  1. Run flameshot
  2. Remove a monitor or rotate the tablet
  3. Take a screenshot
  4. Observe the shaded regions not spanning the complete screen.

Screenshots or screen recordings

No response

System Information

  1. Windows 10+11
  2. Single Tablet screen, up to two additional desktop screens

toelke avatar Feb 07 '23 13:02 toelke

I can confirm this on Windows 10.

l-uuz avatar Feb 07 '23 22:02 l-uuz

Can also confirm on windows 10 using 12.1.0

dwilliams-1 avatar May 24 '23 14:05 dwilliams-1

For me, also the context menu of the tray icon is not fully visible making it difficult to close Flameshot. I used the keyboard arrow keys to navigate to the last entry and confirm with Enter. But for a quicker restart of Flameshot I now use this powershell script:

# Define the process name
$processName = "flameshot"

# Stop the process if it's running
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process -Force

# Wait for a moment to ensure the process has stopped
Start-Sleep -Seconds 2

# Start the process again
Start-Process -FilePath "c:\Program Files\Flameshot\bin\flameshot.exe"

Additionally I created a shortcut to the script and set its target to: powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\script.ps1"
This allows me to quickly restart Flameshot from the start menu if necessary. image

dv-klaus-eckelt avatar Aug 15 '24 07:08 dv-klaus-eckelt

duplicate of #3597

borgmanJeremy avatar May 28 '25 02:05 borgmanJeremy