Bug 487870 - With certain multiscreen setups, rectangular region toolbar can appear partially or entirely out of the screen with the rectangle on it
Summary: With certain multiscreen setups, rectangular region toolbar can appear partia...
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 24.05.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: multiscreen
: 491063 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-01 08:00 UTC by FishBoneEK
Modified: 2025-06-20 09:52 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen setup ASCII (8.72 KB, image/png)
2024-06-01 08:04 UTC, FishBoneEK
Details
Photo of screen (1.96 MB, image/jpeg)
2024-07-01 15:47 UTC, FishBoneEK
Details
As per comment showing the markup bar in an invisible zone. (3.34 MB, image/png)
2024-07-15 02:44 UTC, Damo
Details
Floating menu not repositioning properly, some buttons obstructed (149.13 KB, image/jpeg)
2024-08-24 08:38 UTC, neonder
Details
Screens not aligned horizontally, part of the floating menu hidden (152.30 KB, image/jpeg)
2024-08-24 08:39 UTC, neonder
Details
Screens not aligned horizontally, part of the floating menu hidden (2) (152.73 KB, image/jpeg)
2024-08-24 08:42 UTC, neonder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FishBoneEK 2024-06-01 08:00:43 UTC
SUMMARY
When I use spectacle to drag an area to select a rectangle from the screenshot (`spectacle -rb`), the menu that has "Save", "Save As", "Copy"... buttons will flow outside the window. 

I suspect it's related to my screen setup. I have 2 screens, here's the output from xrandr:
```
LVDS-0 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
VGA-0 connected 2560x1600+1366+0 (normal left inverted right x axis y axis) 0mm x 0mm
```
Lemme draw an ASCII figure:
```
+--------------+------------------------+
|   LVDS-0     |        VGA-0           |
|   1366x768   |      2560x1600         |
|              |                        |
+--------------+                        |
:  Menu flows  |                        |
:   to here    |                        |
*..............+------------------------+
```
So, if I drag intentionally to let the menu moves near the area marked as "Menu flows to here", the menu will move outside my screen (LVDS or VGA). But if I let the menu move near the left or up side of LVDS, up, right or down side of VGA, it will try its best to avoid moving outside. 
I guess the menu should be smarter?

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.0.5
KDE Plasma Version: 
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
The VGA-0 is a virtually connected with NVIDIA's TwinView feature, so I can utilize VNC to use my pad as 2nd display.
Comment 1 FishBoneEK 2024-06-01 08:04:27 UTC
Created attachment 170038 [details]
Screen setup ASCII

So sad KDE Bug Tracker doesn't seem to support markdown
Comment 2 Nate Graham 2024-06-30 14:55:08 UTC
So VGA-0 is a virtual display, not connected physically, and some NVIDIA software is being used to make it visible to the system?

Does it appear in System Settings > Display & Monitor?
Comment 3 FishBoneEK 2024-06-30 14:57:31 UTC
Yes it does, as if it's connected to a physical display.
Comment 4 Nate Graham 2024-06-30 15:04:14 UTC
I'm not seeing why this is a problem, exactly. What if you want to capture a rectangular area on both LVDS-0 and VGA-0 in such a manner that the bottom-left corner of the rectangle goes into the "Menu flows to here" area? I don't see any way for it to not go into that area, in this case.
Comment 5 FishBoneEK 2024-06-30 15:08:54 UTC
Well....What I mean is that the menu flows into that area, which is not visible, since it's outside of the 2 monitors. I know you can try to capture an area which overlaps with 2 monitors, but menu shouldn't move into that invisible area, the "Menu flows to here" area that is, otherwise how am I suppose to click its buttons?
Comment 6 Nate Graham 2024-07-01 13:21:58 UTC
Can we clarify what you mean by the word "menu"? Are you talking about the rectangular region box itself? Or the toolbar that appears below it?

A phone photo of the screens while the bug is visible would be helpful.
Comment 7 FishBoneEK 2024-07-01 15:47:44 UTC
Created attachment 171242 [details]
Photo of screen

Photo attached. Sorry for the confuse, by menu I meant the...one with buttons, not the rectangle selector.
Comment 8 FishBoneEK 2024-07-01 15:48:45 UTC
The toolbar below the rectangle region box.
Comment 9 Damo 2024-07-15 02:40:56 UTC
I get the same I was trying KWIN window rules see if I could constrain spectacle to a single screen. I don't ever record the other screen anyhow.... 

I'll upload a photo also might help explain. "Bean-Spectacle.png"

Red highlights the screen config
Green is ideally where the toolbar would land if the selection is close to the bottom edge bounds but not traversing screens. I know it bahaves like this if I drag the screen to the left for example.
Comment 10 Damo 2024-07-15 02:44:18 UTC
Created attachment 171665 [details]
As per comment showing the markup bar in an invisible zone.
Comment 11 Nate Graham 2024-07-22 21:56:33 UTC
Got it, I see now. Can confirm. Thanks for your patience here.
Comment 12 Nate Graham 2024-07-31 18:50:20 UTC
*** Bug 491063 has been marked as a duplicate of this bug. ***
Comment 13 neonder 2024-08-24 08:38:22 UTC
Created attachment 172901 [details]
Floating menu not repositioning properly, some buttons obstructed
Comment 14 neonder 2024-08-24 08:39:24 UTC
Created attachment 172902 [details]
Screens not aligned horizontally, part of the floating menu hidden
Comment 15 neonder 2024-08-24 08:42:51 UTC
Created attachment 172903 [details]
Screens not aligned horizontally, part of the floating menu hidden (2)

It seems to take only that screen in which it is not touching the boundaries and calculating towards that, aka why it doesn't reposition the floating menu, since it repositions only up/down it does nothing in this case.

From what I gather the calculation is done by believing all screens are going to be horizontally aligned.