Bug 13360 - Lock screen when mouse is in a corner (like KDE 1.x)
Summary: Lock screen when mouse is in a corner (like KDE 1.x)
Status: RESOLVED FIXED
Alias: None
Product: kscreensaver
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Other
: NOR normal
Target Milestone: ---
Assignee: kscreensaver bugs tracking
URL:
Keywords:
: 27145 53391 67509 76602 84093 (view as bug list)
Depends on:
Blocks:
 
Reported: 2000-10-23 08:18 UTC by is04072
Modified: 2008-05-19 17:59 UTC (History)
7 users (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 is04072 2000-10-23 08:05:46 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: unknown
Version: KDE2RC2
Severity: wishlist

Kde v1.x could lock the screen when mouse
was near the screen corner for five seconds.

That was a nice feature I miss in the new version of kde (at least I haven\'t found how to activate it)

Thanks.

(submitted via bugs.kde.org)
Comment 1 Chris Howells 2003-04-17 03:28:07 UTC
*** Bug 53391 has been marked as a duplicate of this bug. ***
Comment 2 Chris Howells 2003-04-20 13:02:34 UTC
*** Bug 27145 has been marked as a duplicate of this bug. ***
Comment 3 Mathias Homann 2003-04-23 22:22:37 UTC
it should also disable the screensaver by placing the mouse in another corner... 
Comment 4 Lubos Lunak 2003-04-24 19:02:54 UTC
The xautolock code is in. See kdebase/kdesktop/xautolock.cc for details, search for '#13360'. 
 
Comment 5 Sean E. Russell 2003-06-04 17:26:18 UTC
So... does this mean that this feature will be available in future KDE releases (enabled, 
I'd guess, from the configuration panel), or does this issue still need votes? 
Comment 6 Chris Howells 2003-07-29 23:47:45 UTC
> does this mean that this feature will be available in future KDE releases 
 
Yes, this should be in KDE 3.2. 
 
> or does this issue still need votes? 
 
No, that will make absolutely no difference to when I implement it :) 
Comment 7 Laurent Montel 2003-10-10 14:14:51 UTC
Subject: Re:

Thank you for your bug report.
The feature that you requested has been implemented in the latest
development (CVS) version of KDE. The feature request will be closed.

Comment 8 Lubos Lunak 2003-10-10 15:18:04 UTC
How about actually closing it then :) ? 
 
Comment 9 Mathias Homann 2004-02-04 01:23:49 UTC
Where should the GUI to configure it be found? With 3.2 final, i cant find it. shouldnt it be somewhere in the screensaver config dialogue?

Comment 10 Chris Howells 2004-02-04 01:33:38 UTC
Sadly this feature didn't make it into KDE 3.2.
Comment 11 Chris Howells 2004-03-03 11:54:02 UTC
*** Bug 76602 has been marked as a duplicate of this bug. ***
Comment 12 cerebro84 2004-05-01 15:19:39 UTC
I've got kde from cvs, and the auto-lock feature works fine. But what about auto-avoid-lock feature?
Comment 13 Chris Howells 2004-05-21 16:54:10 UTC
*** Bug 67509 has been marked as a duplicate of this bug. ***
Comment 14 Mathias Homann 2004-05-21 18:30:00 UTC
why is it in CVS, but not in kde 3.2.2?
Comment 15 Lubos Lunak 2004-06-28 14:32:13 UTC
*** Bug 84093 has been marked as a duplicate of this bug. ***
Comment 16 Mathias Homann 2004-06-28 14:58:11 UTC
its also not in 3.2.3, but still in cvs? will it be in 3.3?
Comment 17 Chris Howells 2004-08-27 11:42:55 UTC
CVS commit by howells: 

OK. The KCM is finished for bug 13360. Now I just need to hack kdesktop to understand the new settings.

Unfortunately valgrind was not much help either but I owe almer a beer or two :)

CCMAIL: 13360@bugs.kde.org


  M +38 -85    advanceddialog.cpp   1.3
  M +2 -10     advanceddialog.h   1.3



Comment 18 Chris Howells 2004-08-27 13:01:51 UTC
CVS commit by howells: 

*FANFARE* Bug 13360 is finally implemented and bug free. I hope.

Still to do: maybe write a kconf_update script to migrate settings.

CCMAIL: 13360-done@bugs.kde.org


  M +38 -4     lockeng.cc   1.66
  M +2 -1      lockeng.h   1.26
  M +0 -12     xautolock.cc   1.22


