aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/Gnome.cc9
-rw-r--r--src/Screen.cc13
-rw-r--r--src/Window.cc20
-rw-r--r--src/Window.hh8
5 files changed, 34 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 38eff68..99586a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@ Changes for 0.1.15:
3*03/02/16: 3*03/02/16:
4 * Added layer submenu to window menu + small fix (Simon) 4 * Added layer submenu to window menu + small fix (Simon)
5 Screen.cc Window.hh/cc fluxbox.hh 5 Screen.cc Window.hh/cc fluxbox.hh
6 * Fixed gnome workspace initialisation issues (Simon)
7 Gnome.cc Window.hh/cc Screen.cc
6*03/02/15: 8*03/02/15:
7 * Added Style menu and fixed theme listeners for FbWinFrame, Menu and Toolbar (Henrik) 9 * Added Style menu and fixed theme listeners for FbWinFrame, Menu and Toolbar (Henrik)
8 ToolbarTheme.hh/cc, Toolbar.hh/cc, FbTk Menu.hh/cc, FbTk MenuTheme.hh/cc, 10 ToolbarTheme.hh/cc, Toolbar.hh/cc, FbTk Menu.hh/cc, FbTk MenuTheme.hh/cc,
diff --git a/src/Gnome.cc b/src/Gnome.cc
index 40b81da..b79d535 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Gnome.cc,v 1.9 2003/02/09 14:11:12 rathnor Exp $ 22// $Id: Gnome.cc,v 1.10 2003/02/16 17:57:54 rathnor Exp $
23 23
24#include "Gnome.hh" 24#include "Gnome.hh"
25 25
@@ -107,13 +107,14 @@ void Gnome::setupWindow(FluxboxWindow &win) {
107 XFree (data); 107 XFree (data);
108 } 108 }
109 109
110 // load gnome layer atom 110 // load gnome workspace atom
111 if (XGetWindowProperty(disp, win.getClientWindow(), 111 if (XGetWindowProperty(disp, win.getClientWindow(),
112 m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, 112 m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL,
113 &ret_type, &fmt, &nitems, &bytes_after, 113 &ret_type, &fmt, &nitems, &bytes_after,
114 (unsigned char **) &data) == Success && data) { 114 (unsigned char **) &data) == Success && data) {
115 flags = *data; 115 unsigned int workspace_num = *data;
116 win.getScreen()->reassociateWindow(&win, flags ,false); 116 if (win.getWorkspaceNumber() != workspace_num)
117 win.getScreen()->reassociateWindow(&win, workspace_num, false);
117 XFree (data); 118 XFree (data);
118 } 119 }
119 120
diff --git a/src/Screen.cc b/src/Screen.cc
index 4650fad..85b2e12 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.108 2003/02/16 16:45:23 fluxgen Exp $ 25// $Id: Screen.cc,v 1.109 2003/02/16 17:57:54 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -1105,7 +1105,11 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1105 Fluxbox::instance()->saveWindowSearch(client, win); 1105 Fluxbox::instance()->saveWindowSearch(client, win);
1106 Fluxbox::instance()->attachSignals(*win); 1106 Fluxbox::instance()->attachSignals(*win);
1107 setupWindowActions(*win); 1107 setupWindowActions(*win);
1108 } 1108 }
1109 if (win->getWorkspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) {
1110 win->show();
1111 XSync(FbTk::App::instance()->display(), False);
1112 }
1109 return win; 1113 return win;
1110} 1114}
1111 1115
@@ -1127,8 +1131,8 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
1127 CommandRef close_cmd(new WindowCmd(win, &FluxboxWindow::close)); 1131 CommandRef close_cmd(new WindowCmd(win, &FluxboxWindow::close));
1128 CommandRef shade_cmd(new WindowCmd(win, &FluxboxWindow::shade)); 1132 CommandRef shade_cmd(new WindowCmd(win, &FluxboxWindow::shade));
1129 CommandRef raise_cmd(new WindowCmd(win, &FluxboxWindow::raise)); 1133 CommandRef raise_cmd(new WindowCmd(win, &FluxboxWindow::raise));
1134 CommandRef lower_cmd(new WindowCmd(win, &FluxboxWindow::lower));
1130 CommandRef raise_and_focus_cmd(new WindowCmd(win, &FluxboxWindow::raiseAndFocus)); 1135 CommandRef raise_and_focus_cmd(new WindowCmd(win, &FluxboxWindow::raiseAndFocus));
1131 CommandRef lower_cmd(new WindowCmd(win, &FluxboxWindow::raise));
1132 CommandRef stick_cmd(new WindowCmd(win, &FluxboxWindow::stick)); 1136 CommandRef stick_cmd(new WindowCmd(win, &FluxboxWindow::stick));
1133 CommandRef show_menu_cmd(new WindowCmd(win, &FluxboxWindow::popupMenu)); 1137 CommandRef show_menu_cmd(new WindowCmd(win, &FluxboxWindow::popupMenu));
1134 1138
@@ -1138,7 +1142,6 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
1138 // get titlebar configuration 1142 // get titlebar configuration
1139 const vector<Fluxbox::Titlebar> *dir = &Fluxbox::instance()->getTitlebarLeft(); 1143 const vector<Fluxbox::Titlebar> *dir = &Fluxbox::instance()->getTitlebarLeft();
1140 for (char c=0; c<2; c++) { 1144 for (char c=0; c<2; c++) {
1141
1142 for (size_t i=0; i< dir->size(); ++i) { 1145 for (size_t i=0; i< dir->size(); ++i) {
1143 //create new buttons 1146 //create new buttons
1144 FbTk::Button *newbutton = 0; 1147 FbTk::Button *newbutton = 0;
@@ -1324,7 +1327,6 @@ void BScreen::reassociateGroup(FluxboxWindow *w, unsigned int wkspc_id, bool ign
1324 } 1327 }
1325} 1328}
1326 1329
1327
1328void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { 1330void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) {
1329 if (! w) return; 1331 if (! w) return;
1330 1332
@@ -1338,6 +1340,7 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ig
1338 if (w->getWorkspaceNumber() == wkspc_id) 1340 if (w->getWorkspaceNumber() == wkspc_id)
1339 return; 1341 return;
1340 1342
1343
1341 if (w->isIconic()) { 1344 if (w->isIconic()) {
1342 removeIcon(w); 1345 removeIcon(w);
1343 getWorkspace(wkspc_id)->addWindow(w); 1346 getWorkspace(wkspc_id)->addWindow(w);
diff --git a/src/Window.cc b/src/Window.cc
index a8d3f8a..517074d 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.116 2003/02/16 15:12:07 rathnor Exp $ 25// $Id: Window.cc,v 1.117 2003/02/16 17:57:53 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -261,7 +261,7 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen *s, int screen_num,
261 if (workspace_number < 0 || workspace_number >= screen->getCount()) 261 if (workspace_number < 0 || workspace_number >= screen->getCount())
262 workspace_number = screen->getCurrentWorkspaceID(); 262 workspace_number = screen->getCurrentWorkspaceID();
263 263
264 restoreAttributes(place_window); 264 restoreAttributes();
265 265
266 moveToLayer(m_layernum); 266 moveToLayer(m_layernum);
267 screen->getWorkspace(workspace_number)->addWindow(this, place_window); 267 screen->getWorkspace(workspace_number)->addWindow(this, place_window);
@@ -289,10 +289,6 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen *s, int screen_num,
289 // no focus default 289 // no focus default
290 setFocusFlag(false); 290 setFocusFlag(false);
291 291
292 // finaly show the frame and the client window
293
294 m_frame.show();
295 XSync(display, False);
296} 292}
297 293
298 294
@@ -931,6 +927,15 @@ void FluxboxWindow::setTab(bool flag) {
931 */ 927 */
932} 928}
933 929
930void FluxboxWindow::hide() {
931 m_windowmenu.hide();
932 m_frame.hide();
933}
934
935void FluxboxWindow::show() {
936 m_frame.show();
937}
938
934/** 939/**
935 Unmaps the window and removes it from workspace list 940 Unmaps the window and removes it from workspace list
936*/ 941*/
@@ -1103,6 +1108,7 @@ void FluxboxWindow::maximizeVertical() {
1103 1108
1104 1109
1105void FluxboxWindow::setWorkspace(int n) { 1110void FluxboxWindow::setWorkspace(int n) {
1111
1106 workspace_number = n; 1112 workspace_number = n;
1107 1113
1108 blackbox_attrib.flags |= BaseDisplay::ATTRIB_WORKSPACE; 1114 blackbox_attrib.flags |= BaseDisplay::ATTRIB_WORKSPACE;
@@ -1501,7 +1507,7 @@ void FluxboxWindow::setGravityOffsets() {
1501 * but doesn't change the actual state 1507 * but doesn't change the actual state
1502 * (so the caller can set defaults etc as well) 1508 * (so the caller can set defaults etc as well)
1503 */ 1509 */
1504void FluxboxWindow::restoreAttributes(bool place_window) { 1510void FluxboxWindow::restoreAttributes() {
1505 if (!getState()) 1511 if (!getState())
1506 current_state = NormalState; 1512 current_state = NormalState;
1507 1513
diff --git a/src/Window.hh b/src/Window.hh
index 4eec867..18e9128 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.hh,v 1.47 2003/02/16 16:43:00 fluxgen Exp $ 25// $Id: Window.hh,v 1.48 2003/02/16 17:57:53 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -111,6 +111,10 @@ public:
111 void raiseAndFocus() { raise(); setInputFocus(); } 111 void raiseAndFocus() { raise(); setInputFocus(); }
112 void setTab(bool flag); 112 void setTab(bool flag);
113 void setFocusFlag(bool flag); 113 void setFocusFlag(bool flag);
114 // map this window
115 void show();
116 // unmap this window
117 void hide();
114 void iconify(); 118 void iconify();
115 void deiconify(bool = true, bool = true); 119 void deiconify(bool = true, bool = true);
116 /// destroy this window 120 /// destroy this window
@@ -145,7 +149,7 @@ public:
145 149
146 void setWorkspace(int n); 150 void setWorkspace(int n);
147 void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh); 151 void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh);
148 void restoreAttributes(bool place_window); 152 void restoreAttributes();
149 void showMenu(int mx, int my); 153 void showMenu(int mx, int my);
150 // popup menu on last button press position 154 // popup menu on last button press position
151 void popupMenu(); 155 void popupMenu();