[Freeciv-Dev] (PR#15472) Borders drawn incorrectly in SDL client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15472 >
> [Martin.Gerdes@xxxxxxxxxxxxx - Mi 08. Feb 2006, 12:45:54]:
>
> -When selecting a unit from a list (because there is more than one
> unit on the same tile), it will activate the unit under the mouse
> cursor when clicking, if there is one.
>
Here's a patch.
Index: client/gui-sdl/gui_main.c
===================================================================
--- client/gui-sdl/gui_main.c (Revision 11553)
+++ client/gui-sdl/gui_main.c (Arbeitskopie)
@@ -318,7 +318,8 @@
static Uint16 main_mouse_button_up_handler(SDL_MouseButtonEvent *pButtonEvent,
void *pData)
{
- if (!MainWidgetListScaner(pButtonEvent->x, pButtonEvent->y)) {
+ if (button_behavior.button_down_ticks /* button wasn't pressed over a widget
*/
+ && !MainWidgetListScaner(pButtonEvent->x, pButtonEvent->y)) {
*button_behavior.event = *pButtonEvent;
button_up_on_map(&button_behavior);
}
|
|