summaryrefslogtreecommitdiffstats
path: root/mandriva/2010.2/kdebase/kdebase-3.5.10-fix-vibrate-dialog.patch
blob: a9b3a4fc51b03f95bf506058acec97e764d19923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
--- kdesktop/lock/lockdlg.cc.fix_vibrate_dialog	2007-05-14 09:55:44.000000000 +0200
+++ kdesktop/lock/lockdlg.cc	2009-01-04 06:20:33.000000000 +0100
@@ -53,6 +53,7 @@
 #include <X11/Xutil.h>
 #include <X11/keysym.h>
 #include <fixx11h.h>
+#include <kapplication.h>
 
 #ifndef AF_LOCAL
 # define AF_LOCAL	AF_UNIX
@@ -202,6 +203,38 @@
     }
 }
 
+void PasswordDlg::movedialog( int _move )
+{
+     waitMoveDialog = true;
+     this->move(pos().x()+_move, pos().y());
+     TQTimer::singleShot( 50, this, SLOT(moveTimerDone()) );
+     while (waitMoveDialog)
+          kapp->processEvents();
+}
+
+void PasswordDlg::moveTimerDone()
+{
+     waitMoveDialog = false;
+}
+
+void PasswordDlg::badPasswordLogin()
+{
+     if ( mUnlockingFailed )
+     {
+          for ( int i = 0 ; i<2 ; i++)
+          {
+               movedialog( 10 );
+               movedialog( -20 );
+               movedialog( 20 );
+               movedialog( -20 );
+               movedialog( 20 );
+               movedialog( -10 );
+          }
+     }
+}
+
+
+
 //---------------------------------------------------------------------------
 //
 // Handle timer events.
@@ -332,6 +365,7 @@
             ok->setEnabled(false);
             cancel->setEnabled(false);
             mNewSessButton->setEnabled( false );
+			badPasswordLogin();
             return;
         case AuthAbort:
             return;
--- kdesktop/lock/lockdlg.h.fix_vibrate_dialog	2005-09-10 10:25:41.000000000 +0200
+++ kdesktop/lock/lockdlg.h	2009-01-04 06:20:33.000000000 +0100
@@ -55,7 +55,7 @@
     void slotOK();
     void layoutClicked();
     void slotActivity();
-
+	void moveTimerDone();
 private:
     void setLayoutText( const TQString &txt );
     void capsLocked();
@@ -71,6 +71,9 @@
     void handleVerify();
     void reapVerify();
     void cantCheck();
+   void movedialog( int _move );
+   void badPasswordLogin();
+
     GreeterPluginHandle *mPlugin;
     KGreeterPlugin *greet;
     TQFrame      *frame;
@@ -86,6 +89,7 @@
     TQStringList::iterator currLayout;
     int         sPid, sFd;
     TQListView   *lv;
+	bool        waitMoveDialog;
 };
 
 #endif