[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] kpassdlg
From: Oswald Buddenhagen <ob6 () inf ! tu-dresden ! de>
Date: 2001-06-29 15:27:39
[Download RAW message or body]
hi,
this patch makes alt-ctrl-del work in the kdm greeter even when the
password input has focus. it should also prevent some other unexpected
key "hijacks".
----------
RCS file: /home/kde/kdelibs/kdeui/kpassdlg.cpp,v
retrieving revision 1.8
diff -u -r1.8 kpassdlg.cpp
--- kpassdlg.cpp 2001/04/25 07:27:09 1.8
+++ kpassdlg.cpp 2001/06/29 15:21:59
@@ -102,20 +102,23 @@
case Key_Backspace:
case Key_Delete:
case 0x7f: // Delete
- if (m_Length) {
+ if (e->state() & (ControlButton | AltButton))
+ e->ignore();
+ else if (m_Length) {
m_Password[--m_Length] = '\000';
showPass();
}
break;
default:
- if (m_Length < (PassLen - 1)) {
- char ke = e->text().local8Bit()[0];
- if (ke >= 32) {
+ char ke = e->text().local8Bit()[0];
+ if (ke >= 32) {
+ if (m_Length < (PassLen - 1)) {
m_Password[m_Length] = ke;
m_Password[++m_Length] = '\000';
showPass();
}
- }
+ } else
+ e->ignore();
break;
}
}
----------
should i apply?
greetigns
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Nothing is fool-proof to a sufficiently talented fool.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic