Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 281028
Collapse All | Expand All

(-)yapet-0.7.orig/yapet/mainwindow.h (-1 / +5 lines)
Lines 71-76 Link Here
71
71
72
        bool usefsecurity;
72
        bool usefsecurity;
73
73
74
	//! Used to indicate handle_signal() that the user wishes to quit from
75
	//! the lock screen
76
	volatile bool do_quit;
77
74
        inline MainWindow (const MainWindow&) {}
78
        inline MainWindow (const MainWindow&) {}
75
        inline const MainWindow& operator= (const MainWindow&) {
79
        inline const MainWindow& operator= (const MainWindow&) {
76
            return *this;
80
            return *this;
Lines 99-105 Link Here
99
        void searchTerm();
103
        void searchTerm();
100
        void searchNext();
104
        void searchNext();
101
        bool quit();
105
        bool quit();
102
        void lockScreen() const throw (YAPET::UI::UIException);
106
        void lockScreen() throw (YAPET::UI::UIException);
103
        void changePassword() throw (YAPET::UI::UIException);
107
        void changePassword() throw (YAPET::UI::UIException);
104
    public:
108
    public:
105
        MainWindow (unsigned int timeout, bool fsecurity) throw (YAPET::UI::UIException);
109
        MainWindow (unsigned int timeout, bool fsecurity) throw (YAPET::UI::UIException);
(-)yapet-0.7.orig/yapet/mainwindow.cc (-5 / +9 lines)
Lines 886-892 Link Here
886
}
886
}
887
887
888
void
888
void
889
MainWindow::lockScreen() const throw (YAPET::UI::UIException) {
889
MainWindow::lockScreen() throw (YAPET::UI::UIException) {
890
    if (key == NULL) return;
890
    if (key == NULL) return;
891
891
892
    int ch;
892
    int ch;
Lines 925-931 Link Here
925
#endif
925
#endif
926
        PasswordDialog* pwdia = NULL;
926
        PasswordDialog* pwdia = NULL;
927
        YAPET::Key* testkey = NULL;
927
        YAPET::Key* testkey = NULL;
928
	bool wants_quit = false;
929
928
930
        try {
929
        try {
931
	    // Flush pending input
930
	    // Flush pending input
Lines 941-947 Link Here
941
					show_quit);
940
					show_quit);
942
            pwdia->run();
941
            pwdia->run();
943
            testkey = pwdia->getKey();
942
            testkey = pwdia->getKey();
944
	    wants_quit = pwdia->wantsQuit();
943
	    do_quit = pwdia->wantsQuit();
945
            delete pwdia;
944
            delete pwdia;
946
        } catch (YAPET::UI::UIException&) {
945
        } catch (YAPET::UI::UIException&) {
947
            if (pwdia != NULL)
946
            if (pwdia != NULL)
Lines 957-963 Link Here
957
        if (testkey == NULL) {
956
        if (testkey == NULL) {
958
            delwin (lockwin);
957
            delwin (lockwin);
959
	    // Do we have to quit
958
	    // Do we have to quit
960
	    if (wants_quit) {
959
	    if (do_quit) {
961
		ungetch('q');
960
		ungetch('q');
962
		return;
961
		return;
963
	    }
962
	    }
Lines 1102-1108 Link Here
1102
        key (NULL),
1101
        key (NULL),
1103
        file (NULL),
1102
        file (NULL),
1104
        locktimeout (timeout),
1103
        locktimeout (timeout),
1105
        usefsecurity (fsecurity) {
1104
									 usefsecurity (fsecurity),
1105
									 do_quit (false) {
1106
    locktimeout = locktimeout < 10 ? 10 : locktimeout;
1106
    locktimeout = locktimeout < 10 ? 10 : locktimeout;
1107
    createWindow();
1107
    createWindow();
1108
}
1108
}
Lines 1331-1336 Link Here
1331
        lockScreen();
1331
        lockScreen();
1332
        ::refresh();
1332
        ::refresh();
1333
        YAPET::UI::BaseWindow::refreshAll();
1333
        YAPET::UI::BaseWindow::refreshAll();
1334
	if (do_quit) {
1335
	    flushinp();
1336
	    ungetch('q');
1337
	}
1334
    }
1338
    }
1335
}
1339
}
1336
#endif // defined(HAVE_SIGACTION) && defined(HAVE_SIGNAL_H)
1340
#endif // defined(HAVE_SIGACTION) && defined(HAVE_SIGNAL_H)

Return to bug 281028