]> Dogcows Code - chaz/openbox/commitdiff
make sure that the only time Click-to-place kicks in is when initially placing/mappin...
authorDana Jansens <danakj@orodu.net>
Tue, 30 Apr 2002 07:46:46 +0000 (07:46 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 30 Apr 2002 07:46:46 +0000 (07:46 +0000)
src/Window.cc
src/Window.h

index dca583b32c52b373504a98dc557fdc6cb9e1539a..c8c3760b917c2efe8f9a547bb2eb914d8b74bc52 100644 (file)
@@ -1452,7 +1452,7 @@ void OpenboxWindow::iconify(void) {
 }
 
 
-void OpenboxWindow::deiconify(Bool reassoc, Bool raise) {
+void OpenboxWindow::deiconify(bool reassoc, bool raise, bool initial) {
   if (flags.iconic || reassoc)
     screen->reassociateWindow(this, -1, False);
   else if (workspace_number != screen->getCurrentWorkspace()->getWorkspaceID())
@@ -1470,8 +1470,8 @@ void OpenboxWindow::deiconify(Bool reassoc, Bool raise) {
 
   // if we're using the click to place placement type, then immediately
   // after the window is mapped, we need to start interactively moving it
-  if (screen->placementPolicy() == BScreen::ClickMousePlacement &&
-      place_window && !(flags.iconic || reassoc)) {
+  if (initial && place_window &&
+      screen->placementPolicy() == BScreen::ClickMousePlacement) {
     // if the last window wasn't placed yet, or we're just moving a window
     // already, finish off that move cleanly
     OpenboxWindow *w = openbox.getFocusedWindow();
@@ -2243,7 +2243,8 @@ void OpenboxWindow::mapRequestEvent(XMapRequestEvent *re) {
     case InactiveState:
     case ZoomState:
     default:
-      deiconify(False);
+      deiconify(False, True, True);     // specify that we're initializing the
+                                        // window
       break;
     }
 
index 66a3049ea40072699648dcacdee7e23219cd6d81..fb988e234a1224b53320b8ee15f65aebe8c75e27 100644 (file)
@@ -321,7 +321,7 @@ public:
 
   void setFocusFlag(Bool);
   void iconify();
-  void deiconify(Bool reassoc = True, Bool raise = True);
+  void deiconify(bool reassoc = true, bool raise = true, bool initial = false);
   void close();
   void withdraw();
   void maximize(unsigned int button);
This page took 0.02574 seconds and 4 git commands to generate.