don't click-to-place windows when they specify a position

This commit is contained in:
Dana Jansens 2002-04-28 19:14:54 +00:00
parent 4852193a57
commit 5e3ca8e665
2 changed files with 5 additions and 4 deletions

View file

@ -216,7 +216,7 @@ OpenboxWindow::OpenboxWindow(Openbox &o, Window w, BScreen *s) : openbox(o) {
} }
upsize(); upsize();
Bool place_window = True; place_window = true;
if (openbox.isStartup() || flags.transient || if (openbox.isStartup() || flags.transient ||
client.normal_hint_flags & (PPosition|USPosition)) { client.normal_hint_flags & (PPosition|USPosition)) {
setGravityOffsets(); setGravityOffsets();
@ -226,7 +226,7 @@ OpenboxWindow::OpenboxWindow(Openbox &o, Window w, BScreen *s) : openbox(o) {
(signed) (frame.y + frame.y_border) >= 0 && (signed) (frame.y + frame.y_border) >= 0 &&
frame.x <= (signed) screen->size().w() && frame.x <= (signed) screen->size().w() &&
frame.y <= (signed) screen->size().h())) frame.y <= (signed) screen->size().h()))
place_window = False; place_window = false;
} }
frame.window = createToplevelWindow(frame.x, frame.y, frame.width, frame.window = createToplevelWindow(frame.x, frame.y, frame.width,
@ -1467,8 +1467,8 @@ void OpenboxWindow::deiconify(Bool reassoc, Bool raise) {
// if we're using the click to place placement type, then immediately // if we're using the click to place placement type, then immediately
// after the window is mapped, we need to start interactively moving it // after the window is mapped, we need to start interactively moving it
if (!(flags.iconic || reassoc) && if (screen->placementPolicy() == BScreen::ClickMousePlacement &&
screen->placementPolicy() == BScreen::ClickMousePlacement) { place_window && !(flags.iconic || reassoc)) {
// if the last window wasn't placed yet, or we're just moving a window // if the last window wasn't placed yet, or we're just moving a window
// already, finish off that move cleanly // already, finish off that move cleanly
OpenboxWindow *w = openbox.getFocusedWindow(); OpenboxWindow *w = openbox.getFocusedWindow();

View file

@ -78,6 +78,7 @@ private:
int window_number, workspace_number; int window_number, workspace_number;
unsigned long current_state; unsigned long current_state;
bool place_window; // place the window ourselves when mapped
enum FocusMode { F_NoInput = 0, F_Passive, enum FocusMode { F_NoInput = 0, F_Passive,
F_LocallyActive, F_GloballyActive }; F_LocallyActive, F_GloballyActive };