Author: cazfi
Date: Mon May 16 16:47:19 2016
New Revision: 32726

URL: http://svn.gna.org/viewcvs/freeciv?rev=32726&view=rev
Log:
Corrected placement for variable declaration in gtk3-client 
create_line_at_mouse_pos()

See patch #7206

Modified:
    branches/S2_5/client/gui-gtk-3.0/mapctrl.c
    branches/S2_5/client/gui-qt/mapctrl.cpp
    branches/S2_5/client/gui-stub/mapctrl.c
    branches/S2_5/client/gui-xaw/mapctrl.c

Modified: branches/S2_5/client/gui-gtk-3.0/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/mapctrl.c?rev=32726&r1=32725&r2=32726&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-3.0/mapctrl.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/mapctrl.c  Mon May 16 16:47:19 2016
@@ -352,14 +352,16 @@
 void create_line_at_mouse_pos(void)
 {
   int x, y;
+  GdkWindow *window;
   GdkDeviceManager *manager =
       gdk_display_get_device_manager(gtk_widget_get_display(toplevel));
   GdkDevice *pointer = gdk_device_manager_get_client_pointer(manager);
+
   if (!pointer) {
     return;
   }
 
-  GdkWindow *window = gdk_device_get_window_at_position(pointer, &x, &y);
+  window = gdk_device_get_window_at_position(pointer, &x, &y);
   if (window) {
     if (window == gtk_widget_get_window(map_canvas)) {
       update_line(x, y);

Modified: branches/S2_5/client/gui-qt/mapctrl.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/mapctrl.cpp?rev=32726&r1=32725&r2=32726&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/mapctrl.cpp     (original)
+++ branches/S2_5/client/gui-qt/mapctrl.cpp     Mon May 16 16:47:19 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -79,6 +79,7 @@
 {
   QPoint global_pos, local_pos;
   int x, y;
+
   global_pos = QCursor::pos();
   local_pos = gui()->mapview_wdg->mapFromGlobal(global_pos);
   x = local_pos.x();

Modified: branches/S2_5/client/gui-stub/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-stub/mapctrl.c?rev=32726&r1=32725&r2=32726&view=diff
==============================================================================
--- branches/S2_5/client/gui-stub/mapctrl.c     (original)
+++ branches/S2_5/client/gui-stub/mapctrl.c     Mon May 16 16:47:19 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

Modified: branches/S2_5/client/gui-xaw/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-xaw/mapctrl.c?rev=32726&r1=32725&r2=32726&view=diff
==============================================================================
--- branches/S2_5/client/gui-xaw/mapctrl.c      (original)
+++ branches/S2_5/client/gui-xaw/mapctrl.c      Mon May 16 16:47:19 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -222,7 +222,7 @@
 }
 
 /**************************************************************************
-...
+  Update goto line so that destination is at current mouse pointer location.
 **************************************************************************/
 void create_line_at_mouse_pos(void)
 {
@@ -233,10 +233,10 @@
 
   on_same_screen =
     XQueryPointer(display, XtWindow(map_canvas),
-                 &root, &child,
-                 &rx, &ry,
-                 &x, &y,
-                 &mask);
+                  &root, &child,
+                  &rx, &ry,
+                  &x, &y,
+                  &mask);
 
   if (on_same_screen) {
     update_line(x, y);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to