Author: cazfi
Date: Wed May 11 15:20:59 2016
New Revision: 32667

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

See patch #7206

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

Modified: branches/S2_6/client/gui-gtk-3.0/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/mapctrl.c?rev=32667&r1=32666&r2=32667&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/mapctrl.c  (original)
+++ branches/S2_6/client/gui-gtk-3.0/mapctrl.c  Wed May 11 15:20:59 2016
@@ -356,14 +356,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_6/client/gui-qt/mapctrl.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/mapctrl.cpp?rev=32667&r1=32666&r2=32667&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/mapctrl.cpp     (original)
+++ branches/S2_6/client/gui-qt/mapctrl.cpp     Wed May 11 15:20:59 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
@@ -82,6 +82,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_6/client/gui-stub/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-stub/mapctrl.c?rev=32667&r1=32666&r2=32667&view=diff
==============================================================================
--- branches/S2_6/client/gui-stub/mapctrl.c     (original)
+++ branches/S2_6/client/gui-stub/mapctrl.c     Wed May 11 15:20:59 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_6/client/gui-xaw/mapctrl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-xaw/mapctrl.c?rev=32667&r1=32666&r2=32667&view=diff
==============================================================================
--- branches/S2_6/client/gui-xaw/mapctrl.c      (original)
+++ branches/S2_6/client/gui-xaw/mapctrl.c      Wed May 11 15:20:59 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