diff options
-rw-r--r-- | src/Ewmh.cc | 7 | ||||
-rw-r--r-- | src/FbTk/XmbFontImp.cc | 4 | ||||
-rw-r--r-- | src/main.cc | 18 | ||||
-rw-r--r-- | util/fbrun/FbRun.cc | 8 | ||||
-rw-r--r-- | util/fbrun/fbrun.xpm | 2 |
5 files changed, 23 insertions, 16 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 9764998..7e5a50c 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -297,8 +297,7 @@ void Ewmh::setupFrame(FluxboxWindow &win) { | |||
297 | } else if (atoms[l] == m_net_wm_window_type_dialog) { | 297 | } else if (atoms[l] == m_net_wm_window_type_dialog) { |
298 | // dialog windows should not be tabable | 298 | // dialog windows should not be tabable |
299 | win.setTabable(false); | 299 | win.setTabable(false); |
300 | } else if (atoms[l] == m_net_wm_window_type_menu || | 300 | } else if (atoms[l] == m_net_wm_window_type_menu) { |
301 | atoms[l] == m_net_wm_window_type_toolbar) { | ||
302 | /* | 301 | /* |
303 | * _NET_WM_WINDOW_TYPE_TOOLBAR and _NET_WM_WINDOW_TYPE_MENU | 302 | * _NET_WM_WINDOW_TYPE_TOOLBAR and _NET_WM_WINDOW_TYPE_MENU |
304 | * indicate toolbar and pinnable menu windows, respectively | 303 | * indicate toolbar and pinnable menu windows, respectively |
@@ -306,6 +305,10 @@ void Ewmh::setupFrame(FluxboxWindow &win) { | |||
306 | * application). Windows of this type may set the | 305 | * application). Windows of this type may set the |
307 | * WM_TRANSIENT_FOR hint indicating the main application window. | 306 | * WM_TRANSIENT_FOR hint indicating the main application window. |
308 | */ | 307 | */ |
308 | win.setDecorationMask(FluxboxWindow::DECOR_TINY); | ||
309 | win.setIconHidden(true); | ||
310 | win.moveToLayer(Layer::ABOVE_DOCK); | ||
311 | } else if (atoms[l] == m_net_wm_window_type_toolbar) { | ||
309 | win.setDecorationMask(FluxboxWindow::DECOR_NONE); | 312 | win.setDecorationMask(FluxboxWindow::DECOR_NONE); |
310 | win.setIconHidden(true); | 313 | win.setIconHidden(true); |
311 | win.moveToLayer(Layer::ABOVE_DOCK); | 314 | 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, ...) { | |||
115 | XFontSet createFontSet(const char *fontname, bool& utf8mode) { | 115 | XFontSet 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 |
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 908b3c2..8d449b3 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc | |||
@@ -79,8 +79,8 @@ FbRun::FbRun(int x, int y, size_t width): | |||
79 | XClassHint *class_hint = XAllocClassHint(); | 79 | XClassHint *class_hint = XAllocClassHint(); |
80 | if (class_hint == 0) | 80 | if (class_hint == 0) |
81 | throw string("Out of memory"); | 81 | throw string("Out of memory"); |
82 | class_hint->res_name = "fbrun"; | 82 | class_hint->res_name = const_cast<char *>("fbrun"); |
83 | class_hint->res_class = "FbRun"; | 83 | class_hint->res_class = const_cast<char *>("FbRun"); |
84 | XSetClassHint(m_display, window(), class_hint); | 84 | XSetClassHint(m_display, window(), class_hint); |
85 | 85 | ||
86 | XFree(class_hint); | 86 | XFree(class_hint); |
@@ -89,7 +89,7 @@ FbRun::FbRun(int x, int y, size_t width): | |||
89 | Pixmap pm; | 89 | Pixmap pm; |
90 | XpmCreatePixmapFromData(m_display, | 90 | XpmCreatePixmapFromData(m_display, |
91 | window(), | 91 | window(), |
92 | fbrun_xpm, | 92 | const_cast<char **>(fbrun_xpm), |
93 | &pm, | 93 | &pm, |
94 | &mask, | 94 | &mask, |
95 | 0); // attribs | 95 | 0); // attribs |
@@ -120,7 +120,7 @@ void FbRun::run(const std::string &command) { | |||
120 | // fork and execute program | 120 | // fork and execute program |
121 | if (!fork()) { | 121 | if (!fork()) { |
122 | 122 | ||
123 | char *shell = getenv("SHELL"); | 123 | const char *shell = getenv("SHELL"); |
124 | if (!shell) | 124 | if (!shell) |
125 | shell = "/bin/sh"; | 125 | shell = "/bin/sh"; |
126 | 126 | ||
diff --git a/util/fbrun/fbrun.xpm b/util/fbrun/fbrun.xpm index 856f214..0ee2c18 100644 --- a/util/fbrun/fbrun.xpm +++ b/util/fbrun/fbrun.xpm | |||
@@ -1,5 +1,5 @@ | |||
1 | /* XPM */ | 1 | /* XPM */ |
2 | static char * fbrun_xpm[] = { | 2 | static const char * fbrun_xpm[] = { |
3 | "32 32 433 2", | 3 | "32 32 433 2", |
4 | " c None", | 4 | " c None", |
5 | ". c #000000", | 5 | ". c #000000", |