forked from AuroraMiddleware/gtk
64ab82c403
ImmIsIME() doesn't work (always returns TRUE) since Vista. Use ITfActiveLanguageProfileNotifySink to detect TSF changes, which are equal to IME changes for us. Also make sure that IMMultiContext re-loads the IM when keyboard layout changes, otherwise there's a subtle bug that could happen: * Run GTK application with non-IME layout (US, for example) * Focus on an editable widget (GtkEntry, for example) * IM Context is initialized to use the simple IM * Switch to an IME layout (such as Korean) * Start typing * Since IME module is not loaded yet, keypresses are handled by a default MS IME handler * Once IME commits a character, GDK will get a WM_KEYDOWN, which will trigger a GdkKeyEvent, which will be handled by an event filter in IM Context, which will finally re-evaluate its status and load IME, and only after that GTK will get to handle IME by itself - but by that point input would already be broken. To avoid this we can emit a dummy event (with Void keyval), which will cause IM Context to load the appropriate module immediately.
57 lines
1.4 KiB
Meson
57 lines
1.4 KiB
Meson
gdk_win32_sources = files([
|
|
'gdkcairocontext-win32.c',
|
|
'gdkcursor-win32.c',
|
|
'gdkclipboard-win32.c',
|
|
'gdkclipdrop-win32.c',
|
|
'gdkdevicemanager-win32.c',
|
|
'gdkdevice-virtual.c',
|
|
'gdkdevice-win32.c',
|
|
'gdkdevice-wintab.c',
|
|
'gdkdisplay-win32.c',
|
|
'gdkdisplaymanager-win32.c',
|
|
'gdkdrag-win32.c',
|
|
'gdkdrop-win32.c',
|
|
'gdkevents-win32.c',
|
|
'gdkgeometry-win32.c',
|
|
'gdkglcontext-win32.c',
|
|
'gdkglobals-win32.c',
|
|
'gdkhdataoutputstream-win32.c',
|
|
'gdkkeys-win32.c',
|
|
'gdkwin32langnotification.c',
|
|
'gdkmain-win32.c',
|
|
'gdkmonitor-win32.c',
|
|
'gdkproperty-win32.c',
|
|
'gdkscreen-win32.c',
|
|
'gdkvulkancontext-win32.c',
|
|
'gdkwin32cursor.h',
|
|
'gdkwin32display.h',
|
|
'gdkwin32id.c',
|
|
'gdksurface-win32.c',
|
|
])
|
|
|
|
gdk_win32_public_headers = files([
|
|
'gdkwin32cursor.h',
|
|
'gdkwin32display.h',
|
|
'gdkwin32displaymanager.h',
|
|
'gdkwin32dnd.h',
|
|
'gdkwin32glcontext.h',
|
|
'gdkwin32keys.h',
|
|
'gdkwin32misc.h',
|
|
'gdkwin32monitor.h',
|
|
'gdkwin32screen.h',
|
|
'gdkwin32surface.h',
|
|
])
|
|
|
|
install_headers(gdk_win32_public_headers, subdir: 'gtk-4.0/gdk/win32/')
|
|
install_headers('gdkwin32.h', subdir: 'gtk-4.0/gdk/')
|
|
|
|
gdk_win32_deps = [ # FIXME
|
|
pangowin32_dep
|
|
]
|
|
|
|
libgdk_win32 = static_library('gdk-win32',
|
|
gdk_win32_sources, gdkconfig, gdkenum_h,
|
|
include_directories: [confinc, gdkinc],
|
|
c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', '-DINSIDE_GDK_WIN32'],
|
|
dependencies: [gdk_deps, gdk_win32_deps])
|