-
-
Notifications
You must be signed in to change notification settings - Fork 198
Mouse cursor not captured when triggered via global shortcut #737
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
Comments
Thanks for reporting. |
Can you check if this is fixed in the latest continuous build? |
How do you mean? Doesn't sound right though. |
By default the "use tray icon" option is set. If the Print key is configured just to start ksnip (what is was on my installation by default) no screenshot is taken if ksnip was running before and is now in the task bar, even if the option "Take screenshot on start" is set. IMHO this is a bad user experience. |
Can you write the steps to reproduce that? I'm not sure that I understand how "use tray icon" is related to this scenario and how you got print key to just start ksnip without taking screenshots. |
To my surprise, the screenshot today was captured correct with mouse pointer when using the global shortcut :-) I also found the file
The reason why it did not work in the first try is, the content of this file is only read during login. And after installing the test version 1.10 this file was obviously not reread and thus executed without the -c flag. The downside of this solution to put the -c flag in this file is, that if you switch the flag in the settings dialog to not capture the mouse cursor, it will not behave like you expect (tried it). And since this file is only read during login, its not an option to dynamically update it according to settings. |
It depends on what you expect, the desktop file uses the command line flags to trigger a screenshot so you either set it or not, it's detached from the GUI.
I think it's problematic from a expectation point of view because you would selectively pick some config from the GUI (capture cursor, delay maybe) and some from CLI (what type of screenshot you want). It doesn't feel right to be honest. Using ksnip's global hotkeys would work as you expect, why don't use them? Also, I was thinking about making triggering the actions from CLI possible, then you could configure action like you need them and call them by their name from the CLI. But that would not be part of the desktop file though. However, you can modify your desktop file locally as you prefer. |
I just wanted do give a hint so other users would find this nice tool helpful and not go into the same trap than I did when using it in KDE whit the shortcurs set in KDE settings. When using it with KDE it is configured via the KDE settings. If you change settings in the GUI like want to capture the Mouse pointer for whatever you do, people would go into the same trap than I did. The GUI setting does not do (in there point of view) what they expect. So I suggested to make a new flag that can be used in the desktop file and takes the GUI settings into account. I see nothing problematic there, its just user friendly.
The program is driven by CLI, so what can't be none else? I only mean an CLI flag that is used in the desktop file.
Of cause, I could edit the files on my side, but thats not my intension, thats not why I wrote this report here. I would think, the average KDE user will use it by the Print shortcut defined via the settings dialog and not via the global hotkey defined in the ksnip settings. |
Well that's the thing, there is no "desktop file only" command, if you add it, it's available everywhere. What we could do is add two new command line options, one for delay and one for cursor, when set will take the setting from config for cursor and/or delay, respectively and ignore the one passed (or not passed via command line). Or, we could change the desktop file to use the dbus interface when we implement dbus support for ksnip, that's also how Spectacle is called through the desktop file. For this one we would need to implement the dbus support first but that shouldn't be so complex I think. Anyways, both would not come with the next path, this one is just for bug fixes, I would have to ask you to log a new feature request for the first one or add a comment to the dbus feature request with your expectation #323. |
That would be great, exactly what I thought. Please do it like this (if you don't want to go with the dbus).
I also considered this but did not suggest because of the effort it makes.
|
Let's go with the DBus for now, it's easier for me and capacity wise I'm totally behind the feature requests that keep pilling up. For now the cursor is captured so I'll be closing this issue as I'm releasing 1.9.2 soon. |
The mouse cursor is not captured triggered via the Print hotkey defined in KDE settings.
The option to capture the mouse cursor is set.
Steps to reproduce the behavior:
The mouse cursor is captured if ksnip is started from console.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: