[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-06-20 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

Nate Graham  changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-06-20 Thread Jovan Pavlovic
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #42 from Jovan Pavlovic  ---
Just to confirm new 6.4 spectacle release on arch solved issue for me.
Thanks everyone

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-06-13 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

Nate Graham  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #41 from Nate Graham  ---
*** Bug 505548 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-06-03 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #40 from Nate Graham  ---
As the "version fixed in" field says, this is fixed in version 6.4.0.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-06-03 Thread Lynn T.
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #39 from Lynn T.  ---
I still seem to be on qtbase 6.8 and spectacle 6.3.5, yet my problem has been
resolved.
Given that I'm not sure if I actually got the workaround on my system or not,
I'm replying.
Here is my information

Plasma: 6.3.5
KDE Frameworks: 6.14.0
Qt Version: 6.8.3
Wayland version: 1.23.1

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-06-01 Thread Jonas Ryssel
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #38 from Jonas Ryssel  ---
(In reply to Noah Davis from comment #37)
> Git commit 64e46b80e621e48f6e7fc9eff555c320d327457b by Noah Davis.
> Committed on 30/05/2025 at 19:13.
> Pushed by ndavis into branch 'Plasma/6.4'.

I just compiled it and can confirm that the bug has been fixed.
A huge thank you from me <3

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-30 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In||6.4.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-30 Thread Noah Davis
https://bugs.kde.org/show_bug.cgi?id=502047

Noah Davis  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
   |hics/spectacle/-/commit/f40 |hics/spectacle/-/commit/64e
   |7154111eb6fd3f8c0cc3d80eb3e |46b80e621e48f6e7fc9eff555c3
   |6c0a241be7  |20d327457b

--- Comment #37 from Noah Davis  ---
Git commit 64e46b80e621e48f6e7fc9eff555c320d327457b by Noah Davis.
Committed on 30/05/2025 at 19:13.
Pushed by ndavis into branch 'Plasma/6.4'.

Workaround QWindow::screen being wrong with some fractional DPR screen layout
combinations

Caused the selection editor to select on the wrong screen.


(cherry picked from commit f407154111eb6fd3f8c0cc3d80eb3e6c0a241be7)

Co-authored-by: Noah Davis 

M  +5-0src/Gui/CaptureWindow.cpp

https://invent.kde.org/graphics/spectacle/-/commit/64e46b80e621e48f6e7fc9eff555c320d327457b

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-30 Thread Noah Davis
https://bugs.kde.org/show_bug.cgi?id=502047

Noah Davis  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Latest Commit||https://invent.kde.org/grap
   ||hics/spectacle/-/commit/f40
   ||7154111eb6fd3f8c0cc3d80eb3e
   ||6c0a241be7
 Resolution|--- |FIXED

--- Comment #36 from Noah Davis  ---
Git commit f407154111eb6fd3f8c0cc3d80eb3e6c0a241be7 by Noah Davis.
Committed on 30/05/2025 at 02:49.
Pushed by ndavis into branch 'master'.

Workaround QWindow::screen being wrong with some fractional DPR screen layout
combinations

Caused the selection editor to select on the wrong screen.

M  +5-0src/Gui/CaptureWindow.cpp

https://invent.kde.org/graphics/spectacle/-/commit/f407154111eb6fd3f8c0cc3d80eb3e6c0a241be7

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-29 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=502047

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #35 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/graphics/spectacle/-/merge_requests/459

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-24 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #34 from [email protected] ---
(In reply to Nate Graham from comment #30)
> If anyone can still reproduce this issue in Qt 6.9, please let us know.
> Thanks a lot, folks!

I can still reproduce it using the steps in Bug 500555. It is highly resolution
specific and placement of the monitor makes a difference too.

Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

Nate Graham  changed:

   What|Removed |Added

 Status|NEEDSINFO   |CONFIRMED
 Resolution|WAITINGFORINFO  |---

--- Comment #33 from Nate Graham  ---
Ok yeah, sounds like it. Re-opening.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Jonas Ryssel
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #32 from Jonas Ryssel  ---
(In reply to Nate Graham from comment #30)
> If anyone can still reproduce this issue in Qt 6.9, please let us know.

Under the assumption that my issue is indeed the same as everyone else, I still
have the issue on
KDE Plasma 6.3.5
KDE Frameworks 6.14.0
Qt 6.9.0.

If you think that my issue is still a different bug, even after reading what I
wrote in comment #31 (i.e. that my monitors are not actually overlapping. The
output of `kscreen-doctor -o` is
Left monitor:Geometry: 0,0 1707x1920
Right monitor: Geometry: 1707,341 2560x1440
) , then I'll create a new bug. I just think you misunderstood what I meant.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #29 from Nate Graham  ---
Jonas, your issue involves overlapping screens, unlike most other people
encountering the bug. This makes it something different, which would need a
separate bug report.

However overlapping screens like that are not really supported; I'd strongly
recommend using a different arrangement, as you'll find a million weird
random-feeling bugs everywhere. Also, in a future Plasma version, arrangements
like this will be disallowed.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Jonas Ryssel
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #31 from Jonas Ryssel  ---
(In reply to Noah Davis from comment #26)
> The screenshot for this case actually comes directly from KWin's screenshot 
> plugin
> without modification, so I'm not totally sure what's going on there. I think 
> 2560 is
> likely being divided by 1.5 somewhere (1706.67) and rounded (1707), then 
> multiplied
> by 1.5 by Spectacle (2560.5) and rounded again (2561). Unfortunately there's 
> not a
> lot that can be done about that since screen and window sizes are defined in 
> logical
> coordinates (physical pixel size divided by DPR) as integers. Qt's QScreen and
> QWindow classes use integers for sizes and positions, but Wayland itself even 
> uses
> integers for sizes and positions in logical coordinates. This means some 
> precision is
> guaranteed to be lost.

It doesn't seem like you can solve the issue by fixing the math, but just to
prevent double work/research:
I already tried reproducing the bug on various scaling factors, writing down
which caused the issue, then trying to recreate the formula using all
combinations of ceil, floor, round, *2, /2, /scaling_factor up to a depth of
five (e.g. `floor(round((width*2)/scaling_factor)/2)`).
I wasn't able to make a formula with a +1 pixel error on exactly all the
monitor resolutions and scaling factors where the issue occurs. So I think the
formula might be way more complicated that just rounding once or twice.

(In reply to Nate Graham from comment #29)
> Jonas, your issue involves overlapping screens, unlike most other people
> encountering the bug. This makes it something different, which would need a
> separate bug report.

Just to clarify: My day-to-day monitor setup doesn't (purposefully) include
overlapping monitors. I simply observed that the screenshot of my leftmost
monitor was 1 pixel wider that what the resolution of the monitor supposedly
was, which could potentially point at the monitors somehow accidentally
overlapping by one pixel.
Since most of you had issues reproducing the bug, purposefully overlapping the
monitors was only to see if I could forcefully reproduce with any setup and if
it would act in the same way as the bug this issue is tackling (which could
also be useful for testing a fix). The fact that it does, suggests that my
theory of the monitors overlapping with one pixel is correct.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Marcin Orlowski
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #28 from Marcin Orlowski  ---
Which is a good opportunity to introduce some basic editing tools to Spectacle,
like crop :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

Nate Graham  changed:

   What|Removed |Added

 Resolution|--- |WAITINGFORINFO
 Status|CONFIRMED   |NEEDSINFO

--- Comment #30 from Nate Graham  ---
For people who have been able to reproduce this issue (the original issue, not
the new one reported by Jonas which involves overlapping screens), are you
still seeing it happen with Qt 6.9? We're having a great deal of trouble
reproducing it on our Qt 6.9 dev systems, and suspect it may already be fixed.

If anyone can still reproduce this issue in Qt 6.9, please let us know. Thanks
a lot, folks!

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Noah Davis
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #27 from Noah Davis  ---
It turns out this is a lot more complicated and depends on more parts outside
of Spectacle than I thought. I get a feeling this won't be fixed in time for
6.4 unless a lot of special effort is made at different levels of the stack.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Noah Davis
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #26 from Noah Davis  ---
(In reply to Jonas Ryssel from comment #18)
> I have a strong suspicion that sometimes KWin and Spectacle disagree on the
> resolution of displays when using fractional scaling.

That could be the case. I was recently told by KWin a developer that it's
actually impossible to properly get the device pixel ratio on Wayland using Qt
or KDE APIs. Most of the time QScreen::devicePixelRatio is good enough, but
there are edge cases.

> With my setup (where the bug is present) `the display is set to 2560x2880
> with 150% scaling.
> If I take a full screen screenshot using the "current screen" option in
> spectacle, the resolution is 2561x1440.
> This suggests that spectacle (or QT or something else) thinks that the
> display is 1 pixel wider than what KWin thinks, and if I then place that
> display to the left, the displays will overlap by 1 pixel, causing the issue.

The screenshot for this case actually comes directly from KWin's screenshot
plugin without modification, so I'm not totally sure what's going on there. I
think 2560 is likely being divided by 1.5 somewhere (1706.67) and rounded
(1707), then multiplied by 1.5 by Spectacle (2560.5) and rounded again (2561).
Unfortunately there's not a lot that can be done about that since screen and
window sizes are defined in logical coordinates (physical pixel size divided by
DPR) as integers. Qt's QScreen and QWindow classes use integers for sizes and
positions, but Wayland itself even uses integers for sizes and positions in
logical coordinates. This means some precision is guaranteed to be lost.

>  My (unqualified) guess on what causes the issue / what to look for in
> the code 
> I think there are two bugs which would fix this issue, and I don't know
> which one is easier to fix (probably nr. 1).
> 
> 1. There is a math issue somewhere in the code (duh!).
> In my tests the issue only seems to be present when `resolution/scaling
> factor` calculation results in the fractional part being above .5 (i.e. it
> would be rounded up), which suggests a rounding error... I have however also
> found a case where the faction is above .5 and the bug isn't present, so it
> is only a hunch.
> I guess this relates to how "weird" resolutions causes the issue. I have
> another PC setup where I couldn't reproduce the issue, but once I switched
> to a 1368x768 resolution, it became much easier to reproduce it without
> purposefully overlapping the displays.
> 
> 2. If you have overlapping displays, Spectacle seemingly takes your mouse
> offset relative to the top left corner of one display, then selects an area
> with the same offset but relative to the other display's top left corner.
> 
> Sorry for rambling ;)

Number 2 is probably what I'll end up having to do. I don't mind ramblers who
are helping :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-23 Thread Noah Davis
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #25 from Noah Davis  ---
I can't reproduce the original video showcase with two screens horizontally
next to each other, but I can reproduce the screenshot showcase with two
screens centered at the middle.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-22 Thread Kamen
https://bugs.kde.org/show_bug.cgi?id=502047

Kamen  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #23 from Kamen  ---
I also can reproduce this - I have three screens - two with the same resolution
(2560x1440) and scaling 150%, and a laptop screen in the middle (2256x1504)
with 175% scaling. One additional detail - the two external screens are
daisy-chained and one of them is always projected on one of the other two,
depending on how they are ordered.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-21 Thread Kamen
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #24 from Kamen  ---
(In reply to Kamen from comment #23)
> I also can reproduce this - I have three screens - two with the same
> resolution (2560x1440) and scaling 150%, and a laptop screen in the middle
> (2256x1504) with 175% scaling. One additional detail - the two external
> screens are daisy-chained and one of them is always projected on one of the
> other two, depending on how they are ordered.

With some more testing - seems it is always the second one in the daisy-chain
that can't be region selected.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-16 Thread John Kizer
https://bugs.kde.org/show_bug.cgi?id=502047

John Kizer  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|CONFIRMED

--- Comment #22 from John Kizer  ---
I can't personally reproduce, but marking as "confirmed" based on the number of
different reports detailing this issue. Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-16 Thread Lynn
https://bugs.kde.org/show_bug.cgi?id=502047

Lynn  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #21 from Lynn  ---
I can confirm I have this issue with three 3840x2160, lined horizontally, with
the middle monitor rotated 90 degrees clockwise at 150% scaling. 
The middle monitor is the only one that has problems, both unrotated monitors
are able to work fine without issue. 

kscreen-console outputs
START: Requesting Config
Received config. Took 3 milliseconds
Screen:
maxSize: QSize(64000, 64000)
minSize: QSize(0, 0)
currentSize: QSize(6514, 1674)

-

Id:  1
Name:  "DP-1"
Type:  "DisplayPort"
Connected:  true
Enabled:  true
Priority:  2
Rotation:  KScreen::Output::None
Pos:  QPoint(3954,234)
MMSize:  QSize(699, 395)
FollowPreferredMode:  false
Size:  QSize(3840, 2160)
Scale:  1.5
Clones:  None
Mode:  "2"
Preferred Mode:  "1"
Preferred modes:  QList("1")
Modes: 
 "1""3840x2160@60"   QSize(3840, 2160)   60
 "10""1920x1080@240"   QSize(1920, 1080)   239.884
 "11""1920x1080@120"   QSize(1920, 1080)   120
 "12""1920x1080@120"   QSize(1920, 1080)   119.88
 "13""1920x1080@60"   QSize(1920, 1080)   60
 "14""1920x1080@60"   QSize(1920, 1080)   60
 "15""1920x1080@60"   QSize(1920, 1080)   59.94
 "16""1600x1200@60"   QSize(1600, 1200)   60
 "17""1680x1050@60"   QSize(1680, 1050)   59.954
 "18""1280x1024@75"   QSize(1280, 1024)   75.025
 "19""1440x900@60"   QSize(1440, 900)   59.887
 "2""3840x2160@240"   QSize(3840, 2160)   239.99
 "20""1280x960@60"   QSize(1280, 960)   60
 "21""1280x800@60"   QSize(1280, 800)   60
 "22""1152x864@75"   QSize(1152, 864)   75
 "23""1280x720@120"   QSize(1280, 720)   120
 "24""1280x720@120"   QSize(1280, 720)   119.88
 "25""1280x720@60"   QSize(1280, 720)   60
 "26""1280x720@60"   QSize(1280, 720)   60
 "27""1280x720@60"   QSize(1280, 720)   59.94
 "28""1280x720@50"   QSize(1280, 720)   50
 "29""1024x768@75"   QSize(1024, 768)   75.029
 "3""3840x2160@180"   QSize(3840, 2160)   179.999
 "30""1024x768@70"   QSize(1024, 768)   70.069
 "31""1024x768@60"   QSize(1024, 768)   60.004
 "32""800x600@75"   QSize(800, 600)   75
 "33""800x600@72"   QSize(800, 600)   72.188
 "34""800x600@60"   QSize(800, 600)   60.317
 "35""800x600@56"   QSize(800, 600)   56.25
 "36""640x480@75"   QSize(640, 480)   75
 "37""640x480@73"   QSize(640, 480)   72.809
 "38""640x480@67"   QSize(640, 480)   66.667
 "39""640x480@60"   QSize(640, 480)   60
 "4""3840x2160@120"   QSize(3840, 2160)   119.999
 "40""640x480@60"   QSize(640, 480)   59.94
 "41""640x480@60"   QSize(640, 480)   59.94
 "42""720x400@70"   QSize(720, 400)   70.082
 "43""1600x1200@60"   QSize(1600, 1200)   59.869
 "44""1280x1024@60"   QSize(1280, 1024)   59.895
 "45""1024x768@60"   QSize(1024, 768)   59.92
 "46""2560x1600@60"   QSize(2560, 1600)   59.987
 "47""1920x1200@60"   QSize(1920, 1200)   59.885
 "48""1280x800@60"   QSize(1280, 800)   59.81
 "49""3840x2160@60"   QSize(3840, 2160)   59.981
 "5""3840x2160@60"   QSize(3840, 2160)   59.94
 "50""3200x1800@60"   QSize(3200, 1800)   59.956
 "51""2880x1620@60"   QSize(2880, 1620)   59.96
 "52""2560x1440@60"   QSize(2560, 1440)   59.961
 "53""1920x1080@60"   QSize(1920, 1080)   59.963
 "54""1600x900@60"   QSize(1600, 900)   59.946
 "55""1368x768@60"   QSize(1368, 768)   59.882
 "56""1280x720@60"   QSize(1280, 720)   59.855
 "6""2560x1440@240"   QSize(2560, 1440)   239.847
 "7""2560x1440@120"   QSize(2560, 1440)   119.998
 "8""2560x1440@60"   QSize(2560, 1440)   59.951
 "9""1920x1200@60"   QSize(1920, 1200)   60
EDID Info: 
Device ID:  "xrandr-Microstep-MAG321UX OLED"
Name:  "MAG321UX OLED"
Vendor:  "Microstep"
Serial:  ""
EISA ID:  ""
Hash:  "06709fadcd3b434a9f6fc8cae331fa66"
Width:  70
Height:  40
Gamma:  2.2
Red:  QQuaternion(scalar:1, vector:(0.683594, 0.304688, 0))
Green:  QQuaternion(scalar:1, vector:(0.244141, 0.708984, 0))
Blue:  QQuaternion(scalar:1, vector:(0.143555, 0.0556641, 0))
White:  QQuaternion(scalar:1, vector:(0.313477, 0.329102, 0))

---

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-05-14 Thread Marcin Orlowski
https://bugs.kde.org/show_bug.cgi?id=502047

Marcin Orlowski  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #20 from Marcin Orlowski  ---
Come to add "me too". I have two displays side by side (display scaling 118,75%
if matters,  most likely not). When I try to take a screenshot of whole screen,
it presents me panorama of boths screens shown on main display. When I select
area on that "combined" screen and confirm, then it returns to normal display
(every screen on its own) but **then** takes the screenshot and try to crop
according to area I selected. But as it is after combined screen is gone, the
offset is wrong (I got [Laptop][Display] while "Display" is my main and is huge
resolution. So on "screnshot" "laptop" is inserted on the left side, and shifts
the "Display" screen "laptop"'s width to the right. So final crop in my case,
if target area was on "Display" is shifted by "Laptop"'s screen width.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-30 Thread flex
https://bugs.kde.org/show_bug.cgi?id=502047

flex  changed:

   What|Removed |Added

 CC||[email protected]

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-25 Thread Jonas Ryssel
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #19 from Jonas Ryssel  ---
I made a typo. The screenshot resolution was 2561x2880, not 2561x1440.

(In reply to Jonas Ryssel from comment #18)
> If I take a full screen screenshot using the "current screen" option in
> spectacle, the resolution is 2561x1440.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-25 Thread Jonas Ryssel
https://bugs.kde.org/show_bug.cgi?id=502047

Jonas Ryssel  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #18 from Jonas Ryssel  ---
Created attachment 180662
  --> https://bugs.kde.org/attachment.cgi?id=180662&action=edit
Display arrangement used to reproduce bug, with a marked section of where to
take a screenshot.

I think I have figured out the root cause... or something close to it.

 How to forcibly recreate the issue on any PC 
1. Have a setup with 2 (or more) displays.
2. In the "display configuration" settings place your displays so that they are
overlapping, and with one of them being larger than the other/sticking out to a
side. Using display scaling to make one display much larger than the other is
an easy way to make them stick out.
3. Open the rectangular region select in spectacle, and select an area which is
only shown on one display (i.e. in the part that is sticking out).

I've had success based on which part of which display is sticking out, and if I
select an area to the top/bottom/left/right of the inner display. So if it
doesn't work, swap which display is large and which is small.
(See the attached picture, if my explanation isn't clear. The red rectangle is
the area that I try to take a screenshot of.)

 Why it happens (seemingly) randomly 
I have a strong suspicion that sometimes KWin and Spectacle disagree on the
resolution of displays when using fractional scaling.
With my setup (where the bug is present) `the display is set to 2560x2880 with
150% scaling.
If I take a full screen screenshot using the "current screen" option in
spectacle, the resolution is 2561x1440.
This suggests that spectacle (or QT or something else) thinks that the display
is 1 pixel wider than what KWin thinks, and if I then place that display to the
left, the displays will overlap by 1 pixel, causing the issue.

 My (unqualified) guess on what causes the issue / what to look for in the
code 
I think there are two bugs which would fix this issue, and I don't know which
one is easier to fix (probably nr. 1).

1. There is a math issue somewhere in the code (duh!).
In my tests the issue only seems to be present when `resolution/scaling factor`
calculation results in the fractional part being above .5 (i.e. it would be
rounded up), which suggests a rounding error... I have however also found a
case where the faction is above .5 and the bug isn't present, so it is only a
hunch.
I guess this relates to how "weird" resolutions causes the issue. I have
another PC setup where I couldn't reproduce the issue, but once I switched to a
1368x768 resolution, it became much easier to reproduce it without purposefully
overlapping the displays.

2. If you have overlapping displays, Spectacle seemingly takes your mouse
offset relative to the top left corner of one display, then selects an area
with the same offset but relative to the other display's top left corner.

Sorry for rambling ;)

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-25 Thread TraceyC
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #17 from TraceyC  ---
Thanks for the screen shot of your display setup. Can you attach that directly
to the bug report? That way it won't be lost even if the link goes dead.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-24 Thread hobs
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #16 from hobs  ---
(In reply to hobs from comment #11)
> I have a similar issue since I upgraded from Fedora 41 to 42:
> https://bugs.kde.org/show_bug.cgi?id=502909
> 
> Here's my setup: https://postimg.cc/jCbSYcWs

https://postimg.cc/XrZ7CyH7

I tried it on my 2. desk. When I want to make a screenshot on the left top
screen, the screenshot is taken on the left bottom one. Screenshotting on other
screens work as expected.

Not sure how this helps, but if anyone has an idea what I can check
additionally, please let me know.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-22 Thread Ilia Kats
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #15 from Ilia Kats  ---
(In reply to Jovan Pavlovic from comment #14)
> I would be willing to try to debug this myself. 
> Could you lads give me pointers on how to attach debugger on spectacle and
> some initial function where screen selection should start?

I've already done some debugging over here:
https://bugs.kde.org/show_bug.cgi?id=501177#c8

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-22 Thread Jovan Pavlovic
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #14 from Jovan Pavlovic  ---
I would be willing to try to debug this myself. 
Could you lads give me pointers on how to attach debugger on spectacle and some
initial function where screen selection should start?

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-20 Thread Ilia Kats
https://bugs.kde.org/show_bug.cgi?id=502047

Ilia Kats  changed:

   What|Removed |Added

 CC||[email protected]

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-18 Thread TraceyC
https://bugs.kde.org/show_bug.cgi?id=502047

--- Comment #13 from TraceyC  ---
I've spent a decent amount of time this afternoon trying to reproduce this,
with no success so far
I've tried with two different laptops running git-master plasma - one has an
AMD GPU, the other an NVIDIA

I've tried variations in 
Display positions (horizontally and vertically)
2 or 3 displays
Native vs non-native resolution
Different scale factors

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-18 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=502047

Bug Janitor Service  changed:

   What|Removed |Added

   Priority|NOR |HI

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-18 Thread TraceyC
https://bugs.kde.org/show_bug.cgi?id=502047

TraceyC  changed:

   What|Removed |Added

 CC||[email protected]

-- 
You are receiving this mail because:
You are watching all bug changes.

[Spectacle] [Bug 502047] Rectangular Region selects on wrong screen with certain screen setups

2025-04-18 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=502047

Nate Graham  changed:

   What|Removed |Added

Summary|Rectangular Region selects  |Rectangular Region selects
   |on wrong screen |on wrong screen with
   ||certain screen setups

-- 
You are receiving this mail because:
You are watching all bug changes.