diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Window.cc b/src/Window.cc index 5839c52..a2a9d02 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.139 2003/04/16 00:38:06 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.140 2003/04/16 12:27:49 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -307,7 +307,8 @@ void FluxboxWindow::init() { | |||
307 | btn->setJustify(m_frame.theme().justify()); | 307 | btn->setJustify(m_frame.theme().justify()); |
308 | m_labelbuttons[m_client] = btn; | 308 | m_labelbuttons[m_client] = btn; |
309 | m_frame.addLabelButton(*btn); | 309 | m_frame.addLabelButton(*btn); |
310 | btn->show(); | 310 | m_frame.setLabelButtonFocus(*btn); |
311 | btn->show(); | ||
311 | FbTk::EventManager &evm = *FbTk::EventManager::instance(); | 312 | FbTk::EventManager &evm = *FbTk::EventManager::instance(); |
312 | // we need motion notify so we mask it | 313 | // we need motion notify so we mask it |
313 | btn->window().setEventMask(ExposureMask | ButtonPressMask | ButtonReleaseMask | | 314 | btn->window().setEventMask(ExposureMask | ButtonPressMask | ButtonReleaseMask | |
@@ -594,6 +595,13 @@ bool FluxboxWindow::detachClient(WinClient &client) { | |||
594 | return true; | 595 | return true; |
595 | } | 596 | } |
596 | 597 | ||
598 | void FluxboxWindow::detachCurrentClient() { | ||
599 | // should only operate if we had more than one client | ||
600 | if (numClients() <= 1) | ||
601 | return; | ||
602 | detachClient(*m_client); | ||
603 | } | ||
604 | |||
597 | /// removes client from client list, does not create new fluxboxwindow for it | 605 | /// removes client from client list, does not create new fluxboxwindow for it |
598 | bool FluxboxWindow::removeClient(WinClient &client) { | 606 | bool FluxboxWindow::removeClient(WinClient &client) { |
599 | if (client.m_win != this || numClients() == 0) | 607 | if (client.m_win != this || numClients() == 0) |
@@ -662,6 +670,7 @@ void FluxboxWindow::nextClient() { | |||
662 | else | 670 | else |
663 | m_client = *it; | 671 | m_client = *it; |
664 | m_client->raise(); | 672 | m_client->raise(); |
673 | m_frame.setLabelButtonFocus(*m_labelbuttons[m_client]); | ||
665 | setInputFocus(); | 674 | setInputFocus(); |
666 | } | 675 | } |
667 | 676 | ||
@@ -680,6 +689,7 @@ void FluxboxWindow::prevClient() { | |||
680 | m_client = *(--it); | 689 | m_client = *(--it); |
681 | 690 | ||
682 | m_client->raise(); | 691 | m_client->raise(); |
692 | m_frame.setLabelButtonFocus(*m_labelbuttons[m_client]); | ||
683 | setInputFocus(); | 693 | setInputFocus(); |
684 | } | 694 | } |
685 | 695 | ||
@@ -691,6 +701,7 @@ void FluxboxWindow::setCurrentClient(WinClient &client) { | |||
691 | m_client = &client; | 701 | m_client = &client; |
692 | m_client->raise(); | 702 | m_client->raise(); |
693 | Fluxbox::instance()->setFocusedWindow(this); | 703 | Fluxbox::instance()->setFocusedWindow(this); |
704 | m_frame.setLabelButtonFocus(*m_labelbuttons[m_client]); | ||
694 | setInputFocus(); | 705 | setInputFocus(); |
695 | } | 706 | } |
696 | 707 | ||
@@ -2365,7 +2376,6 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2365 | // drag'n'drop code for tabs | 2376 | // drag'n'drop code for tabs |
2366 | // | 2377 | // |
2367 | if (m_attaching_tab == 0) { | 2378 | if (m_attaching_tab == 0) { |
2368 | cerr<<"starting m_attching_tab for this="<<this<<endl; | ||
2369 | // start drag'n'drop for tab | 2379 | // start drag'n'drop for tab |
2370 | m_attaching_tab = client; | 2380 | m_attaching_tab = client; |
2371 | 2381 | ||