diff options
author | Simon Rettberg | 2019-10-18 19:33:20 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-10-18 19:33:20 +0200 |
commit | 31777a980e0f4b1b258713158524c0cd9a1dc30f (patch) | |
tree | 459c5bff4bcb2ff5c8c4d7b40f47bbcaf5d59f54 /src/xsession.h | |
parent | Properly handle key press events; prevent double-execution (diff) | |
download | vmchooser2-31777a980e0f4b1b258713158524c0cd9a1dc30f.tar.gz vmchooser2-31777a980e0f4b1b258713158524c0cd9a1dc30f.tar.xz vmchooser2-31777a980e0f4b1b258713158524c0cd9a1dc30f.zip |
Use execv() to start selected session
Prevent vmchooser from lingering in the background, like a zombie,
haunting you with invisible windows. Also seems to be notably faster
when launching the openbox session.
Diffstat (limited to 'src/xsession.h')
-rw-r--r-- | src/xsession.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xsession.h b/src/xsession.h index e014e9e..7b9135b 100644 --- a/src/xsession.h +++ b/src/xsession.h @@ -11,7 +11,7 @@ class XSession : public Session { public: - void init(const QString& name, const QString& exec, + void init(const QString& name, const QString& exec, const QString& tryExec, const QString& comment, const QString& icon); bool init(const QString& filename); @@ -40,7 +40,9 @@ class XSession : public Session { QIcon icon() const; - bool run() const; + bool prepareRun() const; + + void run() const; int type() const; @@ -56,12 +58,11 @@ protected: private: QString name_; QString exec_; + QString tryExec_; QString comment_; QString icon_; int priority_; - QProcess *_process; - static void loadXSessionsConfig(); static inline int find(QChar c, int start, const QString& line) |