diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Resources.cc | 8 | ||||
-rw-r--r-- | src/Screen.cc | 8 | ||||
-rw-r--r-- | src/ScreenResource.cc | 6 | ||||
-rw-r--r-- | src/Window.cc | 25 |
4 files changed, 24 insertions, 23 deletions
diff --git a/src/Resources.cc b/src/Resources.cc index 128eedd..affaf19 100644 --- a/src/Resources.cc +++ b/src/Resources.cc | |||
@@ -26,17 +26,11 @@ | |||
26 | #include "WinButton.hh" | 26 | #include "WinButton.hh" |
27 | 27 | ||
28 | #include "fluxbox.hh" | 28 | #include "fluxbox.hh" |
29 | |||
30 | #include "Layer.hh" | 29 | #include "Layer.hh" |
31 | 30 | ||
32 | #include <stdio.h> | ||
33 | #include <string> | 31 | #include <string> |
34 | #include <vector> | 32 | #include <vector> |
35 | #ifdef HAVE_CSTRING | 33 | #include <cstring> |
36 | #include <cstring> | ||
37 | #else | ||
38 | #include <string.h> | ||
39 | #endif | ||
40 | 34 | ||
41 | using std::string; | 35 | using std::string; |
42 | using std::vector; | 36 | using std::vector; |
diff --git a/src/Screen.cc b/src/Screen.cc index da4e719..2b5411d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1290,9 +1290,11 @@ void BScreen::rereadMenu() { | |||
1290 | } | 1290 | } |
1291 | 1291 | ||
1292 | const std::string BScreen::windowMenuFilename() const { | 1292 | const std::string BScreen::windowMenuFilename() const { |
1293 | if ((*resource.windowmenufile).empty()) | 1293 | std::string name = *resource.windowmenufile; |
1294 | return Fluxbox::instance()->getDefaultDataFilename("windowmenu"); | 1294 | if (name.empty()) { |
1295 | return *resource.windowmenufile; | 1295 | name = Fluxbox::instance()->getDefaultDataFilename("windowmenu"); |
1296 | } | ||
1297 | return name; | ||
1296 | } | 1298 | } |
1297 | 1299 | ||
1298 | void BScreen::rereadWindowMenu() { | 1300 | void BScreen::rereadWindowMenu() { |
diff --git a/src/ScreenResource.cc b/src/ScreenResource.cc index ade8416..0d8aaf7 100644 --- a/src/ScreenResource.cc +++ b/src/ScreenResource.cc | |||
@@ -79,9 +79,9 @@ setFromString(const char *strval) { | |||
79 | 79 | ||
80 | 80 | ||
81 | 81 | ||
82 | ScreenResource::ScreenResource(FbTk::ResourceManager &rm, | 82 | ScreenResource::ScreenResource(FbTk::ResourceManager& rm, |
83 | const std::string &scrname, | 83 | const std::string& scrname, |
84 | const std::string &altscrname): | 84 | const std::string& altscrname): |
85 | opaque_move(rm, true, scrname + ".opaqueMove", altscrname+".OpaqueMove"), | 85 | opaque_move(rm, true, scrname + ".opaqueMove", altscrname+".OpaqueMove"), |
86 | full_max(rm, false, scrname+".fullMaximization", altscrname+".FullMaximization"), | 86 | full_max(rm, false, scrname+".fullMaximization", altscrname+".FullMaximization"), |
87 | max_ignore_inc(rm, true, scrname+".maxIgnoreIncrement", altscrname+".MaxIgnoreIncrement"), | 87 | max_ignore_inc(rm, true, scrname+".maxIgnoreIncrement", altscrname+".MaxIgnoreIncrement"), |
diff --git a/src/Window.cc b/src/Window.cc index daea663..9923a45 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -299,7 +299,7 @@ FluxboxWindow::FluxboxWindow(WinClient &client): | |||
299 | 299 | ||
300 | // add the window to the focus list | 300 | // add the window to the focus list |
301 | // always add to front on startup to keep the focus order the same | 301 | // always add to front on startup to keep the focus order the same |
302 | if (m_focused || Fluxbox::instance()->isStartup()) | 302 | if (isFocused() || Fluxbox::instance()->isStartup()) |
303 | screen().focusControl().addFocusWinFront(*this); | 303 | screen().focusControl().addFocusWinFront(*this); |
304 | else | 304 | else |
305 | screen().focusControl().addFocusWinBack(*this); | 305 | screen().focusControl().addFocusWinBack(*this); |
@@ -599,8 +599,8 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) { | |||
599 | delete old_win; | 599 | delete old_win; |
600 | 600 | ||
601 | } else { // client.fbwindow() == 0 | 601 | } else { // client.fbwindow() == 0 |
602 | associateClient(client); | ||
603 | 602 | ||
603 | associateClient(client); | ||
604 | moveResizeClient(client); | 604 | moveResizeClient(client); |
605 | 605 | ||
606 | // right now, this block only happens with new windows or on restart | 606 | // right now, this block only happens with new windows or on restart |
@@ -2390,10 +2390,13 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2390 | 2390 | ||
2391 | // undraw rectangle before warping workspaces | 2391 | // undraw rectangle before warping workspaces |
2392 | if (!screen().doOpaqueMove()) { | 2392 | if (!screen().doOpaqueMove()) { |
2393 | parent().drawRectangle(screen().rootTheme()->opGC(), | 2393 | int bw = static_cast<int>(frame().window().borderWidth()); |
2394 | m_last_move_x, m_last_move_y, | 2394 | int w = static_cast<int>(frame().width()) + 2*bw -1; |
2395 | frame().width() + 2*frame().window().borderWidth()-1, | 2395 | int h = static_cast<int>(frame().height()) + 2*bw - 1; |
2396 | frame().height() + 2*frame().window().borderWidth()-1); | 2396 | if (w > 0 && h > 0) { |
2397 | parent().drawRectangle(screen().rootTheme()->opGC(), | ||
2398 | m_last_move_x, m_last_move_y, w, h); | ||
2399 | } | ||
2397 | } | 2400 | } |
2398 | 2401 | ||
2399 | if (moved_x && screen().isWorkspaceWarping()) { | 2402 | if (moved_x && screen().isWorkspaceWarping()) { |
@@ -2444,10 +2447,12 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2444 | // do not update display if another motion event is already pending | 2447 | // do not update display if another motion event is already pending |
2445 | 2448 | ||
2446 | if (!screen().doOpaqueMove()) { | 2449 | if (!screen().doOpaqueMove()) { |
2447 | parent().drawRectangle(screen().rootTheme()->opGC(), | 2450 | int bw = frame().window().borderWidth(); |
2448 | dx, dy, | 2451 | int w = static_cast<int>(frame().width()) + 2*bw - 1; |
2449 | frame().width() + 2*frame().window().borderWidth()-1, | 2452 | int h = static_cast<int>(frame().height()) + 2*bw - 1; |
2450 | frame().height() + 2*frame().window().borderWidth()-1); | 2453 | if (w > 0 && h > 0) { |
2454 | parent().drawRectangle(screen().rootTheme()->opGC(), dx, dy, w, h); | ||
2455 | } | ||
2451 | m_last_move_x = dx; | 2456 | m_last_move_x = dx; |
2452 | m_last_move_y = dy; | 2457 | m_last_move_y = dy; |
2453 | } else { | 2458 | } else { |