Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2006:
[Freeciv-Dev] (PR#15472) Borders drawn incorrectly in SDL client
Home

[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]
To: Martin.Gerdes@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#15472) Borders drawn incorrectly in SDL client
From: "Christian Prochaska" <cp.ml.freeciv.dev@xxxxxxxxxxxxxx>
Date: Wed, 8 Feb 2006 17:22:36 -0800
Reply-to: bugs@xxxxxxxxxxx

<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);
   }

[Prev in Thread] Current Thread [Next in Thread]