From 99eaded40eadcbb3b3f3c30bf02a99d413a99751 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Thu, 21 Aug 2008 10:17:21 -0700 Subject: make Swing apps only somewhat horribly broken again --- src/FbWinFrame.cc | 6 ------ src/Window.cc | 62 ++++++++++++------------------------------------------- src/Window.hh | 4 +--- 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() { gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, false); m_bevel = theme()->bevelWidth(); - setBorderWidth(); - - if (useHandle() && theme()->handleWidth() != 0) - showHandle(); - else - hideHandle(); unsigned int orig_handle_h = handle().height(); 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() { fluxbox.saveWindowSearchGroup(frame().window().window(), this); fluxbox.saveWindowSearchGroup(frame().tabcontainer().window(), this); - frame().resize(m_client->width(), m_client->height()); - m_workspace_number = m_screen.currentWorkspaceID(); // set default decorations but don't apply them @@ -619,11 +617,7 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) { // reparent window to this frame().setClientWindow(**client_it); - moveResizeClient(**client_it, - frame().clientArea().x(), - frame().clientArea().y(), - frame().clientArea().width(), - frame().clientArea().height()); + moveResizeClient(**client_it); // create a labelbutton for this client and // associate it with the pointer @@ -645,11 +639,7 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) { } else { // client.fbwindow() == 0 associateClient(client); - moveResizeClient(client, - frame().clientArea().x(), - frame().clientArea().y(), - frame().clientArea().width(), - frame().clientArea().height()); + moveResizeClient(client); // right now, this block only happens with new windows or on restart bool is_startup = Fluxbox::instance()->isStartup(); @@ -2870,8 +2860,8 @@ void FluxboxWindow::update(FbTk::Subject *subj) { setFullscreenLayer(); } } else if (subj == &m_theme.reconfigSig()) { - frame().reconfigure(); - reconfigTheme(); + frame().applyDecorations(); + sendConfigureNotify(); } else if (m_initialized && subj == &m_frame.frameExtentSig()) { Fluxbox::instance()->updateFrameExtents(*this); sendConfigureNotify(); @@ -3598,15 +3588,16 @@ void FluxboxWindow::fixsize() { } } -void FluxboxWindow::moveResizeClient(WinClient &client, int x, int y, - unsigned int height, unsigned int width) { - client.moveResize(x, y, - frame().clientArea().width(), - frame().clientArea().height()); - client.sendConfigureNotify(frame().x() + frame().clientArea().x() + frame().window().borderWidth(), - frame().y() + frame().clientArea().y() + frame().window().borderWidth(), +void FluxboxWindow::moveResizeClient(WinClient &client) { + client.moveResize(frame().clientArea().x(), frame().clientArea().y(), frame().clientArea().width(), frame().clientArea().height()); + client.sendConfigureNotify(frame().x() + frame().clientArea().x() + + frame().window().borderWidth(), + frame().y() + frame().clientArea().y() + + frame().window().borderWidth(), + frame().clientArea().width(), + frame().clientArea().height()); } void FluxboxWindow::sendConfigureNotify() { @@ -3619,11 +3610,7 @@ void FluxboxWindow::sendConfigureNotify() { of the client window is. (ie frame pos + client pos inside the frame = send pos) */ //!! - moveResizeClient(client, - frame().clientArea().x(), - frame().clientArea().y(), - frame().clientArea().width(), - frame().clientArea().height()); + moveResizeClient(client); } // end for @@ -3846,29 +3833,6 @@ void FluxboxWindow::updateButtons() { frame().reconfigure(); } -/** - * reconfigTheme: must be called after frame is reconfigured - * Client windows need to be made the same size and location as - * the frame's client area. - */ -void FluxboxWindow::reconfigTheme() { - - ClientList::iterator it = clientList().begin(); - ClientList::iterator it_end = clientList().end(); - - int x = m_frame.clientArea().x(), - y = m_frame.clientArea().y(); - - unsigned int width = m_frame.clientArea().width(), - height = m_frame.clientArea().height(); - - for (; it != it_end; ++it) { - (*it)->moveResize(x, y, width, height); - } - - sendConfigureNotify(); -} - // grab pointer and increase counter. // we need this to count grab pointers, // 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: const FbTk::Subject &workspaceSig() const { return m_workspacesig; } /** @} */ // end group signals - void reconfigTheme(); - //@} class WinSubject: public FbTk::Subject { @@ -518,7 +516,7 @@ private: void doSnapping(int &left, int &top); // user_w/h return the values that should be shown to the user void fixsize(); - void moveResizeClient(WinClient &client, int x, int y, unsigned int width, unsigned int height); + void moveResizeClient(WinClient &client); /// sends configurenotify to all clients void sendConfigureNotify(); -- cgit v0.11.2