1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2026-03-09 20:35:46 +01:00

slim: Changed patch for keyboard ctrl (take 2)

This commit is contained in:
root
2010-08-22 16:29:55 +02:00
parent ee9f297788
commit 7c0e159081
2 changed files with 60 additions and 60 deletions

View File

@@ -1,109 +1,109 @@
diff -ur slim-1.3.2/app.cpp slim-1.3.2_orig/app.cpp
--- slim-1.3.2/app.cpp 2010-08-22 16:10:53.000000000 +0200
+++ slim-1.3.2_orig/app.cpp 2010-08-22 16:08:26.000000000 +0200
@@ -51,13 +51,9 @@
diff -ru slim-1.3.2_orig/app.cpp slim-1.3.2/app.cpp
--- slim-1.3.2_orig/app.cpp 2010-08-22 16:08:26.000000000 +0200
+++ slim-1.3.2/app.cpp 2010-08-22 16:10:53.000000000 +0200
@@ -51,9 +51,13 @@
panel->EventHandler(Panel::Get_Name);
switch(panel->getAction()){
case Panel::Suspend:
- Suspend();
- break;
+ Suspend();
+ break;
case Panel::Halt:
- Halt();
- break;
+ Halt();
+ break;
case Panel::Reboot:
- Reboot();
+ (*resp)[i].resp=strdup("root");
- (*resp)[i].resp=strdup("root");
+ Reboot();
break;
case Panel::Console:
@@ -389,15 +385,12 @@
@@ -385,12 +389,15 @@
case Panel::Console:
Console();
break;
- case Panel::KReboot:
+ case Panel::KReboot:
case Panel::Reboot:
Reboot();
break;
- case Panel::KHalt:
+ case Panel::KHalt:
case Panel::Halt:
Halt();
break;
- case Panel::KSuspend:
+ case Panel::KSuspend:
case Panel::Suspend:
Suspend();
break;
@@ -418,10 +411,6 @@
@@ -411,6 +418,10 @@
}
catch(PAM::Auth_Exception& e){
switch(LoginPanel->getAction()){
- case Panel::KSuspend:
- case Panel::KReboot:
- case Panel::KHalt:
- cerr << APPNAME << ": call app::AuthenticateUser usepam" << endl;
+ case Panel::KSuspend:
+ case Panel::KReboot:
+ case Panel::KHalt:
+ cerr << APPNAME << ": call app::AuthenticateUser usepam" << endl;
case Panel::Exit:
case Panel::Console:
return true; // <--- This is simply fake!
@@ -442,11 +431,6 @@
@@ -431,6 +442,11 @@
if (!focuspass){
LoginPanel->EventHandler(Panel::Get_Name);
switch(LoginPanel->getAction()){
- case Panel::KSuspend:
- case Panel::KReboot:
- case Panel::KHalt:
- cerr << APPNAME << ": call App::AuthenticateUser " << endl;
-
+ case Panel::KSuspend:
+ case Panel::KReboot:
+ case Panel::KHalt:
+ cerr << APPNAME << ": call App::AuthenticateUser " << endl;
+
case Panel::Exit:
case Panel::Console:
cerr << APPNAME << ": Got a special command (" << LoginPanel->GetName() << ")" << endl;
@@ -461,10 +445,6 @@
@@ -445,6 +461,10 @@
struct passwd *pw;
switch(LoginPanel->getAction()){
- case Panel::KSuspend:
- case Panel::KHalt:
- case Panel::KReboot:
- return true;
+ case Panel::KSuspend:
+ case Panel::KHalt:
+ case Panel::KReboot:
+ return true;
case Panel::Suspend:
case Panel::Halt:
case Panel::Reboot:
diff -ur slim-1.3.2/panel.cpp slim-1.3.2_orig/panel.cpp
--- slim-1.3.2/panel.cpp 2010-08-22 16:11:10.000000000 +0200
+++ slim-1.3.2_orig/panel.cpp 2010-07-08 07:04:10.000000000 +0200
@@ -351,22 +351,6 @@
diff -ru slim-1.3.2_orig/panel.cpp slim-1.3.2/panel.cpp
--- slim-1.3.2_orig/panel.cpp 2010-07-08 07:04:10.000000000 +0200
+++ slim-1.3.2/panel.cpp 2010-08-22 16:11:10.000000000 +0200
@@ -351,6 +351,22 @@
string formerString = "";
XLookupString(&event.xkey, &ascii, 1, &keysym, &compstatus);
- if (reinterpret_cast<XKeyEvent&>(event).state & ControlMask) {
- switch(keysym){
- case XK_s:
- action = KSuspend;
- return false;
- case XK_h:
- action = KHalt;
- return false;
- case XK_r:
- action = KReboot;
- return false;
- default:
- break;
- }
- }
-
+ if (reinterpret_cast<XKeyEvent&>(event).state & ControlMask) {
+ switch(keysym){
+ case XK_s:
+ action = KSuspend;
+ return false;
+ case XK_h:
+ action = KHalt;
+ return false;
+ case XK_r:
+ action = KReboot;
+ return false;
+ default:
+ break;
+ }
+ }
+
switch(keysym){
case XK_F1:
SwitchSession();
diff -ur slim-1.3.2/panel.h slim-1.3.2_orig/panel.h
--- slim-1.3.2/panel.h 2010-08-22 16:11:17.000000000 +0200
+++ slim-1.3.2_orig/panel.h 2010-07-08 07:04:10.000000000 +0200
@@ -40,10 +40,7 @@
diff -ru slim-1.3.2_orig/panel.h slim-1.3.2/panel.h
--- slim-1.3.2_orig/panel.h 2010-07-08 07:04:10.000000000 +0200
+++ slim-1.3.2/panel.h 2010-08-22 16:11:17.000000000 +0200
@@ -40,7 +40,10 @@
Reboot,
Halt,
Exit,
- Suspend,
- KHalt,
- KReboot,
- KSuspend
+ Suspend
- Suspend
+ Suspend,
+ KHalt,
+ KReboot,
+ KSuspend
};
enum FieldType {
Get_Name,