aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-21 17:17:21 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-21 17:17:21 (GMT)
commit99eaded40eadcbb3b3f3c30bf02a99d413a99751 (patch)
tree5ea4cf7055d9ab9af993a4dc3d044ff4f66e9cc1 /src
parent42895e115bc28aa058a29061033080869d03fc7d (diff)
downloadfluxbox_paul-99eaded40eadcbb3b3f3c30bf02a99d413a99751.zip
fluxbox_paul-99eaded40eadcbb3b3f3c30bf02a99d413a99751.tar.bz2
make Swing apps only somewhat horribly broken again
Diffstat (limited to 'src')
-rw-r--r--src/FbWinFrame.cc6
-rw-r--r--src/Window.cc62
-rw-r--r--src/Window.hh4
3 files changed, 14 insertions, 58 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index da6fd74..284a1b5 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -880,12 +880,6 @@ void FbWinFrame::reconfigure() {
880 gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, false); 880 gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, false);
881 881
882 m_bevel = theme()->bevelWidth(); 882 m_bevel = theme()->bevelWidth();
883 setBorderWidth();
884
885 if (useHandle() && theme()->handleWidth() != 0)
886 showHandle();
887 else
888 hideHandle();
889 883
890 unsigned int orig_handle_h = handle().height(); 884 unsigned int orig_handle_h = handle().height();
891 if (m_use_handle && orig_handle_h != theme()->handleWidth()) 885 if (m_use_handle && orig_handle_h != theme()->handleWidth())
diff --git a/src/Window.cc b/src/Window.cc
index 5a432dd..d7a2bee 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -422,8 +422,6 @@ void FluxboxWindow::init() {
422 fluxbox.saveWindowSearchGroup(frame().window().window(), this); 422 fluxbox.saveWindowSearchGroup(frame().window().window(), this);
423 fluxbox.saveWindowSearchGroup(frame().tabcontainer().window(), this); 423 fluxbox.saveWindowSearchGroup(frame().tabcontainer().window(), this);
424 424
425 frame().resize(m_client->width(), m_client->height());
426
427 m_workspace_number = m_screen.currentWorkspaceID(); 425 m_workspace_number = m_screen.currentWorkspaceID();
428 426
429 // set default decorations but don't apply them 427 // set default decorations but don't apply them
@@ -619,11 +617,7 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
619 // reparent window to this 617 // reparent window to this
620 frame().setClientWindow(**client_it); 618 frame().setClientWindow(**client_it);
621 619
622 moveResizeClient(**client_it, 620 moveResizeClient(**client_it);
623 frame().clientArea().x(),
624 frame().clientArea().y(),
625 frame().clientArea().width(),
626 frame().clientArea().height());
627 621
628 // create a labelbutton for this client and 622 // create a labelbutton for this client and
629 // associate it with the pointer 623 // associate it with the pointer
@@ -645,11 +639,7 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
645 } else { // client.fbwindow() == 0 639 } else { // client.fbwindow() == 0
646 associateClient(client); 640 associateClient(client);
647 641
648 moveResizeClient(client, 642 moveResizeClient(client);
649 frame().clientArea().x(),
650 frame().clientArea().y(),
651 frame().clientArea().width(),
652 frame().clientArea().height());
653 643
654 // right now, this block only happens with new windows or on restart 644 // right now, this block only happens with new windows or on restart
655 bool is_startup = Fluxbox::instance()->isStartup(); 645 bool is_startup = Fluxbox::instance()->isStartup();
@@ -2870,8 +2860,8 @@ void FluxboxWindow::update(FbTk::Subject *subj) {
2870 setFullscreenLayer(); 2860 setFullscreenLayer();
2871 } 2861 }
2872 } else if (subj == &m_theme.reconfigSig()) { 2862 } else if (subj == &m_theme.reconfigSig()) {
2873 frame().reconfigure(); 2863 frame().applyDecorations();
2874 reconfigTheme(); 2864 sendConfigureNotify();
2875 } else if (m_initialized && subj == &m_frame.frameExtentSig()) { 2865 } else if (m_initialized && subj == &m_frame.frameExtentSig()) {
2876 Fluxbox::instance()->updateFrameExtents(*this); 2866 Fluxbox::instance()->updateFrameExtents(*this);
2877 sendConfigureNotify(); 2867 sendConfigureNotify();
@@ -3598,15 +3588,16 @@ void FluxboxWindow::fixsize() {
3598 } 3588 }
3599} 3589}
3600 3590
3601void FluxboxWindow::moveResizeClient(WinClient &client, int x, int y, 3591void FluxboxWindow::moveResizeClient(WinClient &client) {
3602 unsigned int height, unsigned int width) { 3592 client.moveResize(frame().clientArea().x(), frame().clientArea().y(),
3603 client.moveResize(x, y,
3604 frame().clientArea().width(),
3605 frame().clientArea().height());
3606 client.sendConfigureNotify(frame().x() + frame().clientArea().x() + frame().window().borderWidth(),
3607 frame().y() + frame().clientArea().y() + frame().window().borderWidth(),
3608 frame().clientArea().width(), 3593 frame().clientArea().width(),
3609 frame().clientArea().height()); 3594 frame().clientArea().height());
3595 client.sendConfigureNotify(frame().x() + frame().clientArea().x() +
3596 frame().window().borderWidth(),
3597 frame().y() + frame().clientArea().y() +
3598 frame().window().borderWidth(),
3599 frame().clientArea().width(),
3600 frame().clientArea().height());
3610} 3601}
3611 3602
3612void FluxboxWindow::sendConfigureNotify() { 3603void FluxboxWindow::sendConfigureNotify() {
@@ -3619,11 +3610,7 @@ void FluxboxWindow::sendConfigureNotify() {
3619 of the client window is. (ie frame pos + client pos inside the frame = send pos) 3610 of the client window is. (ie frame pos + client pos inside the frame = send pos)
3620 */ 3611 */
3621 //!! 3612 //!!
3622 moveResizeClient(client, 3613 moveResizeClient(client);
3623 frame().clientArea().x(),
3624 frame().clientArea().y(),
3625 frame().clientArea().width(),
3626 frame().clientArea().height());
3627 3614
3628 } // end for 3615 } // end for
3629 3616
@@ -3846,29 +3833,6 @@ void FluxboxWindow::updateButtons() {
3846 frame().reconfigure(); 3833 frame().reconfigure();
3847} 3834}
3848 3835
3849/**
3850 * reconfigTheme: must be called after frame is reconfigured
3851 * Client windows need to be made the same size and location as
3852 * the frame's client area.
3853 */
3854void FluxboxWindow::reconfigTheme() {
3855
3856 ClientList::iterator it = clientList().begin();
3857 ClientList::iterator it_end = clientList().end();
3858
3859 int x = m_frame.clientArea().x(),
3860 y = m_frame.clientArea().y();
3861
3862 unsigned int width = m_frame.clientArea().width(),
3863 height = m_frame.clientArea().height();
3864
3865 for (; it != it_end; ++it) {
3866 (*it)->moveResize(x, y, width, height);
3867 }
3868
3869 sendConfigureNotify();
3870}
3871
3872// grab pointer and increase counter. 3836// grab pointer and increase counter.
3873// we need this to count grab pointers, 3837// we need this to count grab pointers,
3874// especially at startup, where we can drag/resize while starting 3838// especially at startup, where we can drag/resize while starting
diff --git a/src/Window.hh b/src/Window.hh
index 14f063a..5cf755e 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -471,8 +471,6 @@ public:
471 const FbTk::Subject &workspaceSig() const { return m_workspacesig; } 471 const FbTk::Subject &workspaceSig() const { return m_workspacesig; }
472 /** @} */ // end group signals 472 /** @} */ // end group signals
473 473
474 void reconfigTheme();
475
476 //@} 474 //@}
477 475
478 class WinSubject: public FbTk::Subject { 476 class WinSubject: public FbTk::Subject {
@@ -518,7 +516,7 @@ private:
518 void doSnapping(int &left, int &top); 516 void doSnapping(int &left, int &top);
519 // user_w/h return the values that should be shown to the user 517 // user_w/h return the values that should be shown to the user
520 void fixsize(); 518 void fixsize();
521 void moveResizeClient(WinClient &client, int x, int y, unsigned int width, unsigned int height); 519 void moveResizeClient(WinClient &client);
522 /// sends configurenotify to all clients 520 /// sends configurenotify to all clients
523 void sendConfigureNotify(); 521 void sendConfigureNotify();
524 522