+2004-09-03 Tor Lillqvist <tml@iki.fi>
+
+ * gtk-zip.sh.in: List the three theme gtkrc files separately, zip
+ doesn't do anything if one of the files on its command line
+ doesn't exist.
+
+ Handle changes of screen resolution on Win32. (#151581, reported by
+ Arjohn Kampman)
+
+ * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_init,
+ _gdk_root_window_size_init): Factor out setting the root window's
+ size (as the size of the union of all monitors) to a new function.
+
+ * gdk/win32/gdkdisplay-win32.c (gdk_display_open,
+ _gdk_monitor_init): Factor out the monitor query to a new
+ function.
+
+ * gdk/win32/gdkprivate-win32.h: Declare above new functions.
+
+ * gdk/win32/gdkevents-win32.c (gdk_event_translate,
+ handle_display_change): Handle WM_DISPLAYCHANGE by calling the
+ above two functions, and emitting the "size_changed" signal on our
+ (only) GdkScreen.
+
2004-09-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_popup_accessible):
2004-08-28 Robert Ögren <gtk@roboros.com>
On Win32, do not produce tablet motion or button events while a
- window is being moved or resized. (#151090, reported by Shaneyfelt)
+ window is being moved or resized. (#151090, reported by Shaneyfelt)
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c
+2004-09-03 Tor Lillqvist <tml@iki.fi>
+
+ * gtk-zip.sh.in: List the three theme gtkrc files separately, zip
+ doesn't do anything if one of the files on its command line
+ doesn't exist.
+
+ Handle changes of screen resolution on Win32. (#151581, reported by
+ Arjohn Kampman)
+
+ * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_init,
+ _gdk_root_window_size_init): Factor out setting the root window's
+ size (as the size of the union of all monitors) to a new function.
+
+ * gdk/win32/gdkdisplay-win32.c (gdk_display_open,
+ _gdk_monitor_init): Factor out the monitor query to a new
+ function.
+
+ * gdk/win32/gdkprivate-win32.h: Declare above new functions.
+
+ * gdk/win32/gdkevents-win32.c (gdk_event_translate,
+ handle_display_change): Handle WM_DISPLAYCHANGE by calling the
+ above two functions, and emitting the "size_changed" signal on our
+ (only) GdkScreen.
+
2004-09-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_popup_accessible):
2004-08-28 Robert Ögren <gtk@roboros.com>
On Win32, do not produce tablet motion or button events while a
- window is being moved or resized. (#151090, reported by Shaneyfelt)
+ window is being moved or resized. (#151090, reported by Shaneyfelt)
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c
+2004-09-03 Tor Lillqvist <tml@iki.fi>
+
+ * gtk-zip.sh.in: List the three theme gtkrc files separately, zip
+ doesn't do anything if one of the files on its command line
+ doesn't exist.
+
+ Handle changes of screen resolution on Win32. (#151581, reported by
+ Arjohn Kampman)
+
+ * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_init,
+ _gdk_root_window_size_init): Factor out setting the root window's
+ size (as the size of the union of all monitors) to a new function.
+
+ * gdk/win32/gdkdisplay-win32.c (gdk_display_open,
+ _gdk_monitor_init): Factor out the monitor query to a new
+ function.
+
+ * gdk/win32/gdkprivate-win32.h: Declare above new functions.
+
+ * gdk/win32/gdkevents-win32.c (gdk_event_translate,
+ handle_display_change): Handle WM_DISPLAYCHANGE by calling the
+ above two functions, and emitting the "size_changed" signal on our
+ (only) GdkScreen.
+
2004-09-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_popup_accessible):
2004-08-28 Robert Ögren <gtk@roboros.com>
On Win32, do not produce tablet motion or button events while a
- window is being moved or resized. (#151090, reported by Shaneyfelt)
+ window is being moved or resized. (#151090, reported by Shaneyfelt)
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c
+2004-09-03 Tor Lillqvist <tml@iki.fi>
+
+ * gtk-zip.sh.in: List the three theme gtkrc files separately, zip
+ doesn't do anything if one of the files on its command line
+ doesn't exist.
+
+ Handle changes of screen resolution on Win32. (#151581, reported by
+ Arjohn Kampman)
+
+ * gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_init,
+ _gdk_root_window_size_init): Factor out setting the root window's
+ size (as the size of the union of all monitors) to a new function.
+
+ * gdk/win32/gdkdisplay-win32.c (gdk_display_open,
+ _gdk_monitor_init): Factor out the monitor query to a new
+ function.
+
+ * gdk/win32/gdkprivate-win32.h: Declare above new functions.
+
+ * gdk/win32/gdkevents-win32.c (gdk_event_translate,
+ handle_display_change): Handle WM_DISPLAYCHANGE by calling the
+ above two functions, and emitting the "size_changed" signal on our
+ (only) GdkScreen.
+
2004-09-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_get_popup_accessible):
2004-08-28 Robert Ögren <gtk@roboros.com>
On Win32, do not produce tablet motion or button events while a
- window is being moved or resized. (#151090, reported by Shaneyfelt)
+ window is being moved or resized. (#151090, reported by Shaneyfelt)
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c
}
#endif /* HAVE_MONITOR_INFO */
-GdkDisplay *
-gdk_display_open (const gchar *display_name)
+void
+_gdk_monitor_init (void)
{
- HMODULE user32;
-
- if (_gdk_display != NULL)
- return NULL; /* single display only */
+#ifdef HAVE_MONITOR_INFO
+ static HMODULE user32 = NULL;
- _gdk_display = g_object_new (GDK_TYPE_DISPLAY, NULL);
- _gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
+ if (user32 == NULL)
+ {
+ user32 = GetModuleHandle ("user32.dll");
-#ifdef HAVE_MONITOR_INFO
- user32 = GetModuleHandle ("user32.dll");
- g_assert (user32 != NULL);
+ g_assert (user32 != NULL);
- p_EnumDisplayMonitors = (t_EnumDisplayMonitors) GetProcAddress (user32, "EnumDisplayMonitors");
- p_GetMonitorInfoA = (t_GetMonitorInfoA) GetProcAddress (user32, "GetMonitorInfoA");
+ p_EnumDisplayMonitors = (t_EnumDisplayMonitors) GetProcAddress (user32, "EnumDisplayMonitors");
+ p_GetMonitorInfoA = (t_GetMonitorInfoA) GetProcAddress (user32, "GetMonitorInfoA");
+ }
if (p_EnumDisplayMonitors != NULL && p_GetMonitorInfoA != NULL)
{
(*p_EnumDisplayMonitors) (NULL, NULL, count_monitor, (LPARAM) &_gdk_num_monitors);
- _gdk_monitors = g_new (GdkRectangle, _gdk_num_monitors);
+ _gdk_monitors = g_renew (GdkRectangle, _gdk_monitors, _gdk_num_monitors);
+
index = 0;
(*p_EnumDisplayMonitors) (NULL, NULL, enum_monitor, (LPARAM) &index);
-#if 1
+
_gdk_offset_x = G_MININT;
_gdk_offset_y = G_MININT;
_gdk_monitors[i].height,
_gdk_monitors[i].x, _gdk_monitors[i].y));
}
-#endif
}
else
#endif /* HAVE_MONITOR_INFO */
unsigned int width, height;
_gdk_num_monitors = 1;
- _gdk_monitors = g_new (GdkRectangle, 1);
+ _gdk_monitors = g_renew (GdkRectangle, _gdk_monitors, 1);
width = GetSystemMetrics (SM_CXSCREEN);
height = GetSystemMetrics (SM_CYSCREEN);
_gdk_offset_y = 0;
}
+}
+
+GdkDisplay *
+gdk_display_open (const gchar *display_name)
+{
+ if (_gdk_display != NULL)
+ return NULL; /* single display only */
+
+ _gdk_display = g_object_new (GDK_TYPE_DISPLAY, NULL);
+ _gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
+
+ _gdk_monitor_init ();
_gdk_visual_init ();
gdk_screen_set_default_colormap (_gdk_screen,
gdk_screen_get_system_colormap (_gdk_screen));
handle_stuff_while_moving_or_resizing ();
}
+static void
+handle_display_change (void)
+{
+ _gdk_monitor_init ();
+ _gdk_root_window_size_init ();
+ g_signal_emit_by_name (_gdk_screen, "size_changed");
+}
+
static gboolean
gdk_event_translate (GdkDisplay *display,
MSG *msg,
return_val = TRUE;
break;
+ case WM_DISPLAYCHANGE:
+ handle_display_change ();
+ break;
+
+
#ifdef HAVE_WINTAB
/* Handle WINTAB events here, as we know that gdkinput.c will
* use the fixed WT_DEFBASE as lcMsgBase, and we thus can use the
GdkWindow *_gdk_parent_root = NULL;
gint _gdk_num_monitors;
-GdkRectangle *_gdk_monitors;
+GdkRectangle *_gdk_monitors = NULL;
gint _gdk_offset_x, _gdk_offset_y;
/* Initialization */
void _gdk_windowing_window_init (void);
+void _gdk_root_window_size_init (void);
+void _gdk_monitor_init(void);
void _gdk_visual_init (void);
void _gdk_dnd_init (void);
void _gdk_windowing_image_init (void);
return gdk_region_rectangle (&result_rect);
}
+void
+_gdk_root_window_size_init (void)
+{
+ GdkWindowImplWin32 *impl;
+ GdkRectangle rect;
+ int i;
+
+ impl = GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) _gdk_parent_root)->impl);
+ rect = _gdk_monitors[0];
+ for (i = 1; i < _gdk_num_monitors; i++)
+ gdk_rectangle_union (&rect, _gdk_monitors+i, &rect);
+
+ impl->width = rect.width;
+ impl->height = rect.height;
+}
+
void
_gdk_windowing_window_init (void)
{
GdkWindowObject *private;
- GdkWindowImplWin32 *impl;
GdkDrawableImplWin32 *draw_impl;
- GdkRectangle rect;
- gint i;
g_assert (_gdk_parent_root == NULL);
_gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL);
private = (GdkWindowObject *)_gdk_parent_root;
- impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
draw_impl = GDK_DRAWABLE_IMPL_WIN32 (private->impl);
draw_impl->handle = _gdk_root_window;
private->window_type = GDK_WINDOW_ROOT;
private->depth = gdk_visual_get_system ()->depth;
- rect = _gdk_monitors[0];
- for (i = 1; i < _gdk_num_monitors; i++)
- gdk_rectangle_union (&rect, _gdk_monitors+i, &rect);
-
- impl->width = rect.width;
- impl->height = rect.height;
-
+ _gdk_root_window_size_init ();
+
_gdk_window_init_position (GDK_WINDOW (private));
gdk_win32_handle_table_insert (&_gdk_root_window, _gdk_parent_root);
zip $ZIP lib/gtk-2.0/@GTK_BINARY_VERSION@/loaders/*.dll lib/gtk-2.0/@GTK_BINARY_VERSION@/immodules/*.dll
-zip $ZIP share/themes/{Default,Emacs}/gtk-2.0{,-key}/gtkrc
+zip $ZIP share/themes/Default/gtk-2.0/gtkrc
+zip $ZIP share/themes/Default/gtk-2.0-key/gtkrc
+zip $ZIP share/themes/Emacs/gtk-2.0-key/gtkrc
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo