Bug 36577 - pressing enter when the the backdrop has focus
Summary: pressing enter when the the backdrop has focus
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-28 20:03 UTC by Bryce Nesbitt
Modified: 2009-01-02 20:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryce Nesbitt 2001-12-28 19:58:21 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kdesktop
Version:           KDE 2.9.1 CVS/CVSup/Snapshot
Severity:          normal
Installed from:    Compiled sources
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) 
OS:                Linux
OS/Compiler notes: Not Specified

Sometimes while using KDE a window will mysteriously
pop onto the screen.  It's a window I've never brought up deliberately.  It's disturbing and confusing.

I've brought up the control panel by accidentally pressing ENTER in the KDE desktop far far more times than I've done it deliberately.  Usually it comes up after pressing [OK] a dozen times to clear some sort of error.

Pressing ENTER in the desktop should be IGNORED by KDE.  The control panel is not that important to bring up with a shortcut that's easily hit by accident.

(Submitted via bugs.kde.org)
Comment 1 David Faure 2002-01-13 21:15:11 UTC
On Friday 28 December 2001 20:58 you wrote:
> Package: kdesktop
> Version: KDE 2.9.1 CVS/CVSup/Snapshot
> Severity: normal
> Installed from:    Compiled sources
> Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) 
> OS:                Linux
> OS/Compiler notes: Not Specified
> 
> Sometimes while using KDE a window will mysteriously
> pop onto the screen.  It's a window I've never brought up deliberately.  
It's disturbing and confusing.
> 
> I've brought up the control panel by accidentally pressing ENTER in the KDE 
desktop far far more times than I've done it deliberately.  Usually it comes 
up after pressing [OK] a dozen times to clear some sort of error.
> 
> Pressing ENTER in the desktop should be IGNORED by KDE.  The control panel 
is not that important to bring up with a shortcut that's easily hit by 
accident.

Tricky problem - this is about the handling of the desktop icons which is 
consistent with Konqueror's icons: you can navigate though them with keys 
and you can press Enter to execute one.
You activated the control center probably because you have a link to it on 
your desktop but it could be about anything else.
I've been hit by this problem a few times too (though not anymore recently) 
but I don't see an easy fix for it (apart from "yet another configuration 
option"). Consistency calls for leaving "Return = execute" on the desktop...
Any ideas ?

-- 
David FAURE david@mandrakesoft.com faure@kde.org
http://people.mandrakesoft.com/~david http://www.konqueror.org
KDE 3.0: Konquering the Desktops
Comment 2 Stephan Kulow 2002-03-13 15:38:06 UTC
I guess the desktop shouldn't take that easy focus. I didn't have
that problem so far but maybe I work differently. Maybe focus
follows mouse makes it a bit easier?
Comment 3 Waldo Bastian 2003-04-23 17:40:30 UTC
The focus indication is a bit weird as well: 
I can highlight icons with the up/down arrows. When I give focus to another window 
the icon remains highlighted but when I click on the desktop again the highlighting 
disappears. However, if I now press return it still activates the item that was last 
highlighted. 
 
It seems more natural to me if: 
1) Highlighting of the icon would disappear on focus-out, instead of focus-in 
2) <Enter> would only do something if the icon was actually highlighted. 
Comment 4 Waldo Bastian 2003-05-06 13:57:34 UTC
Subject: kdebase/kdesktop

CVS commit by waba: 

CCMAIL: 36577-done@bugs.kde.org
1) Unselects all icons when kdesktop looses focus
2) <Enter> only does something if the icon is actually highlighted (t.i.
selected)
(BR36577)


  M +11 -0     desktop.cc   1.271
  M +2 -1      desktop.h   1.121
  M +1 -1      kdiconview.cc   1.74


--- kdebase/kdesktop/desktop.cc  #1.270:1.271
@@ -32,4 +32,5 @@
 
 #include <qdir.h>
+#include <qevent.h>
 
 #include <netwm.h>
@@ -757,4 +758,14 @@ void KDesktop::desktopResized()
 {
     resize( kapp->desktop()->size());
+}
+
+bool KDesktop::event(QEvent * e)
+{
+    if ( e->type() == QEvent::WindowDeactivate)
+    {
+        if (m_pIconView)
+            m_pIconView->clearSelection();
+    }
+    return QWidget::event(e);
 }
 

--- kdebase/kdesktop/desktop.h  #1.120:1.121
@@ -140,4 +140,5 @@ protected:
   virtual bool isIconsEnabled() { return m_bDesktopEnabled; }
   virtual void setIconsEnabled( bool enable );
+  virtual bool event ( QEvent * e );
 
 private slots:

--- kdebase/kdesktop/kdiconview.cc  #1.73:1.74
@@ -470,5 +470,5 @@ void KDIconView::slotReturnPressed( QIco
     kapp->propagateSessionManager();
     m_lastDeletedIconPos = QPoint(); // user action -> not renaming an icon
-    if (item) {
+    if (item && item->isSelected()) {
         visualActivate(item);
         ((KFileIVI*)item)->returnPressed();


Comment 5 FiNeX 2009-01-02 20:18:39 UTC
Bug closed. Kdesktop is no more mantained.