Bug 183742 - Enter key doesn't save the selected region and KSnapshot get stucked until you double-click it or kill it
Summary: Enter key doesn't save the selected region and KSnapshot get stucked until yo...
Status: RESOLVED FIXED
Alias: None
Product: ksnapshot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Richard Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-09 01:27 UTC by Doug Roberts
Modified: 2010-06-20 00:31 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Roberts 2009-02-09 01:27:47 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Ubuntu Packages

Ksnapshot does not recognize when "Enter" is used to select the region that has been dragged.  It gets stuck, does not select the region, and becomes nearly impossible to kill.
Comment 1 Doug Roberts 2009-02-09 01:29:09 UTC
Kubuntu 8.10, X86, upgraded to KDE 4.2.
Comment 2 Dario Andres 2009-02-10 14:30:52 UTC
Do you pressed another keys before pressing "Enter" ?
Do you have Desktop Effects enabled ?

Double clicking the region doesn't select it properly? (Exiting the "select region" mode)

Thanks
Comment 3 dch 2009-02-10 19:13:39 UTC
Frankly, I prefer the 3.5 scheme. Having to hit the enter key after selecting a region is awkward and the highlighting slows the whole thing down. In 3.5, the region was selected upon release of the mouse button which is more intuitive. 
Comment 4 Doug Roberts 2009-02-10 19:24:40 UTC
See responses below.

On Tue, Feb 10, 2009 at 6:30 AM, Darío Andrés <andresbajotierra@gmail.com> wrote:

    http://bugs.kde.org/show_bug.cgi?id=183742


    Darío Andrés andresbajotierra gmail com changed:

              What    |Removed                     |Added
    ----------------------------------------------------------------------------
                    CC|                            |andresbajotierra@gmail.com




    --- Comment #2 from Darío Andrés <andresbajotierra gmail com>  2009-02-10 14:30:52 ---
    Do you pressed another keys before pressing "Enter" ?

No.


    Do you have Desktop Effects enabled ?

No.



    Double clicking the region doesn't select it properly? (Exiting the "select
    region" mode)

Yes, double clicking does select the region, thanks.  However using "Enter" does not work, as it did with KDE 3.5.



    Thanks


Thanks,

--Doug 
Comment 5 Doug Roberts 2009-02-10 19:28:25 UTC
I don't really care which way the dragged region gets selected: mouse release, double click, or hit "Enter", just so long as what is advertised works.

It's nice to know that double clicking works, because "Enter" certainly does not, and I was having trouble killing ksnapshot while it was waiting for me to select.

--Doug
Comment 6 Panos Kavalagios 2009-02-27 10:02:43 UTC
Same problem on Fedora 10 and KDE 4.2. "Enter" key used to work fine on 4.1 for region captures. Now it just don't understand it and I had to get a virtual terminal <ctrl>-F2 and kill ksnapshot, otherwise it locks down your desktop.

I didn't know that double click has the same effect and it is a nice work around and I was finally able to capture my screenshots.
Comment 7 Ben Boeckel 2009-05-28 06:25:27 UTC
I can use enter and double click in 4.2.3 and 4.3b1, so I'd say the bug is fixed. I do remember hitting this at one point.
Comment 8 Panos Kavalagios 2009-05-28 09:41:56 UTC
Negative! The bug is still there. Enter does not work in version 4.2.3 of KDE for Fedora 10. Only double click works. At least now it does hang your DE. It just does nothing when enter key is pressed.
Comment 9 Panos Kavalagios 2009-05-28 09:43:41 UTC
Sorry for the inconvenience: I meant it does *NOT* hang your DE as it did in 4.2
Comment 10 ben chang 2009-06-17 06:44:52 UTC
With 4:4.2.2-0ubuntu2, Kubuntu 9.10: enter key works when doing a regular region select - but it does not work when doing a timed snapshot.

The behavior of the timed snapshot also seems odd - if you ask for a 3 second delay, it waits for 3 seconds, then prompts you to draw the region, capturing the contents at that point.  In older (KDE 3) versions, you draw the region first; normal desktop control returns while the delay waits, and then the snapshot is taken.  The advantage of this behavior is that you can set up a snapshot to capture an action you're going to take (for example, screengrabs while selecting items from a menu or other types of mouse interaction).  

btw, thanks for the double-clicking tip!
Comment 11 Clemens Eisserer 2009-06-22 16:24:58 UTC
Same here on 4.2.90, pressing <ENTER> doesn't work when a delay is selected but works otherwise fine.
Comment 12 Gregor Petrin 2009-06-28 15:02:57 UTC
I can reproduce this bug quite easily: by pressing alt+tab when in region selection mode. This disables the enter key but not the double-click (and double-click is NOT mentioned on the on-screen instructions). Escape doesn't work either so it is possible that the app has totally lost keyboard focus.

But just to be clear, this problem does not appear exclusively when pressing alt+tab, I sometimes get it quite randomly.

If fixing the real problem isn't that easy, at least mention double-click in the on-screen instructions, otherwise unskilled users can get pretty stuck!


