-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windowed capture mode #1565
Windowed capture mode #1565
Conversation
I'm open to adding this because I honestly don't have a good line of sight to fixing mixed DPI any other way. I am having issues using this on a tiling window manager though. I think you did a good job of capturing "missing items" that would need to be added before merging. Thanks! |
Found a little bit more time to work on this. Wanted to write down some of the current design choices. One more reminder that as indicated by draft state, this is still work in progress and a lot of stuff is in broken state, possibly more than what's listed in the initial PR description. Coordinate systems:
Tools and UI structure
Things like tool settings button and panel are added directly to CaptureWidget so that they are positioned relative to window and don't move when scrolling. Selection widget and tool buttons are placed inside the scrollview so that they stick to the image. |
Awesome work and good progress! You might want to make sure you are based on the master branch because it might have moved a bunch since this started. |
There are few things remaining to fix, but afterwards comes the annoying part of testing in all the configs. Test matrix: Platform and mode
Screen configs (starting with most important ones)
|
So I've been waiting patiently for Flameshot to implement this feature, and when I came across this pull request, I was excited! I went ahead and cloned the flameshot repo, built it, and tested my build to ensure it worked properly. Then I fetched your branch @karliss and rebased against origin/master to pull in the latest updates and created a fresh build. Running on Linux Mint 20.1 with a single monitor, when I attempt to get a new screenshot, the initial display is a blank grey screen. I can use the Flameshot tools here and eventually create a screenshot (that is not obvious to me because of the lack of display). See below: This is the terminal output that is displayed:
Please let me know what other info you need from me to help you work through this issue. Thanks for your initial work to attempt to implement this much needed feature! |
@bbbco The PR is still work in progress, please be patient. I had seen the the gray screen problem before on Windows and resolving it was one of the next things on my list, but it's interesting to see that it also happens on Linux. I have an approximate idea what should be changed. |
Good to know!
Let me know if I can help in any way with the testing.
@bbbco
On July 24, 2021, Pedro Alonso ***@***.***> wrote:
@bbbco <https://github.com/bbbco> The PR is still work in progress,
please be patient. I had seen the the gray screen problem before on
Windows and resolving it was one of the next things on my list, but
it's interesting to see that it also happens on Linux. I have an
approximate idea what should be changed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1565 (comment)-
886158628>, or unsubscribe
<https://github.com/notifications/unsubscribe-
auth/AAAHPWC5AAKGRGWJ7KCZQH3TZO2WLANCNFSM43ECS3PQ>.
|
Repeated the gray screen problem on Linux by forcing specific theme engine with |
Is this planned to be finished or should I close the PR? |
I haven't given up on this. Will try to finish soon. |
7b9f951
to
3a156dd
Compare
* Use correct position * Deal with capture widget being closed while color grab is active * Better handling of area near edges
Ok, I have done most of the the remaining things and caught up with changes in master. Time to try doing the all config testing again. |
Last release column is for comparing against last release and ensure that this PR doesn't introduce any regressions. 2560x1440 X1 means 2560x1440 resolution with scaling factor set to 1. 4K X2 means 4K resolution with scaling factor 2, not two 4K displays.
|
I have a few suggestions. Disclaimer: I'm just a contributor so don't take these on any kind of authority. And they should be discussed first (maybe open a discussion?) Config optionI don't see that you have added an option to change the default window size. How about renaming the
Whichever option name we choose, the MaximizeWindow does not maximize the windowInstead the window is regular size. Maybe has something to do with the fact that I'm using a tiling WM (i3wm).
|
Thanks for the feedback. The value handler system is one of the things I wanted to clarify. Will try to implement it in the cleanup phase. After doing the testing and resolving major bugs.
Sounds like things are functioning as intended. Isn't that the point of tiling WM that they override most window resizing functionality except maybe for fixed size windows. I would prefer keeping the window mode resizable instead of forcing non resizable window. Maybe it should be renamed to just "windowed mode".
Thanks for catching this, will fix together with other things I noticed while testing non maximized window.
Which fullscreen mode, Fullscreen all screens or fullscreen current screen? With what screen sizes and layout did you test? I didn't notice in the tests I did so far, but maybe in those cases and my monitor layout it happened to be in somewhat reasonable position.
I would suggest leaving addition of extra modes to follow up PRs. Rebasing this PR is already painful enough. Also what's the usecase for opening window with specific size? |
One more thing I would like clarifying with regular devs is the debug mode. For now I added it as additional mode. That was done before introduction of build system flag. Any thoughts on how it should work? |
My bad. I should have been more clear. I meant for The flameshot window in my tiling WM appears in float mode (not restricted to the tiling layout). In this mode the window has free size. And float mode makes more sense since flameshot is not a program you would usually want to stay around for long. But the default size of the window is too small for me, so I'd like to be able to change it. Maybe the best course would be to have In a regular DE, does
FullScreenAll. I have two monitors: left one is 1680x1050, right one is 1920x1080. They are placed right beside each other, with no gap. The message appears in the center of where both screens meet. Instead I believe it should appear in the center of the primary screen. In window mode, the message should appear in the center of the window.
I agree that we can leave this for a future PR.
I think the build system flag will become obsolete after this PR, if we add a |
Yes, at least on Gnome it takes up whole screen except the taskbar area whichis what I expect it to do. The code is calling |
I was going to suggest as one more thing for follow up issue to add a commandline flag for running a capture in specific window mode as that would be useful not only for testing but also integration into desktop. But I just noticed that there are flags with similar intent
so maybe it should be done within this PR unless they where already broken before my changes. |
* Better position the color grabber popup * Increase the probability of opening all screen fullscreen window in correct size
* fix single screen capture coordinate calculations * all screen fullscreen window size and placement
@karliss Hey, you've done amazing work! This PR opens up some exciting new horizons (e.g. look at the issues I've mentioned this PR from). I'm sorry I haven't been actively monitoring this PR, I have been busy with other stuff. Because I've been actively involved in managing the And also: let's not do anything with |
@veracioux that plan sounds good to me. |
@veracioux Are you still planning to do this merge? |
Properly handling multiple screens with varying scaling factors is challenging. I saw few attempts fixing it, but I am not sure if a sufficiently robust solution which works in all configurations on all the desktop operating systems will be reached anytime soon. That doesn't mean people shouldn't try.
I am suggesting an alternative simpler approach which could be user selected to make flameshot somewhat somewhat usable in setups where it couldn't be used otherwise. Instead of trying to show captured image on all the screens in fullscreen mode display it in a window with ability to move around and maybe zoom.
Having this mode might even help resolving some of the issues related to mixed display setups incrementally without solving all of them at the same time.
The code itself isn't ready yet, I wanted to discuss the approach first before spending more work on the code.
What's currently there:
What's missing, needs to be done, known issues:
Some other problems to consider related to multiple screens and their scaling, possibly for separate PRs:
Single screen fullscreen mode Similar to "all screen fullscreen" and "windowed" modes have third mode which captures image from single screen and displays it fullscreen on the same window. It preserves the inplace screen annotation functionality while avoiding challenging cases. From what I understand something similar Is already done for macOS. Having it as separate mode which can be selected on tested on any OS instead macOS specific fullscreen handling, would help some of Linux users. I assume that in many cases when you are selecting part of single screen anyway so doesn't need to be across mutliple screens.
Scaling factor of resulting image. It seems that currently flameshot currently creates single image consisting of all the screens scaled so that there is no information loss for highest DPI screen. This is fine when you are creating screenshot across multple screens, but if the selected rectangle is inside lower DPI screen it makes it unnecessarily upscaled. That could be handled by advanced user option choosing betweeen following modes or choosing automatically based on selection rectangle.