gdk: Add GDK_DISABLE=aerosnap
Disables the Aerosnap hook for Windows which is particularly useful when debugging because the aerosnap hook slows down keyboard input.
This commit is contained in:
@@ -358,6 +358,9 @@ disable certain features.
|
|||||||
`color-mgmt`
|
`color-mgmt`
|
||||||
: Disable color management
|
: Disable color management
|
||||||
|
|
||||||
|
`aerosnap`
|
||||||
|
: Disable Aerosnap support on Windows
|
||||||
|
|
||||||
### `GDK_GL_DISABLE`
|
### `GDK_GL_DISABLE`
|
||||||
|
|
||||||
This variable can be set to a list of values, which cause GDK to
|
This variable can be set to a list of values, which cause GDK to
|
||||||
|
@@ -158,6 +158,7 @@ static const GdkDebugKey gdk_feature_keys[] = {
|
|||||||
{ "dmabuf", GDK_FEATURE_DMABUF, "Disable dmabuf support" },
|
{ "dmabuf", GDK_FEATURE_DMABUF, "Disable dmabuf support" },
|
||||||
{ "offload", GDK_FEATURE_OFFLOAD, "Disable graphics offload" },
|
{ "offload", GDK_FEATURE_OFFLOAD, "Disable graphics offload" },
|
||||||
{ "color-mgmt", GDK_FEATURE_COLOR_MANAGEMENT, "Disable color management" },
|
{ "color-mgmt", GDK_FEATURE_COLOR_MANAGEMENT, "Disable color management" },
|
||||||
|
{ "aerosnap", GDK_FEATURE_AEROSNAP, "Disable Aerosnap support on Windows" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -64,6 +64,7 @@ typedef enum {
|
|||||||
GDK_FEATURE_DMABUF = 1 << 7,
|
GDK_FEATURE_DMABUF = 1 << 7,
|
||||||
GDK_FEATURE_OFFLOAD = 1 << 8,
|
GDK_FEATURE_OFFLOAD = 1 << 8,
|
||||||
GDK_FEATURE_COLOR_MANAGEMENT = 1 << 9,
|
GDK_FEATURE_COLOR_MANAGEMENT = 1 << 9,
|
||||||
|
GDK_FEATURE_AEROSNAP = 1 << 10,
|
||||||
} GdkFeatures;
|
} GdkFeatures;
|
||||||
|
|
||||||
#define GDK_ALL_FEATURES ((1 << 10) - 1)
|
#define GDK_ALL_FEATURES ((1 << 10) - 1)
|
||||||
|
@@ -391,6 +391,9 @@ set_up_low_level_keyboard_hook (GdkDisplay *display)
|
|||||||
{
|
{
|
||||||
HHOOK hook_handle;
|
HHOOK hook_handle;
|
||||||
|
|
||||||
|
if (!gdk_has_feature (GDK_FEATURE_AEROSNAP))
|
||||||
|
return;
|
||||||
|
|
||||||
if (GDK_WIN32_DISPLAY (display)->event_record->aerosnap_keyboard_hook != NULL)
|
if (GDK_WIN32_DISPLAY (display)->event_record->aerosnap_keyboard_hook != NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user