Currently using KSnapshot version 0.8.1, KDE 4.2.92, OpenSUSE 11.1.
Comment 13 Panos Kavalagios 2009-06-29 10:26:18 UTC
YEP! It's definitely a focus related issue. I've changed my window behaviour policy to "Click to focus" and I can confirm the both Enter and Escape key worked fine on Fedora 11, KSnapshot 0.8.1 and KDE 4.2.4. That wasn't the case before, neither enter or escape was working with "Focus follows mouse" on the same system.

However, I toggled back to my default "Focus follows mouse" and "Auto raise" and tried to reproduce the problem to no avail. I've also rebooted my system to ensure that this bug has gone for sure. I can no longer reproduce it. Can anyone else test if this is a kind of a workaround that fixes the issue?
Comment 14 ben chang 2009-07-28 02:38:35 UTC
Confirmed (mostly) fixed, with KSnapshot 0.8.1.  Enter now works with timed snapshots, and the behavior of timed mode is improved - menus, etc. remain open for you to draw a region around them.  Nice.  

I have the same behavior as Comment #12, enter doesn't work if you use Alt-Tab during capture, but double-click still does.  I agree, it'd be nice to to change the on-screen hint to read "To take the snapshot, press the Enter key or Double Click in the region." or similar.
Comment 15 Panos Kavalagios 2009-07-28 08:03:53 UTC
I've made some more tests and I think it always works for "Click to focus". You can only reproduce it if you press the alt-tab combination for this specific window behaviour mode.

For "Focus follows mouse", "Focus under mouse" etc., it works fine if there is no other application maximised on the desktop. For capturing your desktop wallpaper both ESC and Enter works, but if there is an application open and you try to capture a region of it, only double click works. 

Ksnapshot 0.8.1 must ensure somehow that it will not lost its focus. It is highly recommended until then that double click should be mentioned on screen instructions to avoid possible usage dead ends.
Comment 16 Dario Andres 2009-08-21 20:29:48 UTC
Bug 160880 could be related to this too.
Comment 17 Richard Moore 2010-02-19 15:22:47 UTC
This should be fixed by seli's recent re-addition of the keyboard grab for this. Please reopen if it is still present in 4.4
Comment 18 d.gm 2010-05-25 08:19:00 UTC
(In reply to comment #17)
> This should be fixed by seli's recent re-addition of the keyboard grab for
> this. Please reopen if it is still present in 4.4

There is still the bug with my current KDE version that I keep up to date with mandriva :
ksnapshot -v
Qt : 4.5.3
KDE : 4.3.5 (KDE 4.3.5)
KSnapshot : 0.8.1

Reproduce the bug :
1- Set a small delay for the snapshot, start the snapshot.
2- Go into your Firefox to click on a list of value (in a form) so the values pop down and highlight one of them (this is what you want to snapshot).
3- Wait for the ksnapshot to freeze the screen.
4- Your now stucked !

Notice that the cursor style is still a hand for the list of value selection and note the crosshair. Press enter or click to make the crosshair appear. Area selection is ok but Enter or Escape do not quit the selection process. The double click workaround works if done on the selected area. Of course it is a focus issue again, but in a new way.

Please : can someone try this with KDE version 4.4 and tell if it's corrected ?
(and re-open here if not)
Comment 19 Panos Kavalagios 2010-05-25 09:01:18 UTC
I've tested your scenario with 10 seconds delay for both "full screen" and "window under cursor" capturing modes. It worked just perfect. 

My system currently is Fedora 12 with kdebase-4.4.2-1.fc12.x86_64 and qt-4.6.2-17.fc12.x86_64. Please, update to the latest releases and let your dreams come true.
Comment 20 Panos Kavalagios 2010-05-25 09:10:25 UTC
I forgot to add that I successfully captured a combo box of a form and not just a window or screen. That ensures the focus was on the browser window and not on ksnapshot itself, before the timer expired. Ksnapshot popped with the captured image when the timer went off.
Comment 21 Christhonie Geldenhuys 2010-06-20 00:29:59 UTC
I can confirm the same is also valid for Kubuntu 10.4 LTE.

Qt: 4.6.2
KDE Development Platform: 4.4.2 (KDE 4.4.2)
KSnapshot: 0.8.1

To Reproduce:
Set ksnapshot to Region.  Set an appropriate delay time.  Start capture.  Select a drop-down, like Firefox search provider drop-down, and leave it in the dropped-down state.  Once the delay expires try and select a region.

On the very first mouse-down and -drag nothing happens.  The event handler did not yet fire.  Releasing the mouse and trying again will result in the desired selection behavior.  But once enter is selected nothing happens.  And if you do not know about double-clicking, then you need to go to TTY1 and kill ksnapshot.

Hope this leads someone to a fix.  Thanks for your efforts in maintaining this very handy tool!
Comment 22 Clemens Eisserer 2010-06-20 00:31:38 UTC
Please re-open.
I've just experienced this with 4.4.85 + Qt-4.7beta.