File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
libs/s25main/ingameWindows Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -212,8 +212,6 @@ bool IngameWindow::Msg_LeftDown(const MouseCoords& mc)
212212
213213bool IngameWindow::Msg_LeftUp (const MouseCoords& mc)
214214{
215- // Was a button pressed
216- bool btnClicked = false ;
217215 isMoving = false ;
218216
219217 for (const auto btn : helpers::enumRange<IwButton>())
@@ -230,7 +228,6 @@ bool IngameWindow::Msg_LeftUp(const MouseCoords& mc)
230228
231229 if (IsPointInRect (mc.pos , GetButtonBounds (btn)))
232230 {
233- btnClicked = true ;
234231 switch (btn)
235232 {
236233 case IwButton::Close: Close (); return true ;
@@ -257,9 +254,10 @@ bool IngameWindow::Msg_LeftUp(const MouseCoords& mc)
257254 }
258255 }
259256
260- // On touch devices dblclick close window
261- if (VIDEODRIVER.IsTouch () && mc.dbl_click && !btnClicked && ! IsPinned () && closeBehavior_ == CloseBehavior::Regular )
257+ // On touch devices dblclick closes window
258+ if (VIDEODRIVER.IsTouch () && mc.dbl_click && closeBehavior_ != CloseBehavior::Custom )
262259 Close ();
260+ return false ;
263261}
264262
265263bool IngameWindow::Msg_MouseMove (const MouseCoords& mc)
You can’t perform that action at this time.
0 commit comments