aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonb <simonb>2005-01-04 10:51:38 (GMT)
committersimonb <simonb>2005-01-04 10:51:38 (GMT)
commit61bb3f039afd5a29ae655666fbc2fe7943eab8e2 (patch)
tree9574a68535ffac8e8dc17c0a0fd4dfaf65adf114
parent338a985c0567c4bea55c20c01f9df492756a6a34 (diff)
downloadfluxbox-61bb3f039afd5a29ae655666fbc2fe7943eab8e2.zip
fluxbox-61bb3f039afd5a29ae655666fbc2fe7943eab8e2.tar.bz2
fix some initialisation, especially relating to placement and
decoration/handler hints
-rw-r--r--ChangeLog4
-rw-r--r--src/Ewmh.cc5
-rw-r--r--src/Screen.cc33
-rw-r--r--src/Window.cc11
-rw-r--r--src/Window.hh2
5 files changed, 30 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c3ab58..7d24471 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.12 2Changes for 0.9.12
3*05/01/04:
4 * Fix some initialisation states, especially window placement with no
5 decorations through apps (e.g. aterm)
6 Window.hh/cc Screen.cc Ewmh.cc
3*05/01/02: 7*05/01/02:
4 * Fix for #996298, Windows dont respect toolbar.border.width (Mathias) 8 * Fix for #996298, Windows dont respect toolbar.border.width (Mathias)
5 Toolbar.cc 9 Toolbar.cc
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 78ea63e..2d744f7 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -238,14 +238,11 @@ void Ewmh::setupFrame(FluxboxWindow &win) {
238 if (desktop == 0xFFFFFFFF && !win.isStuck()) 238 if (desktop == 0xFFFFFFFF && !win.isStuck())
239 win.stick(); 239 win.stick();
240 else 240 else
241 win.screen().sendToWorkspace(desktop, &win, false); 241 win.setWorkspace(desktop, false);
242 242
243 XFree(data); 243 XFree(data);
244 } 244 }
245 245
246 updateWorkspace(win);
247
248
249} 246}
250 247
251void Ewmh::updateFrameClose(FluxboxWindow &win) { 248void Ewmh::updateFrameClose(FluxboxWindow &win) {
diff --git a/src/Screen.cc b/src/Screen.cc
index 10921e0..dee150b 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1220,9 +1220,9 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1220 else 1220 else
1221 focused_list.push_back(&win->winClient()); 1221 focused_list.push_back(&win->winClient());
1222 1222
1223 if (new_win) { 1223// if (new_win) {
1224 Fluxbox::instance()->attachSignals(*win); 1224// Fluxbox::instance()->attachSignals(*win);
1225 } 1225// }
1226 1226
1227 // we also need to check if another window expects this window to the left 1227 // we also need to check if another window expects this window to the left
1228 // and if so, then join it. 1228 // and if so, then join it.
@@ -1240,27 +1240,28 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1240 1240
1241 1241
1242FluxboxWindow *BScreen::createWindow(WinClient &client) { 1242FluxboxWindow *BScreen::createWindow(WinClient &client) {
1243
1244 if (isKdeDockapp(client.window()) && addKdeDockapp(client.window())) {
1245 // we need to save old handler and readd it later
1246// I think rearranging the logic negates the need for this - sb 04jan2005
1247// FbTk::EventManager *evm = FbTk::EventManager::instance();
1248// FbTk::EventHandler *evh = evm->find(client.window());
1249// evm->add(*evh, client.window());
1250 return 0;
1251 }
1252
1243 FluxboxWindow *win = new FluxboxWindow(client, 1253 FluxboxWindow *win = new FluxboxWindow(client,
1244 winFrameTheme(), 1254 winFrameTheme(),
1245 *layerManager().getLayer(Fluxbox::instance()->getNormalLayer())); 1255 *layerManager().getLayer(Fluxbox::instance()->getNormalLayer()));
1246 1256
1247 if (isKdeDockapp(client.window())) { 1257// Why not KDE? - sb 04jan2005
1248 if (addKdeDockapp(client.window())) { 1258// if (!isKdeDockapp(client.window())) {
1249 // we need to save old handler and readd it later
1250 FbTk::EventManager *evm = FbTk::EventManager::instance();
1251 FbTk::EventHandler *evh = evm->find(client.window());
1252 delete win;
1253 evm->add(*evh, client.window());
1254 return 0;
1255 }
1256 } else {
1257
1258#ifdef SLIT 1259#ifdef SLIT
1259 if (win->initialState() == WithdrawnState && slit() != 0) { 1260 if (win->initialState() == WithdrawnState && slit() != 0) {
1260 slit()->addClient(win->clientWindow()); 1261 slit()->addClient(win->clientWindow());
1261 } 1262 }
1262#endif // SLIT 1263#endif // SLIT
1263 } 1264// }
1264 1265
1265 1266
1266 if (!win->isManaged()) { 1267 if (!win->isManaged()) {
@@ -1270,7 +1271,7 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
1270 // don't add to focused_list, as it should already be in there (since the 1271 // don't add to focused_list, as it should already be in there (since the
1271 // WinClient already exists). 1272 // WinClient already exists).
1272 1273
1273 Fluxbox::instance()->attachSignals(*win); 1274// Fluxbox::instance()->attachSignals(*win);
1274 1275
1275 m_clientlist_sig.notify(); 1276 m_clientlist_sig.notify();
1276 1277
diff --git a/src/Window.cc b/src/Window.cc
index 0e2e72e..fdb636d 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -485,6 +485,7 @@ void FluxboxWindow::init() {
485 m_timer.setCommand(raise_cmd); 485 m_timer.setCommand(raise_cmd);
486 m_timer.fireOnce(true); 486 m_timer.fireOnce(true);
487 487
488 // Slit client?
488 if (m_client->initial_state == WithdrawnState) { 489 if (m_client->initial_state == WithdrawnState) {
489 return; 490 return;
490 } 491 }
@@ -492,6 +493,7 @@ void FluxboxWindow::init() {
492 m_managed = true; //this window is managed 493 m_managed = true; //this window is managed
493 494
494 Fluxbox::instance()->saveWindowSearchGroup(frame().window().window(), this); 495 Fluxbox::instance()->saveWindowSearchGroup(frame().window().window(), this);
496 Fluxbox::instance()->attachSignals(*this);
495 497
496 // update transient infomation 498 // update transient infomation
497 m_client->updateTransientInfo(); 499 m_client->updateTransientInfo();
@@ -518,11 +520,11 @@ void FluxboxWindow::init() {
518 520
519 grabButtons(); 521 grabButtons();
520 522
523 restoreAttributes();
524
521 if (m_workspace_number < 0 || m_workspace_number >= screen().getCount()) 525 if (m_workspace_number < 0 || m_workspace_number >= screen().getCount())
522 m_workspace_number = screen().currentWorkspaceID(); 526 m_workspace_number = screen().currentWorkspaceID();
523 527
524 restoreAttributes();
525
526 bool place_window = true; 528 bool place_window = true;
527 if (fluxbox.isStartup() || m_client->isTransient() || 529 if (fluxbox.isStartup() || m_client->isTransient() ||
528 m_client->normal_hint_flags & (PPosition|USPosition)) { 530 m_client->normal_hint_flags & (PPosition|USPosition)) {
@@ -569,6 +571,7 @@ void FluxboxWindow::init() {
569 571
570 572
571 screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); 573 screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window);
574 setWorkspace(m_workspace_number, true);
572 575
573 if (shaded) { // start shaded 576 if (shaded) { // start shaded
574 shaded = false; 577 shaded = false;
@@ -1745,7 +1748,7 @@ void FluxboxWindow::maximizeFull() {
1745} 1748}
1746 1749
1747 1750
1748void FluxboxWindow::setWorkspace(int n) { 1751void FluxboxWindow::setWorkspace(int n, bool notify) {
1749 unsigned int old_wkspc = m_workspace_number; 1752 unsigned int old_wkspc = m_workspace_number;
1750 1753
1751 m_workspace_number = n; 1754 m_workspace_number = n;
@@ -1754,7 +1757,7 @@ void FluxboxWindow::setWorkspace(int n) {
1754 m_blackbox_attrib.workspace = m_workspace_number; 1757 m_blackbox_attrib.workspace = m_workspace_number;
1755 1758
1756 // notify workspace change 1759 // notify workspace change
1757 if (!stuck && old_wkspc != m_workspace_number) { 1760 if (notify && !stuck && old_wkspc != m_workspace_number) {
1758#ifdef DEBUG 1761#ifdef DEBUG
1759 cerr<<this<<" notify workspace signal"<<endl; 1762 cerr<<this<<" notify workspace signal"<<endl;
1760#endif // DEBUG 1763#endif // DEBUG
diff --git a/src/Window.hh b/src/Window.hh
index aa6de85..020fd88 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -234,7 +234,7 @@ public:
234 /// move and resize frame to pox x,y and size width, height 234 /// move and resize frame to pox x,y and size width, height
235 void moveResize(int x, int y, unsigned int width, unsigned int height, int gravity = ForgetGravity); 235 void moveResize(int x, int y, unsigned int width, unsigned int height, int gravity = ForgetGravity);
236 236
237 void setWorkspace(int n); 237 void setWorkspace(int n, bool notify = true);
238 void changeBlackboxHints(const BlackboxHints &bh); 238 void changeBlackboxHints(const BlackboxHints &bh);
239 void updateFunctions(); 239 void updateFunctions();
240 void restoreAttributes(); 240 void restoreAttributes();