diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/ScreenPlacement.cc | 9 | ||||
-rw-r--r-- | src/ScreenResources.cc | 4 |
3 files changed, 12 insertions, 5 deletions
@@ -1,5 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.0: | 2 | Changes for 1.0.0: |
3 | *07/05/17: | ||
4 | * Fixed some window placement issues (thanks Tomas Janousek) | ||
5 | ScreenPlacement.cc | ||
6 | *07/05/16: | ||
3 | * Fixed bug with fluxbox-generate_menu -is (thanks Jim Ramsay) | 7 | * Fixed bug with fluxbox-generate_menu -is (thanks Jim Ramsay) |
4 | util/fluxbox-generate_menu.in | 8 | util/fluxbox-generate_menu.in |
5 | *07/05/12: | 9 | *07/05/12: |
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc index 86c0804..4b52aa4 100644 --- a/src/ScreenPlacement.cc +++ b/src/ScreenPlacement.cc | |||
@@ -118,10 +118,11 @@ bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist | |||
118 | win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset(); | 118 | win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset(); |
119 | 119 | ||
120 | // make sure the window is inside our screen(head) area | 120 | // make sure the window is inside our screen(head) area |
121 | if (place_x + win_w > head_right) | 121 | if (place_x + win_w - win.xOffset() > head_right) |
122 | place_x = (head_right - win_w) / 2 + win.xOffset(); | 122 | place_x = head_left + (head_right - head_left - win_w) / 2 + |
123 | if (place_y + win_h > head_bot) | 123 | win.xOffset(); |
124 | place_y = (head_bot - win_h) / 2 + win.yOffset(); | 124 | if (place_y + win_h - win.yOffset() > head_bot) |
125 | place_y = head_top + (head_bot - head_top - win_h) / 2 + win.yOffset(); | ||
125 | 126 | ||
126 | return true; | 127 | return true; |
127 | } | 128 | } |
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc index 0f17c2a..8b71505 100644 --- a/src/ScreenResources.cc +++ b/src/ScreenResources.cc | |||
@@ -84,6 +84,7 @@ template<> | |||
84 | string FbTk::Resource<BScreen::FollowModel>::getString() const { | 84 | string FbTk::Resource<BScreen::FollowModel>::getString() const { |
85 | switch (m_value) { | 85 | switch (m_value) { |
86 | case BScreen::FOLLOW_ACTIVE_WINDOW: | 86 | case BScreen::FOLLOW_ACTIVE_WINDOW: |
87 | default: | ||
87 | return string("Follow"); | 88 | return string("Follow"); |
88 | break; | 89 | break; |
89 | case BScreen::FETCH_ACTIVE_WINDOW: | 90 | case BScreen::FETCH_ACTIVE_WINDOW: |
@@ -93,7 +94,6 @@ string FbTk::Resource<BScreen::FollowModel>::getString() const { | |||
93 | return string("SemiFollow"); | 94 | return string("SemiFollow"); |
94 | break; | 95 | break; |
95 | case BScreen::IGNORE_OTHER_WORKSPACES: | 96 | case BScreen::IGNORE_OTHER_WORKSPACES: |
96 | default: | ||
97 | return string("Ignore"); | 97 | return string("Ignore"); |
98 | break; | 98 | break; |
99 | } | 99 | } |
@@ -111,6 +111,8 @@ setFromString(char const *strval) { | |||
111 | m_value = BScreen::FETCH_ACTIVE_WINDOW; | 111 | m_value = BScreen::FETCH_ACTIVE_WINDOW; |
112 | else if (strcasecmp(strval, "SemiFollow") == 0) | 112 | else if (strcasecmp(strval, "SemiFollow") == 0) |
113 | m_value = BScreen::SEMIFOLLOW_ACTIVE_WINDOW; | 113 | m_value = BScreen::SEMIFOLLOW_ACTIVE_WINDOW; |
114 | else if (strcasecmp(strval, "Ignore") == 0) | ||
115 | m_value = BScreen::IGNORE_OTHER_WORKSPACES; | ||
114 | else | 116 | else |
115 | setDefaultValue(); | 117 | setDefaultValue(); |
116 | } | 118 | } |