aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-07-31 23:16:05 (GMT)
committermarkt <markt>2007-07-31 23:16:05 (GMT)
commit8da54ca0eb91e0595b506725369ede0a6426d795 (patch)
tree444fbcc9849c10764f5bc6f3b71481c6057992a8 /src
parent363764db5b36dbffcc019cec8ffb405d357d7130 (diff)
downloadfluxbox-8da54ca0eb91e0595b506725369ede0a6426d795.zip
fluxbox-8da54ca0eb91e0595b506725369ede0a6426d795.tar.bz2
add some decorations to torn menus, and fix restart without an argument
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc7
-rw-r--r--src/FbTk/XmbFontImp.cc4
-rw-r--r--src/main.cc18
3 files changed, 18 insertions, 11 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index afab938..fef4428 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -310,8 +310,7 @@ void Ewmh::setupFrame(FluxboxWindow &win) {
310 } else if (atoms[l] == m_net_wm_window_type_dialog) { 310 } else if (atoms[l] == m_net_wm_window_type_dialog) {
311 // dialog windows should not be tabable 311 // dialog windows should not be tabable
312 win.setTabable(false); 312 win.setTabable(false);
313 } else if (atoms[l] == m_net_wm_window_type_menu || 313 } else if (atoms[l] == m_net_wm_window_type_menu) {
314 atoms[l] == m_net_wm_window_type_toolbar) {
315 /* 314 /*
316 * _NET_WM_WINDOW_TYPE_TOOLBAR and _NET_WM_WINDOW_TYPE_MENU 315 * _NET_WM_WINDOW_TYPE_TOOLBAR and _NET_WM_WINDOW_TYPE_MENU
317 * indicate toolbar and pinnable menu windows, respectively 316 * indicate toolbar and pinnable menu windows, respectively
@@ -319,6 +318,10 @@ void Ewmh::setupFrame(FluxboxWindow &win) {
319 * application). Windows of this type may set the 318 * application). Windows of this type may set the
320 * WM_TRANSIENT_FOR hint indicating the main application window. 319 * WM_TRANSIENT_FOR hint indicating the main application window.
321 */ 320 */
321 win.setDecoration(FluxboxWindow::DECOR_TINY);
322 win.setIconHidden(true);
323 win.moveToLayer(Layer::ABOVE_DOCK);
324 } else if (atoms[l] == m_net_wm_window_type_toolbar) {
322 win.setDecoration(FluxboxWindow::DECOR_NONE); 325 win.setDecoration(FluxboxWindow::DECOR_NONE);
323 win.setIconHidden(true); 326 win.setIconHidden(true);
324 win.moveToLayer(Layer::ABOVE_DOCK); 327 win.moveToLayer(Layer::ABOVE_DOCK);
diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc
index 025f96d..3a45b09 100644
--- a/src/FbTk/XmbFontImp.cc
+++ b/src/FbTk/XmbFontImp.cc
@@ -115,7 +115,9 @@ const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...) {
115XFontSet createFontSet(const char *fontname, bool& utf8mode) { 115XFontSet createFontSet(const char *fontname, bool& utf8mode) {
116 Display *display = FbTk::App::instance()->display(); 116 Display *display = FbTk::App::instance()->display();
117 XFontSet fs; 117 XFontSet fs;
118 char **missing, *def = "-"; 118 char **missing;
119 const char *constdef = "-";
120 char *def = const_cast<char *>(constdef);
119 int nmissing; 121 int nmissing;
120 string orig_locale = ""; 122 string orig_locale = "";
121 123
diff --git a/src/main.cc b/src/main.cc
index 2d1ff0d..4554123 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -321,14 +321,16 @@ int main(int argc, char **argv) {
321 FbTk::FbStringUtil::shutdown(); 321 FbTk::FbStringUtil::shutdown();
322 322
323 if (restarting) { 323 if (restarting) {
324 const char *shell = getenv("SHELL"); 324 if (!restart_argument.empty()) {
325 if (!shell) 325 const char *shell = getenv("SHELL");
326 shell = "/bin/sh"; 326 if (!shell)
327 327 shell = "/bin/sh";
328 const char *arg = restart_argument.c_str(); 328
329 if (arg) { 329 const char *arg = restart_argument.c_str();
330 execlp(shell, shell, "-c", arg, (char *) NULL); 330 if (arg) {
331 perror(arg); 331 execlp(shell, shell, "-c", arg, (const char *) NULL);
332 perror(arg);
333 }
332 } 334 }
333 335
334 // fall back in case the above execlp doesn't work 336 // fall back in case the above execlp doesn't work