diff options
author | markt <markt> | 2006-07-29 06:28:58 (GMT) |
---|---|---|
committer | markt <markt> | 2006-07-29 06:28:58 (GMT) |
commit | f66d91cf2281e9a7aec64b7c903c1ba91898324f (patch) | |
tree | f58b64071a2b84cc700a06fbd72529cd99cda3a1 /src | |
parent | 98fba4fd1a50672a918dccd5c8492556f392762f (diff) | |
download | fluxbox_pavel-f66d91cf2281e9a7aec64b7c903c1ba91898324f.zip fluxbox_pavel-f66d91cf2281e9a7aec64b7c903c1ba91898324f.tar.bz2 |
Diffstat (limited to 'src')
-rw-r--r-- | src/Ewmh.cc | 63 | ||||
-rw-r--r-- | src/FocusControl.hh | 2 | ||||
-rw-r--r-- | src/Window.cc | 2 |
3 files changed, 11 insertions, 56 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index b6c765e..51f7fa8 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "WinClientUtil.hh" | 31 | #include "WinClientUtil.hh" |
32 | #include "fluxbox.hh" | 32 | #include "fluxbox.hh" |
33 | #include "FbWinFrameTheme.hh" | 33 | #include "FbWinFrameTheme.hh" |
34 | #include "FocusControl.hh" | ||
34 | 35 | ||
35 | #include "FbTk/App.hh" | 36 | #include "FbTk/App.hh" |
36 | #include "FbTk/FbWindow.hh" | 37 | #include "FbTk/FbWindow.hh" |
@@ -366,29 +367,10 @@ void Ewmh::updateClientClose(WinClient &winclient){ | |||
366 | } | 367 | } |
367 | 368 | ||
368 | void Ewmh::updateClientList(BScreen &screen) { | 369 | void Ewmh::updateClientList(BScreen &screen) { |
369 | size_t num=0; | ||
370 | |||
371 | BScreen::Workspaces::const_iterator workspace_it = | ||
372 | screen.getWorkspacesList().begin(); | ||
373 | const BScreen::Workspaces::const_iterator workspace_it_end = | ||
374 | screen.getWorkspacesList().end(); | ||
375 | for (; workspace_it != workspace_it_end; ++workspace_it) { | ||
376 | Workspace::Windows::iterator win_it = | ||
377 | (*workspace_it)->windowList().begin(); | ||
378 | Workspace::Windows::iterator win_it_end = | ||
379 | (*workspace_it)->windowList().end(); | ||
380 | for (; win_it != win_it_end; ++win_it) { | ||
381 | num += (*win_it)->numClients(); | ||
382 | } | ||
383 | 370 | ||
384 | } | 371 | std::list<WinClient *> creation_order_list = screen.focusControl().creationOrderList(); |
385 | // and count icons | ||
386 | BScreen::Icons::const_iterator icon_it = screen.iconList().begin(); | ||
387 | BScreen::Icons::const_iterator icon_it_end = screen.iconList().end(); | ||
388 | for (; icon_it != icon_it_end; ++icon_it) { | ||
389 | num += (*icon_it)->numClients(); | ||
390 | } | ||
391 | 372 | ||
373 | size_t num = creation_order_list.size(); | ||
392 | Window *wl = FB_new_nothrow Window[num]; | 374 | Window *wl = FB_new_nothrow Window[num]; |
393 | if (wl == 0) { | 375 | if (wl == 0) { |
394 | _FB_USES_NLS; | 376 | _FB_USES_NLS; |
@@ -397,39 +379,12 @@ void Ewmh::updateClientList(BScreen &screen) { | |||
397 | return; | 379 | return; |
398 | } | 380 | } |
399 | 381 | ||
400 | //start the iterator from begining | ||
401 | workspace_it = screen.getWorkspacesList().begin(); | ||
402 | int win=0; | 382 | int win=0; |
403 | for (; workspace_it != workspace_it_end; ++workspace_it) { | 383 | std::list<WinClient *>::iterator client_it = creation_order_list.begin(); |
404 | 384 | std::list<WinClient *>::iterator client_it_end = creation_order_list.end(); | |
405 | // Fill in array of window ID's | 385 | for (; client_it != client_it_end; ++client_it) |
406 | Workspace::Windows::const_iterator it = | 386 | wl[win++] = (*client_it)->window(); |
407 | (*workspace_it)->windowList().begin(); | ||
408 | Workspace::Windows::const_iterator it_end = | ||
409 | (*workspace_it)->windowList().end(); | ||
410 | for (; it != it_end; ++it) { | ||
411 | if ((*it)->numClients() == 1) { | ||
412 | wl[win++] = (*it)->clientWindow(); | ||
413 | } else { | ||
414 | // add every client in fluxboxwindow to list window list | ||
415 | std::list<WinClient *>::iterator client_it = | ||
416 | (*it)->clientList().begin(); | ||
417 | std::list<WinClient *>::iterator client_it_end = | ||
418 | (*it)->clientList().end(); | ||
419 | for (; client_it != client_it_end; ++client_it) | ||
420 | wl[win++] = (*client_it)->window(); | ||
421 | } | ||
422 | } | ||
423 | } | ||
424 | 387 | ||
425 | // plus iconified windows | ||
426 | icon_it = screen.iconList().begin(); | ||
427 | for (; icon_it != icon_it_end; ++icon_it) { | ||
428 | FluxboxWindow::ClientList::iterator client_it = (*icon_it)->clientList().begin(); | ||
429 | FluxboxWindow::ClientList::iterator client_it_end = (*icon_it)->clientList().end(); | ||
430 | for (; client_it != client_it_end; ++client_it) | ||
431 | wl[win++] = (*client_it)->window(); | ||
432 | } | ||
433 | //number of windows to show in client list | 388 | //number of windows to show in client list |
434 | num = win; | 389 | num = win; |
435 | 390 | ||
@@ -703,9 +658,7 @@ void Ewmh::updateHints(FluxboxWindow &win) { | |||
703 | } | 658 | } |
704 | 659 | ||
705 | void Ewmh::updateWorkspace(FluxboxWindow &win) { | 660 | void Ewmh::updateWorkspace(FluxboxWindow &win) { |
706 | long workspace = win.isInitialized() ? | 661 | long workspace = win.workspaceNumber(); |
707 | win.workspaceNumber() : | ||
708 | win.screen().currentWorkspaceID(); | ||
709 | 662 | ||
710 | if (win.isStuck()) | 663 | if (win.isStuck()) |
711 | workspace = -1; // appear on all desktops/workspaces | 664 | workspace = -1; // appear on all desktops/workspaces |
diff --git a/src/FocusControl.hh b/src/FocusControl.hh index 0e64de8..ff716a3 100644 --- a/src/FocusControl.hh +++ b/src/FocusControl.hh | |||
@@ -94,6 +94,8 @@ public: | |||
94 | WinClient *lastFocusedWindow(int workspace); | 94 | WinClient *lastFocusedWindow(int workspace); |
95 | WinClient *lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client); | 95 | WinClient *lastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client); |
96 | 96 | ||
97 | FocusedWindows &creationOrderList() { return m_creation_order_list; } | ||
98 | |||
97 | void removeClient(WinClient &client); | 99 | void removeClient(WinClient &client); |
98 | void shutdown(); | 100 | void shutdown(); |
99 | 101 | ||
diff --git a/src/Window.cc b/src/Window.cc index fdff04c..b1b91cb 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -424,7 +424,7 @@ void FluxboxWindow::init() { | |||
424 | 424 | ||
425 | m_last_focus_time.tv_sec = m_last_focus_time.tv_usec = 0; | 425 | m_last_focus_time.tv_sec = m_last_focus_time.tv_usec = 0; |
426 | 426 | ||
427 | m_blackbox_attrib.workspace = m_workspace_number = ~0; | 427 | m_blackbox_attrib.workspace = m_workspace_number = m_screen.currentWorkspaceID(); |
428 | 428 | ||
429 | m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0; | 429 | m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0; |
430 | m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; | 430 | m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; |