From be1fdf59bb80f963a4f97bfab49f59aca8d73d70 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Wed, 6 Apr 2016 17:22:02 +0300 Subject: GUI: When dialogs gain focus, inform them of the current mouse position Previously, they only reacted to the mouse position once it was moved. This meant that if the cursor was on a button that just gained focus, it did not highlight. Fixes #7101. --- gui/dialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/dialog.h') diff --git a/gui/dialog.h b/gui/dialog.h index 593ee13458..0e06effabd 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -82,7 +82,7 @@ public: virtual void reflowLayout(); virtual void lostFocus(); - virtual void receivedFocus() {} + virtual void receivedFocus(int x = -1, int y = -1) { if (x >= 0 && y >= 0) handleMouseMoved(x, y, 0); } protected: virtual void open(); -- cgit v1.2.3