Hack around focus problem in the Fedora theme Resolves: #1114192 #1119777 #1123506 #1125129 #1140386 #1112841 #1128463 #1128465 #1149608 #1149628 #1148659 #1148660 #1149610 #1149629epel9
parent
905714b86b
commit
b1a8e7ee96
@ -1,80 +0,0 @@
|
|||||||
From 235a2d11dc6982b3a94c45dd57ebafb86ca76734 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Briza <mbriza@redhat.com>
|
|
||||||
Date: Fri, 27 Jun 2014 14:11:26 +0200
|
|
||||||
Subject: [PATCH] Initialize sigactions in signal handlers
|
|
||||||
|
|
||||||
---
|
|
||||||
src/daemon/SignalHandler.cpp | 21 ++++++++++-----------
|
|
||||||
1 file changed, 10 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/daemon/SignalHandler.cpp b/src/daemon/SignalHandler.cpp
|
|
||||||
index 3cc47c7..5c53660 100644
|
|
||||||
--- a/src/daemon/SignalHandler.cpp
|
|
||||||
+++ b/src/daemon/SignalHandler.cpp
|
|
||||||
@@ -60,31 +60,30 @@ namespace SDDM {
|
|
||||||
}
|
|
||||||
|
|
||||||
void SignalHandler::initialize() {
|
|
||||||
- struct sigaction sighup;
|
|
||||||
+ struct sigaction sighup = { };
|
|
||||||
sighup.sa_handler = SignalHandler::hupSignalHandler;
|
|
||||||
sigemptyset(&sighup.sa_mask);
|
|
||||||
- sighup.sa_flags = 0;
|
|
||||||
- sighup.sa_flags |= SA_RESTART;
|
|
||||||
+ sighup.sa_flags = SA_RESTART;
|
|
||||||
|
|
||||||
if (sigaction(SIGHUP, &sighup, 0) > 0) {
|
|
||||||
qCritical() << "Failed to setup SIGHUP handler.";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- struct sigaction sigint;
|
|
||||||
+ struct sigaction sigint = { };
|
|
||||||
sigint.sa_handler = SignalHandler::intSignalHandler;
|
|
||||||
sigemptyset(&sigint.sa_mask);
|
|
||||||
- sigint.sa_flags |= SA_RESTART;
|
|
||||||
+ sigint.sa_flags = SA_RESTART;
|
|
||||||
|
|
||||||
if (sigaction(SIGINT, &sigint, 0) > 0) {
|
|
||||||
qCritical() << "Failed to set up SIGINT handler.";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- struct sigaction sigterm;
|
|
||||||
+ struct sigaction sigterm = { };
|
|
||||||
sigterm.sa_handler = SignalHandler::termSignalHandler;
|
|
||||||
sigemptyset(&sigterm.sa_mask);
|
|
||||||
- sigterm.sa_flags |= SA_RESTART;
|
|
||||||
+ sigterm.sa_flags = SA_RESTART;
|
|
||||||
|
|
||||||
if (sigaction(SIGTERM, &sigterm, 0) > 0) {
|
|
||||||
qCritical() << "Failed to set up SIGTERM handler.";
|
|
||||||
@@ -93,10 +92,10 @@ namespace SDDM {
|
|
||||||
}
|
|
||||||
|
|
||||||
void SignalHandler::initializeSigusr1() {
|
|
||||||
- struct sigaction sigusr1;
|
|
||||||
+ struct sigaction sigusr1 = { };
|
|
||||||
sigusr1.sa_handler = SignalHandler::usr1SignalHandler;
|
|
||||||
sigemptyset(&sigusr1.sa_mask);
|
|
||||||
- sigusr1.sa_flags |= SA_RESTART;
|
|
||||||
+ sigusr1.sa_flags = SA_RESTART;
|
|
||||||
|
|
||||||
if (sigaction(SIGUSR1, &sigusr1, 0) > 0) {
|
|
||||||
qCritical() << "Failed to set up SIGUSR1 handler.";
|
|
||||||
@@ -105,10 +104,10 @@ namespace SDDM {
|
|
||||||
}
|
|
||||||
|
|
||||||
void SignalHandler::ignoreSigusr1() {
|
|
||||||
- struct sigaction sigusr1;
|
|
||||||
+ struct sigaction sigusr1 = { };
|
|
||||||
sigusr1.sa_handler = SIG_IGN;
|
|
||||||
sigemptyset(&sigusr1.sa_mask);
|
|
||||||
- sigusr1.sa_flags |= SA_RESTART;
|
|
||||||
+ sigusr1.sa_flags = SA_RESTART;
|
|
||||||
|
|
||||||
if (sigaction(SIGUSR1, &sigusr1, 0) > 0) {
|
|
||||||
qCritical() << "Failed to set up SIGUSR1 handler.";
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* SDDM Fedora configuration
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDDM_CONFIGURATION_H
|
||||||
|
#define SDDM_CONFIGURATION_H
|
||||||
|
|
||||||
|
#include <QtCore/QString>
|
||||||
|
#include <QtCore/QList>
|
||||||
|
#include <QtCore/QTextStream>
|
||||||
|
#include <QtCore/QStringList>
|
||||||
|
#include <QtCore/QDir>
|
||||||
|
#include <pwd.h>
|
||||||
|
|
||||||
|
#include "Constants.h"
|
||||||
|
|
||||||
|
#include "ConfigReader.h"
|
||||||
|
|
||||||
|
namespace SDDM {
|
||||||
|
// Name File Sections and/or Entries (but anything else too, it's a class) - Entries in a Config are assumed to be in the General section
|
||||||
|
Config(MainConfig, CONFIG_FILE,
|
||||||
|
enum NumState { NUM_NONE, NUM_SET_ON, NUM_SET_OFF };
|
||||||
|
|
||||||
|
// Name Type Default value Description
|
||||||
|
Entry(HaltCommand, QString, _S("/usr/bin/systemctl poweroff"), _S("Halt command"));
|
||||||
|
Entry(RebootCommand, QString, _S("/usr/bin/systemctl reboot"), _S("Reboot command"));
|
||||||
|
Entry(Numlock, NumState, NUM_NONE, _S("Initial NumLock state\n"
|
||||||
|
"Valid values: on|off|none\n"
|
||||||
|
"If property is set to none, numlock won't be changed"));
|
||||||
|
// Name Entries (but it's a regular class again)
|
||||||
|
Section(Theme,
|
||||||
|
Entry(ThemeDir, QString, _S(DATA_INSTALL_DIR "/themes"), _S("Theme directory path"));
|
||||||
|
Entry(Current, QString, _S("fedora"), _S("Current theme name"));
|
||||||
|
Entry(FacesDir, QString, _S(DATA_INSTALL_DIR "/faces"), _S("Face icon directory\n"
|
||||||
|
"The files should be in username.face.icon format"));
|
||||||
|
Entry(CursorTheme, QString, QString(), _S("Cursor theme"));
|
||||||
|
);
|
||||||
|
// TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal
|
||||||
|
Section(XDisplay,
|
||||||
|
Entry(ServerPath, QString, _S("/usr/bin/X"), _S("X server path"));
|
||||||
|
Entry(XauthPath, QString, _S("/usr/bin/xauth"), _S("Xauth path"));
|
||||||
|
Entry(SessionDir, QString, _S("/usr/share/xsessions"), _S("Session description directory"));
|
||||||
|
Entry(SessionCommand, QString, _S("/etc/X11/xinit/Xsession"), _S("Xsession script path\n"
|
||||||
|
"A script to execute when starting the desktop session"));
|
||||||
|
Entry(DisplayCommand, QString, _S(DATA_INSTALL_DIR "/scripts/Xsetup"), _S("Xsetup script path\n"
|
||||||
|
"A script to execute when starting the display server"));
|
||||||
|
Entry(MinimumVT, int, 1, _S("Minimum VT\n"
|
||||||
|
"The lowest virtual terminal number that will be used."));
|
||||||
|
);
|
||||||
|
Section(Users,
|
||||||
|
Entry(DefaultPath, QString, _S("/bin:/usr/bin:/usr/local/bin"), _S("Default $PATH"));
|
||||||
|
Entry(MinimumUid, int, 1000, _S("Minimum user id for displayed users"));
|
||||||
|
Entry(MaximumUid, int, 65000, _S("Maximum user id for displayed users"));
|
||||||
|
Entry(HideUsers, QStringList, QStringList(), _S("Hidden users"));
|
||||||
|
Entry(HideShells, QStringList, QStringList(), _S("Hidden shells\n"
|
||||||
|
"Users with these shells as their default won't be listed"));
|
||||||
|
Entry(RememberLastUser, bool, true, _S("Remember the last successfully logged in user"));
|
||||||
|
Entry(RememberLastSession, bool, true, _S("Remember the session of the last successfully logged in user"));
|
||||||
|
);
|
||||||
|
Section(Autologin,
|
||||||
|
Entry(User, QString, QString(), _S("Autologin user"));
|
||||||
|
Entry(Session, QString, QString(), _S("Autologin session"));
|
||||||
|
Entry(Relogin, bool, false, _S("Autologin again on session exit"));
|
||||||
|
);
|
||||||
|
);
|
||||||
|
|
||||||
|
Config(StateConfig, []()->QString{auto tmp = getpwnam("sddm"); return tmp ? tmp->pw_dir : STATE_DIR;}().append("/state.conf"),
|
||||||
|
Section(Last,
|
||||||
|
Entry(Session, QString, QString(), _S("Name of the session file of the last session selected. This session will be preselected when the login screen shows up."));
|
||||||
|
Entry(User, QString, QString(), _S("Name of the last logged-in user. This username will be preselected/shown when the login screen shows up"));
|
||||||
|
);
|
||||||
|
);
|
||||||
|
|
||||||
|
extern MainConfig mainConfig;
|
||||||
|
extern StateConfig stateConfig;
|
||||||
|
|
||||||
|
inline QTextStream& operator>>(QTextStream &str, MainConfig::NumState &state) {
|
||||||
|
QString text = str.readLine().trimmed();
|
||||||
|
if (text.compare("on", Qt::CaseInsensitive) == 0)
|
||||||
|
state = MainConfig::NUM_SET_ON;
|
||||||
|
else if (text.compare("off", Qt::CaseInsensitive) == 0)
|
||||||
|
state = MainConfig::NUM_SET_OFF;
|
||||||
|
else
|
||||||
|
state = MainConfig::NUM_NONE;
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QTextStream& operator<<(QTextStream &str, const MainConfig::NumState &state) {
|
||||||
|
if (state == MainConfig::NUM_SET_ON)
|
||||||
|
str << "on";
|
||||||
|
else if (state == MainConfig::NUM_SET_OFF)
|
||||||
|
str << "off";
|
||||||
|
else
|
||||||
|
str << "none";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // SDDM_CONFIGURATION_H
|
@ -1,26 +0,0 @@
|
|||||||
[General]
|
|
||||||
DefaultPath=/bin:/usr/bin:/usr/local/bin
|
|
||||||
CursorTheme=
|
|
||||||
ServerPath=/usr/bin/X
|
|
||||||
XauthPath=/usr/bin/xauth
|
|
||||||
AuthDir=/var/run/sddm
|
|
||||||
HaltCommand=/usr/bin/systemctl poweroff
|
|
||||||
RebootCommand=/usr/bin/systemctl reboot
|
|
||||||
SessionsDir=/usr/share/xsessions/
|
|
||||||
LastSession=kde-plasma.desktop
|
|
||||||
RememberLastSession=true
|
|
||||||
SessionCommand=/etc/X11/xinit/Xsession
|
|
||||||
FacesDir=/usr/share/sddm/faces/
|
|
||||||
ThemesDir=/usr/share/sddm/themes/
|
|
||||||
CurrentTheme=fedora
|
|
||||||
MinimumUid=1000
|
|
||||||
MaximumUid=65000
|
|
||||||
LastUser=
|
|
||||||
RememberLastUser=false
|
|
||||||
AutoUser=
|
|
||||||
HideUsers=
|
|
||||||
HideShells=
|
|
||||||
AutoRelogin=false
|
|
||||||
MinimumVT=1
|
|
||||||
Numlock=none
|
|
||||||
XDMCPServer=false
|
|
Loading…
Reference in new issue