--- kdebase/kdesktop/lockeng.cc  #1.65:1.66
@@ -185,8 +185,16 @@ void SaverEngine::configure()
     mDPMS = config->readBoolEntry("DPMS-dependent", false);
 #endif
-    xautolock_corners[ 0 ] = config->readBoolEntry("LockCornerTopLeft", false) ? ca_forceLock :ca_nothing;
-    xautolock_corners[ 1 ] = config->readBoolEntry("LockCornerTopRight", false) ? ca_forceLock :ca_nothing;
-    xautolock_corners[ 2 ] = config->readBoolEntry("LockCornerBottomLeft", false) ? ca_forceLock :ca_nothing;
-    xautolock_corners[ 3 ] = config->readBoolEntry("LockCornerBottomRight", false) ? ca_forceLock :ca_nothing;
+
+
+
+    int action;
+    action = config->readBoolEntry("ActionTopLeft", 0);
+    xautolock_corners[0] = applyManualSettings(action);
+    action = config->readBoolEntry("ActionTopRight", 0);
+    xautolock_corners[1] = applyManualSettings(action);
+    action = config->readBoolEntry("ActionBottomLeft", 0);
+    xautolock_corners[2] = applyManualSettings(action);
+    action = config->readBoolEntry("ActionBottomRight", 0);
+    xautolock_corners[3] = applyManualSettings(action);
 
     enable( e );
@@ -317,2 +325,28 @@ void SaverEngine::idleTimeout()
     startLockProcess( DefaultLock );
 }
+
+xautolock_corner_t SaverEngine::applyManualSettings(int action)
+{
+        if (action == 0)
+        {
+                return ca_nothing;
+                kdDebug() << "no lock" << endl;
+        }
+        else
+        if (action == 1)
+        {
+                return ca_forceLock;
+                kdDebug() << "lock screen" << endl;
+        }
+        else
+        if (action == 2)
+        {
+                return ca_dontLock;
+                kdDebug() << "prevent lock" << endl;
+        }
+        else
+        {
+                return ca_nothing;
+                kdDebug() << "no lock nothing" << endl;
+        }
+}

--- kdebase/kdesktop/lockeng.h  #1.25:1.26
@@ -13,4 +13,5 @@
 #include "KScreensaverIface.h"
 #include "xautolock.h"
+#include "xautolock_c.h"
 
 //===========================================================================
@@ -80,4 +80,5 @@ protected:
     void stopLockProcess();
     bool handleKeyPress(XKeyEvent *xke);
+    xautolock_corner_t applyManualSettings(int);
 
 protected:

--- kdebase/kdesktop/xautolock.cc  #1.21:1.22
@@ -48,16 +48,4 @@ XAutoLock::XAutoLock()
     xautolock_useXidle = 0;
     xautolock_useMit = 0;
-    // code for corners (see #13360)
-    // setting a corner to ca_forceLock or ca_dontLock
-    // makes that corner start screensaver or prevent
-    // screensaver start
-    // the order is topleft, topright, bottomleft, bottomright
-    // So when you add GUI for this, add a method changing these values.
-#if 0 //now we have a GUI to configure it. => use value load to kconfig and not re-initialise value
-    xautolock_corners[ 0 ] = ca_nothing;
-    xautolock_corners[ 1 ] = ca_nothing;
-    xautolock_corners[ 2 ] = ca_nothing;
-    xautolock_corners[ 3 ] = ca_nothing;
-#endif
 #ifdef HAVE_XIDLE
     useXidle = XidleQueryExtension( qt_xdisplay(), &dummy, &dummy );


Comment 19 David Spicer 2004-10-28 13:35:41 UTC
If this is the correct place to add a comment: Desktop corner screensaver autolock hasn't worked for me in either KDE 3.3 or, presently, in KDE 3.3.1 (compiled from source, gcc 3.3.4 / Slackware 10).  I can keep the mouse pointer still in the designated activiation corner for as long as I like but nothing happens.
Comment 20 Mathias Homann 2004-11-06 22:44:15 UTC
and when will the aforementioned change actually appear in a released version?
in 3.3.1, all i can do is set any corner of the desktop to "lock now".
Comment 21 Chris Howells 2004-11-06 23:06:20 UTC
The feature will be in  KDE 3.4. It is unlikely to be backported to the 3.3 series.
Comment 22 Łukasz Derkacz 2005-05-04 07:01:06 UTC
I really don't know what's going on now. In KDE 3.4 one have only options for corners: Lock, and block lock. But it seems that locking is not working. But that doesn't matter. I though that this wishlist was about turning on screensaver at once but moving cursor in one of the edges. Without blocking screen.