make Swing apps only somewhat horribly broken again
This commit is contained in:
parent
42895e115b
commit
99eaded40e
3 changed files with 14 additions and 58 deletions
|
@ -880,12 +880,6 @@ void FbWinFrame::reconfigure() {
|
||||||
gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, false);
|
gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, false);
|
||||||
|
|
||||||
m_bevel = theme()->bevelWidth();
|
m_bevel = theme()->bevelWidth();
|
||||||
setBorderWidth();
|
|
||||||
|
|
||||||
if (useHandle() && theme()->handleWidth() != 0)
|
|
||||||
showHandle();
|
|
||||||
else
|
|
||||||
hideHandle();
|
|
||||||
|
|
||||||
unsigned int orig_handle_h = handle().height();
|
unsigned int orig_handle_h = handle().height();
|
||||||
if (m_use_handle && orig_handle_h != theme()->handleWidth())
|
if (m_use_handle && orig_handle_h != theme()->handleWidth())
|
||||||
|
|
|
@ -422,8 +422,6 @@ void FluxboxWindow::init() {
|
||||||
fluxbox.saveWindowSearchGroup(frame().window().window(), this);
|
fluxbox.saveWindowSearchGroup(frame().window().window(), this);
|
||||||
fluxbox.saveWindowSearchGroup(frame().tabcontainer().window(), this);
|
fluxbox.saveWindowSearchGroup(frame().tabcontainer().window(), this);
|
||||||
|
|
||||||
frame().resize(m_client->width(), m_client->height());
|
|
||||||
|
|
||||||
m_workspace_number = m_screen.currentWorkspaceID();
|
m_workspace_number = m_screen.currentWorkspaceID();
|
||||||
|
|
||||||
// set default decorations but don't apply them
|
// 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
|
// reparent window to this
|
||||||
frame().setClientWindow(**client_it);
|
frame().setClientWindow(**client_it);
|
||||||
|
|
||||||
moveResizeClient(**client_it,
|
moveResizeClient(**client_it);
|
||||||
frame().clientArea().x(),
|
|
||||||
frame().clientArea().y(),
|
|
||||||
frame().clientArea().width(),
|
|
||||||
frame().clientArea().height());
|
|
||||||
|
|
||||||
// create a labelbutton for this client and
|
// create a labelbutton for this client and
|
||||||
// associate it with the pointer
|
// associate it with the pointer
|
||||||
|
@ -645,11 +639,7 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
|
||||||
} else { // client.fbwindow() == 0
|
} else { // client.fbwindow() == 0
|
||||||
associateClient(client);
|
associateClient(client);
|
||||||
|
|
||||||
moveResizeClient(client,
|
moveResizeClient(client);
|
||||||
frame().clientArea().x(),
|
|
||||||
frame().clientArea().y(),
|
|
||||||
frame().clientArea().width(),
|
|
||||||
frame().clientArea().height());
|
|
||||||
|
|
||||||
// right now, this block only happens with new windows or on restart
|
// right now, this block only happens with new windows or on restart
|
||||||
bool is_startup = Fluxbox::instance()->isStartup();
|
bool is_startup = Fluxbox::instance()->isStartup();
|
||||||
|
@ -2870,8 +2860,8 @@ void FluxboxWindow::update(FbTk::Subject *subj) {
|
||||||
setFullscreenLayer();
|
setFullscreenLayer();
|
||||||
}
|
}
|
||||||
} else if (subj == &m_theme.reconfigSig()) {
|
} else if (subj == &m_theme.reconfigSig()) {
|
||||||
frame().reconfigure();
|
frame().applyDecorations();
|
||||||
reconfigTheme();
|
sendConfigureNotify();
|
||||||
} else if (m_initialized && subj == &m_frame.frameExtentSig()) {
|
} else if (m_initialized && subj == &m_frame.frameExtentSig()) {
|
||||||
Fluxbox::instance()->updateFrameExtents(*this);
|
Fluxbox::instance()->updateFrameExtents(*this);
|
||||||
sendConfigureNotify();
|
sendConfigureNotify();
|
||||||
|
@ -3598,15 +3588,16 @@ void FluxboxWindow::fixsize() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FluxboxWindow::moveResizeClient(WinClient &client, int x, int y,
|
void FluxboxWindow::moveResizeClient(WinClient &client) {
|
||||||
unsigned int height, unsigned int width) {
|
client.moveResize(frame().clientArea().x(), frame().clientArea().y(),
|
||||||
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(),
|
|
||||||
frame().clientArea().width(),
|
frame().clientArea().width(),
|
||||||
frame().clientArea().height());
|
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() {
|
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)
|
of the client window is. (ie frame pos + client pos inside the frame = send pos)
|
||||||
*/
|
*/
|
||||||
//!!
|
//!!
|
||||||
moveResizeClient(client,
|
moveResizeClient(client);
|
||||||
frame().clientArea().x(),
|
|
||||||
frame().clientArea().y(),
|
|
||||||
frame().clientArea().width(),
|
|
||||||
frame().clientArea().height());
|
|
||||||
|
|
||||||
} // end for
|
} // end for
|
||||||
|
|
||||||
|
@ -3846,29 +3833,6 @@ void FluxboxWindow::updateButtons() {
|
||||||
frame().reconfigure();
|
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.
|
// grab pointer and increase counter.
|
||||||
// we need this to count grab pointers,
|
// we need this to count grab pointers,
|
||||||
// especially at startup, where we can drag/resize while starting
|
// especially at startup, where we can drag/resize while starting
|
||||||
|
|
|
@ -471,8 +471,6 @@ public:
|
||||||
const FbTk::Subject &workspaceSig() const { return m_workspacesig; }
|
const FbTk::Subject &workspaceSig() const { return m_workspacesig; }
|
||||||
/** @} */ // end group signals
|
/** @} */ // end group signals
|
||||||
|
|
||||||
void reconfigTheme();
|
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
class WinSubject: public FbTk::Subject {
|
class WinSubject: public FbTk::Subject {
|
||||||
|
@ -518,7 +516,7 @@ private:
|
||||||
void doSnapping(int &left, int &top);
|
void doSnapping(int &left, int &top);
|
||||||
// user_w/h return the values that should be shown to the user
|
// user_w/h return the values that should be shown to the user
|
||||||
void fixsize();
|
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
|
/// sends configurenotify to all clients
|
||||||
void sendConfigureNotify();
|
void sendConfigureNotify();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue