]> Pileus Git - ~andy/gtk/commit
Cache the display name. There is only one GdkDisplay on Win32, and
authorTor Lillqvist <tml@novell.com>
Thu, 8 Sep 2005 22:45:40 +0000 (22:45 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 8 Sep 2005 22:45:40 +0000 (22:45 +0000)
commit0905c73a886d665d0c046b75ab78ef923708ea31
tree5b26875593edc933e43a5edb30f93b58e2aa47ef
parent93bb0e924882c100d9aca9e3ee32ae2d8a498490
Cache the display name. There is only one GdkDisplay on Win32, and

2005-09-09  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
display name. There is only one GdkDisplay on Win32, and
constructing the display name isn't entirely trivial, so cacheing
is probably worth it. For instance GIMP calls this function a lot.
(gdk_display_open): Call gdk_display_get_name() to prime the
cached name.
(gdk_display_get_n_screens, gdk_display_get_screen,
gdk_display_get_default_screen): Verify parameter correctness like
the X11 backend does.

* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
Return a freshly allocated string, as the API specifies. Fixes a
heap corruption problem that caused random errors and crashes in
GIMP, for instance.
ChangeLog
ChangeLog.pre-2-10
gdk/win32/gdkdisplay-win32.c
gdk/win32/gdkscreen-win32.c