2014-04-16	Nicolas Setton  <setton@adacore.com>

	* gdk/win32/gdkwindow-win32.c: Call ShowWindow with SW_SHOW
	and SW_SHOWNA rather than SW_SHOWNORMAL and SW_SHOWNOACTIVATE,
	so as not to minimize the window if it is "Aero Snapped".
	For N312-023.

	This has been reported under:
	 https://bugzilla.gnome.org/show_bug.cgi?id=698652

2013-10-11	Nicolas Setton  <setton@adacore.com>

	* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Invalidate
	the whole bin window after scrolling, to avoid incomplete redraw
	artifacts.

	Not to be ported: this is already implemented (differently) in
	the head version of Gtk+.

2013-10-10	Raphael Amiard  <amiard@adacore.com>

	* gtk/gtktextview.c (gtk_text_view_drag_end): Implement.

2013-10-10	Nicolas Setton  <setton@adacore.com>

	* gtk/gtkdnd.c: Remove hard-coded draw of the drop rectangle, which
	is not removed under Windows.

2013-09-23	Arnaud Charlet	<charlet@adacore.com>

	* gdk/win32/gdkevents-win32.c (handle_wm_paint): Force an update when
	paint message is received, otherwise windows in background are not
	immediately refreshed when moving a modal window on top of them.

2013-09-19	Nicolas Setton	<setton@adacore.com>

	* gtk/gtkimcontextsimple.c (check_win32_special_cases): Fix handling
	of special cases for dead acute and dead diaeresis under Win32. For
	these characters followed by a space, emit an apostrophe and double
	quotes respectively.
	Submitted at https://bugzilla.gnome.org/show_bug.cgi?id=655357

2013-09-19	Nicolas Setton	<setton@adacore.com>

	* gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress): Do not
	discard key events with state CTRL + ALT, as some keyboards do use this
	key combination for legitimate character input.
	* gdkevents-win32.c(build_key_event_state): Detect CTRL + ALT as an
	equivalent group to ALT_GR.
	For K517-001.

2013-09-19  Raphael Amiard  <amiard@adacore.com>

   * gdk/win32/gdkdevice-win32.c (gdk_device_win32_query_state) : Apply 
   _gdk_offset_x/y offsets to the root_x/y variables so that they become
   absolute relative to the origin in  the virtual desktop space rather than 
   relative to the main monitor

--- gdk/win32/gdkdevice-win32.orig.c	2013-09-20 14:38:56.083718500 +0200
+++ gdk/win32/gdkdevice-win32.c	2013-09-20 14:39:50.373823700 +0200
@@ -187,10 +187,10 @@ gdk_device_win32_query_state (GdkDevice
   GetCursorPos (&point);
 
   if (root_x)
-    *root_x = point.x;
+    *root_x = point.x + _gdk_offset_x;
 
   if (root_y)
-    *root_y = point.y;
+    *root_y = point.y + _gdk_offset_y;
 
   ScreenToClient (hwnd, &point);

2013-09-19  Raphael Amiard  <amiard@adacore.com>

   * gtk/gtkmenu.c (gtk_menu_position) : If a position func was supplied,
     always re-get the monitor after it has been applied to the coordinates

--- gtk/gtkmenu.c.orig	2013-09-19 17:49:38.172727600 +0200
+++ gtk/gtkmenu.c	2013-08-30 13:08:29.000000000 +0200
@@ -4601,8 +4601,7 @@ gtk_menu_position (GtkMenu  *menu,
       (* priv->position_func) (menu, &x, &y, &priv->initially_pushed_in,
                                priv->position_func_data);
 
-      if (priv->monitor_num < 0)
-        priv->monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
+      priv->monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
 
       gdk_screen_get_monitor_workarea (screen, priv->monitor_num, &monitor);
     }

2012-04-20	Nicolas Setton  <setton@adacore.com>

	* gtk/gtkapplicationwindow.c: GDesktopApplication is not defined under
	Windows, do not use it.

	To be submitted.

2011-11-17	Nicolas Setton  <setton@adacore.com>

	* gdk/win32/gdkdnd-win32.c (resolve_link): Deactivate resolving of
	dnd links for now, since CLSID_ShellLink and IID_IShellLinkW are
	not found at link time for an unknown reason.
	To be investigated.

--- gdk/win32/gdkdnd-win32.c.orig	2011-11-17 14:59:18.578125000 +0100
+++ gdk/win32/gdkdnd-win32.c	2011-11-17 15:42:47.875000000 +0100
@@ -1342,6 +1342,7 @@ resolve_link (HWND     hWnd,
    * assumed that CoInitialize has been called.
    */
 
+#if 0
   hr = CoCreateInstance (&CLSID_ShellLink,
 			 NULL,
 			 CLSCTX_INPROC_SERVER,
@@ -1388,6 +1389,8 @@ resolve_link (HWND     hWnd,
     pslW->lpVtbl->Release (pslW);
 
   return SUCCEEDED (hr);
+#endif
+  return FALSE;
 }
 
 #if 0
--- gtk/gtkapplicationwindow.c.orig	2012-04-20 15:26:50.203250000 +0200
+++ gtk/gtkapplicationwindow.c	2012-04-20 15:30:48.234500000 +0200
@@ -273,6 +273,7 @@
     }
   else
     {
+#ifdef HAVE_GIO_UNIX
       /* the shell does not show it, so make sure we show it */
       if (g_menu_model_get_n_items (G_MENU_MODEL (window->priv->app_menu_section)) == 0)
         {
@@ -311,6 +312,7 @@
               g_clear_object (&app_info);
             }
         }
+#endif
     }
 }
 
--- gtk/gtkimcontextsimple.c.orig	2012-02-07 11:41:01.000000000 +0100
+++ gtk/gtkimcontextsimple.c	2012-02-07 11:43:28.000000000 +0100
@@ -877,7 +877,11 @@ gtk_im_context_simple_filter_keypress (G
 	    event->keyval == GDK_ISO_Enter ||
 	    event->keyval == GDK_KP_Enter)))
 	{
-	  return FALSE;
+	  if ((event->state & GDK_MOD1_MASK) &&
+	      (event->state & GDK_CONTROL_MASK))
+	    return no_sequence_matches (context_simple, n_compose, event);
+	  else
+	    return FALSE;
 	}
     }
   
*** gdk/win32/gdkevents-win32.c.orig	2012-01-06 16:46:38.000000000 +0100
--- gdk/win32/gdkevents-win32.c	2012-01-06 16:47:13.000000000 +0100
***************
*** 671,676 ****
--- 671,679 ----
  	event->key.state |= GDK_CONTROL_MASK;
        if (key_state[VK_MENU] & 0x80)
  	event->key.state |= GDK_MOD1_MASK;
+ 
+       if ((key_state[VK_CONTROL] & 0x80) && (key_state[VK_MENU] & 0x80))
+         event->key.group = 1;
      }
  }
  
--- gtk/gtkimcontextsimple.c.orig	2013-09-20 15:29:52.468750000 -0400
+++ gtk/gtkimcontextsimple.c	2013-09-20 15:30:27.703125000 -0400
@@ -327,9 +327,9 @@ check_win32_special_cases (GtkIMContextS
       switch (priv->compose_buffer[0])
 	{
 	case GDK_KEY_dead_acute:
-	  value = 0x00B4; break;
+	  value = 0x0027; break;
 	case GDK_KEY_dead_diaeresis:
-	  value = 0x00A8; break;
+	  value = 0x0022; break;
 	}
       if (value > 0)
 	{
--- gdk/win32/gdkevents-win32.c.old	2009-12-22 12:37:10.468370000 +0100
+++ gdk/win32/gdkevents-win32.c	2010-01-06 17:04:42.923000000 +0100
@@ -1692,6 +1692,12 @@ handle_wm_paint (MSG        *msg,
     _gdk_window_invalidate_for_expose (window, update_region);
   gdk_region_destroy (update_region);
 
+  /* Force a process_updates to refresh visible windows
+   * when receiving a paint message. */
+
+  if (!GDK_WINDOW_DESTROYED (window) && gdk_window_is_visible (window))
+    gdk_window_process_updates (window, FALSE);
+
   DeleteObject (hrgn);
 }

--- gtk/gtktextview.c.orig	2013-10-10 10:13:42.390625000 -0400
+++ gtk/gtktextview.c	2013-10-10 10:14:38.000000000 -0400
@@ -7366,6 +7366,21 @@ static void
 gtk_text_view_drag_end (GtkWidget        *widget,
                         GdkDragContext   *context)
 {
+  GtkTextView *text_view;
+  GtkTextViewPrivate *priv;
+
+  text_view = GTK_TEXT_VIEW (widget);
+  priv = text_view->priv;
+
+  gtk_text_mark_set_visible (priv->dnd_mark, FALSE);
+
+  if (priv->dnd_device)
+    priv->dnd_device = NULL;
+
+  if (priv->scroll_timeout != 0)
+    g_source_remove (priv->scroll_timeout);
+
+  priv->scroll_timeout = 0;
 }
 
 static void
--- gtk/gtkdnd.c.orig	2013-10-10 11:10:17.671875000 -0400
+++ gtk/gtkdnd.c	2013-10-10 11:11:40.234375000 -0400
@@ -1255,14 +1255,6 @@ gtk_drag_highlight_draw (GtkWidget *widg
   gtk_render_frame (context, cr, 0, 0, width, height);
 
   gtk_style_context_restore (context);
-
-  cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); /* black */
-  cairo_set_line_width (cr, 1.0);
-  cairo_rectangle (cr,
-                   0.5, 0.5,
-                   width - 1, height - 1);
-  cairo_stroke (cr);
-
   return FALSE;
 }
 
--- gtk/gtktreeview.c.orig	2013-10-11 14:26:33.203125000 -0400
+++ gtk/gtktreeview.c	2013-10-11 15:12:38.828125000 -0400
@@ -11244,6 +11244,16 @@ gtk_tree_view_adjustment_changed (GtkAdj
 	}
       gdk_window_scroll (tree_view->priv->bin_window, 0, dy);
 
+      {
+	GdkRectangle area;
+
+	area.x = 0;
+	area.y = 0;
+	area.width = gdk_window_get_width (tree_view->priv->bin_window);
+	area.height = gdk_window_get_height (tree_view->priv->bin_window);
+	gdk_window_invalidate_rect (tree_view->priv->bin_window, &area, FALSE);
+      }
+      
       if (tree_view->priv->dy != (int) gtk_adjustment_get_value (tree_view->priv->vadjustment))
         {
           /* update our dy and top_row */
--- gdk/win32/gdkwindow-win32.c.orig	2014-04-16 17:00:54.502800000 -0400
+++ gdk/win32/gdkwindow-win32.c	2014-04-16 17:10:59.049600000 -0400
@@ -1128,15 +1128,15 @@
       if (focus_on_map)
 	ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
       else
-	ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
+	ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
     }
   else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || !focus_on_map)
     {
-      ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
+      ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNA);
     }
   else
     {
-      ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
+      ShowWindow (GDK_WINDOW_HWND (window), SW_SHOW);
     }
 
   /* Sync STATE_ABOVE to TOPMOST */
@@ -3024,7 +3024,7 @@
   if (window->state & GDK_WINDOW_STATE_MAXIMIZED)
     ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWMAXIMIZED);
   else
-    ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
+    ShowWindow (GDK_WINDOW_HWND (window), SW_SHOW);
   SetFocus (GDK_WINDOW_HWND (window));
 }
 
