mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
GdkWin32: Remove _gdk_display_hdc global variable
This commit is contained in:
parent
8861d0eb53
commit
cbb3d3f177
@ -30,8 +30,6 @@
|
||||
GdkDisplay *_gdk_display = NULL;
|
||||
GdkDeviceManagerWin32 *_gdk_device_manager = NULL;
|
||||
|
||||
HDC _gdk_display_hdc;
|
||||
|
||||
int _gdk_input_ignore_core;
|
||||
|
||||
HKL _gdk_input_locale;
|
||||
|
@ -63,7 +63,6 @@ _gdk_win32_surfaceing_init (void)
|
||||
if (gdk_synchronize)
|
||||
GdiSetBatchLimit (1);
|
||||
|
||||
_gdk_display_hdc = CreateDC ("DISPLAY", NULL, NULL, NULL);
|
||||
_gdk_input_locale = GetKeyboardLayout (0);
|
||||
_gdk_win32_keymap_set_active_layout (win32_keymap, _gdk_input_locale);
|
||||
|
||||
|
@ -266,8 +266,6 @@ extern GdkDisplay *_gdk_display;
|
||||
|
||||
extern GdkDeviceManagerWin32 *_gdk_device_manager;
|
||||
|
||||
extern HDC _gdk_display_hdc;
|
||||
|
||||
extern int _gdk_input_ignore_core;
|
||||
|
||||
/* These are thread specific, but GDK/win32 works OK only when invoked
|
||||
|
@ -113,7 +113,15 @@ _gdk_win32_get_setting (const char *name,
|
||||
}
|
||||
else if (strcmp ("gtk-font-name", name) == 0)
|
||||
{
|
||||
char *font_name = _get_system_font_name (_gdk_display_hdc);
|
||||
char *font_name = NULL;
|
||||
HDC hdc = NULL;
|
||||
|
||||
if ((hdc = GetDC (HWND_DESKTOP)) != NULL)
|
||||
{
|
||||
font_name = _get_system_font_name (hdc);
|
||||
ReleaseDC (HWND_DESKTOP, hdc);
|
||||
hdc = NULL;
|
||||
}
|
||||
|
||||
if (font_name)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user