Browse Source

fix windows were draggable on the close button

Kolja Strohm 1 year ago
parent
commit
091eced9e5
2 changed files with 30 additions and 25 deletions
  1. 29 24
      Fenster.cpp
  2. 1 1
      Fortschritt.h

+ 29 - 24
Fenster.cpp

@@ -1103,6 +1103,11 @@ Fenster::~Fenster()
 
 void Fenster::doMausEreignis(MausEreignis& me, bool userRet)
 {
+    if (me.id == ME_Leaves)
+    {
+        if (closeKlick != 0) rend = 1;
+        closeKlick = 0, klick = 0;
+    }
     if (hatStyleNicht(Style::Sichtbar) || !me.insideParent || me.verarbeitet
         || me.mx < 0 || me.my < 0 || me.mx >= gr.x || me.my >= gr.y || !userRet)
     {
@@ -1320,30 +1325,6 @@ void Fenster::doMausEreignis(MausEreignis& me, bool userRet)
         return;
     if (!me.verarbeitet)
     {
-        if (me.id == ME_PLinks)
-        {
-            klick = 1;
-            mx = me.mx, my = me.my;
-            if (me.mx >= 0 && me.mx < gr.x && me.my >= 0 && me.my < rbr + 5
-                && !hatStyle(Style::TopPositionFixed))
-                moving |= 0x1;
-            if (me.mx >= 0 && me.mx < gr.x && me.my >= gr.y - (rbr + 5)
-                && me.my < gr.y && !hatStyle(Style::BottomPositionFixed))
-                moving |= 0x2;
-            if (me.mx >= 0 && me.mx < rbr + 5 && me.my >= 0 && me.my < gr.y
-                && !hatStyle(Style::LeftPositionFixed))
-                moving |= 0x4;
-            if (me.mx >= gr.x - rbr - 5 && me.mx < gr.x && me.my >= 0
-                && me.my < gr.y && !hatStyle(Style::RightPositionFixed))
-                moving |= 0x8;
-            if (titel && me.mx >= 0 && me.mx < gr.x
-                && me.my >= titel->getHeight()
-                && me.my < titel->getHeight() + 2 * (rbr + 5))
-                moving |= 0x10;
-            if (titel && me.mx >= 0 && me.mx < gr.x && me.my >= rbr + 5
-                && me.my < titel->getHeight())
-                moving |= 0x20;
-        }
         if (hatStyle(Style::Closable) && me.my <= th + rbr
             && me.mx >= gr.x + rbr - th && me.my >= rbr && me.mx <= gr.x - rbr)
         {
@@ -1367,6 +1348,30 @@ void Fenster::doMausEreignis(MausEreignis& me, bool userRet)
             closeKlick = 0;
             rend = 1;
         }
+        if (me.id == ME_PLinks && !closeKlick)
+        {
+            klick = 1;
+            mx = me.mx, my = me.my;
+            if (me.mx >= 0 && me.mx < gr.x && me.my >= 0 && me.my < rbr + 5
+                && !hatStyle(Style::TopPositionFixed))
+                moving |= 0x1;
+            if (me.mx >= 0 && me.mx < gr.x && me.my >= gr.y - (rbr + 5)
+                && me.my < gr.y && !hatStyle(Style::BottomPositionFixed))
+                moving |= 0x2;
+            if (me.mx >= 0 && me.mx < rbr + 5 && me.my >= 0 && me.my < gr.y
+                && !hatStyle(Style::LeftPositionFixed))
+                moving |= 0x4;
+            if (me.mx >= gr.x - rbr - 5 && me.mx < gr.x && me.my >= 0
+                && me.my < gr.y && !hatStyle(Style::RightPositionFixed))
+                moving |= 0x8;
+            if (titel && me.mx >= 0 && me.mx < gr.x
+                && me.my >= titel->getHeight()
+                && me.my < titel->getHeight() + 2 * (rbr + 5))
+                moving |= 0x10;
+            if (titel && me.mx >= 0 && me.mx < gr.x && me.my >= rbr + 5
+                && me.my < titel->getHeight())
+                moving |= 0x20;
+        }
     }
     if (members)
     {

+ 1 - 1
Fortschritt.h

@@ -55,7 +55,7 @@ namespace Framework
             // FBild, L_R, Prozent
             static const __int64 normal = Sichtbar | Rahmen | Hintergrund
                                         | HBild | FRahmen | FBild | L_R
-                                        | Prozent | Aktionen;
+                                        | Prozent | Aktionen | HBildScale;
         };
 
     private: