Compare commits
18 Commits
3.24.31
...
wip/Jehan/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72585ace43 | ||
|
|
cae257c9dc | ||
|
|
8fe3e09cfc | ||
|
|
8352dee082 | ||
|
|
cbd9715c3c | ||
|
|
0ac6144369 | ||
|
|
e6e4f9e630 | ||
|
|
1ce49e48b2 | ||
|
|
7f295eeb32 | ||
|
|
aa89959942 | ||
|
|
bae1a43710 | ||
|
|
a4b522f6d7 | ||
|
|
01cb9b5ae6 | ||
|
|
208e115368 | ||
|
|
2b566f0633 | ||
|
|
da8f634b25 | ||
|
|
9bad0a2d5e | ||
|
|
1a73728e04 |
@@ -410,6 +410,8 @@ if test "x$enable_quartz_backend" = xyes; then
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_QUARTZ"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -Wl,-framework,Cocoa"
|
||||
# See discussion of MR !535.
|
||||
GDK_EXTRA_CFLAGS="$GDK_EXTRA_CFLAGS -I${includedir}/gtk-$GTK_API_VERSION/gdk/"
|
||||
DISABLE_ON_QUARTZ='%'
|
||||
AM_CONDITIONAL(USE_QUARTZ, true)
|
||||
if test "x$quartz_relocation" = xyes; then
|
||||
|
||||
@@ -5,7 +5,7 @@ app10_resources = gnome.compile_resources(
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app10_schemas = gnome.compile_schemas()
|
||||
app10_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
|
||||
|
||||
|
||||
app10 = executable(
|
||||
@@ -21,3 +21,5 @@ app10 = executable(
|
||||
app10_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
|
||||
|
||||
@@ -5,7 +5,7 @@ app5_resources = gnome.compile_resources(
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app5_schemas = gnome.compile_schemas()
|
||||
app5_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
|
||||
|
||||
|
||||
app5 = executable(
|
||||
@@ -19,3 +19,5 @@ app5 = executable(
|
||||
app5_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
|
||||
|
||||
@@ -5,7 +5,7 @@ app6_resources = gnome.compile_resources(
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app6_schemas = gnome.compile_schemas()
|
||||
app6_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
|
||||
|
||||
|
||||
app6 = executable(
|
||||
@@ -21,3 +21,5 @@ app6 = executable(
|
||||
app6_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
|
||||
|
||||
@@ -5,7 +5,7 @@ app7_resources = gnome.compile_resources(
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app7_schemas = gnome.compile_schemas()
|
||||
app7_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
|
||||
|
||||
|
||||
app7 = executable(
|
||||
@@ -21,3 +21,5 @@ app7 = executable(
|
||||
app7_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
|
||||
|
||||
@@ -5,7 +5,7 @@ app8_resources = gnome.compile_resources(
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app8_schemas = gnome.compile_schemas()
|
||||
app8_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
|
||||
|
||||
|
||||
app8 = executable(
|
||||
@@ -21,3 +21,5 @@ app8 = executable(
|
||||
app8_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
|
||||
|
||||
@@ -5,7 +5,7 @@ app9_resources = gnome.compile_resources(
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app9_schemas = gnome.compile_schemas()
|
||||
app9_schemas = gnome.compile_schemas(depend_files: files(['org.gtk.exampleapp.gschema.xml']))
|
||||
|
||||
|
||||
app9 = executable(
|
||||
@@ -21,3 +21,5 @@ app9 = executable(
|
||||
app9_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
install_data('org.gtk.exampleapp.gschema.xml', install_dir: gtk_schemasdir)
|
||||
|
||||
@@ -298,8 +298,10 @@
|
||||
*/
|
||||
if(gdk_quartz_osx_version() >= GDK_OSX_BIGSUR)
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
|
||||
CALayer* layer = self.layer;
|
||||
layer.contentsFormat = kCAContentsFormatRGBA8Uint;
|
||||
#endif
|
||||
}
|
||||
|
||||
[super viewWillDraw];
|
||||
|
||||
@@ -48,8 +48,9 @@ core_graphics_dep = dependency('appleframeworks', modules : 'CoreGraphics', requ
|
||||
appkit_dep = dependency('appleframeworks', modules : 'AppKit', required : true)
|
||||
cocoa_dep = dependency('appleframeworks', modules : 'Cocoa', required : true)
|
||||
carbon_dep = dependency('appleframeworks', modules : 'Carbon', required : true)
|
||||
quartzcore_dep = dependency('appleframeworks', modules : 'QuartzCore', required : true)
|
||||
|
||||
gdk_quartz_deps = [ core_graphics_dep, appkit_dep, cocoa_dep, carbon_dep ]
|
||||
gdk_quartz_deps = [ core_graphics_dep, appkit_dep, cocoa_dep, carbon_dep, quartzcore_dep ]
|
||||
|
||||
libgdk_quartz = static_library('gdk-quartz',
|
||||
gdk_quartz_sources, gdkconfig, gdkenum_h,
|
||||
|
||||
@@ -555,6 +555,7 @@ static TranslationEntry translations[] = {
|
||||
{ FALSE, "org.gnome.desktop.wm.preferences", "action-middle-click-titlebar", "gtk-titlebar-middle-click", G_TYPE_STRING, { .s = "none" } },
|
||||
{ FALSE, "org.gnome.desktop.wm.preferences", "action-right-click-titlebar", "gtk-titlebar-right-click", G_TYPE_STRING, { .s = "menu" } },
|
||||
{ FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b = FALSE } },
|
||||
{ FALSE, "org.gnome.desktop.a11y.interface", "high-contrast", "high-contrast", G_TYPE_NONE, { .b = FALSE } },
|
||||
{ FALSE, "org.gnome.fontconfig", "serial", "gtk-fontconfig-timestamp", G_TYPE_INT, { .i = 0 } }
|
||||
};
|
||||
|
||||
@@ -602,6 +603,13 @@ find_translation_entry_by_setting (const gchar *setting)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
high_contrast_changed (GdkScreen *screen)
|
||||
{
|
||||
notify_setting (screen, "gtk-theme-name");
|
||||
notify_setting (screen, "gtk-icon-theme-name");
|
||||
}
|
||||
|
||||
static void
|
||||
settings_changed (GSettings *settings,
|
||||
const gchar *key,
|
||||
@@ -615,6 +623,8 @@ settings_changed (GSettings *settings,
|
||||
{
|
||||
if (entry->type != G_TYPE_NONE)
|
||||
notify_setting (screen, entry->setting);
|
||||
else if (strcmp (key, "high-contrast") == 0)
|
||||
high_contrast_changed (screen);
|
||||
else
|
||||
update_xft_settings (screen);
|
||||
}
|
||||
@@ -997,6 +1007,32 @@ set_decoration_layout_from_entry (GdkScreen *screen,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
set_theme_from_entry (GdkScreen *screen,
|
||||
TranslationEntry *entry,
|
||||
GValue *value)
|
||||
{
|
||||
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
|
||||
GSettings *settings = NULL;
|
||||
GSettingsSchema *schema = NULL;
|
||||
gboolean hc = FALSE;
|
||||
|
||||
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, "org.gnome.desktop.a11y.interface");
|
||||
|
||||
if (settings)
|
||||
g_object_get (settings, "settings-schema", &schema, NULL);
|
||||
|
||||
if (schema && g_settings_schema_has_key (schema, "high-contrast"))
|
||||
hc = g_settings_get_boolean (settings, "high-contrast");
|
||||
|
||||
g_clear_pointer (&schema, g_settings_schema_unref);
|
||||
|
||||
if (hc)
|
||||
g_value_set_static_string (value, "HighContrast");
|
||||
else
|
||||
set_value_from_entry (screen, entry, value);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
set_capability_setting (GdkScreen *screen,
|
||||
GValue *value,
|
||||
@@ -1028,6 +1064,9 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
|
||||
{
|
||||
if (strcmp (name, "gtk-decoration-layout") == 0)
|
||||
set_decoration_layout_from_entry (screen, entry, value);
|
||||
else if (strcmp (name, "gtk-theme-name") == 0 ||
|
||||
strcmp (name, "gtk-icon-theme-name") == 0)
|
||||
set_theme_from_entry (screen, entry, value);
|
||||
else
|
||||
set_value_from_entry (screen, entry, value);
|
||||
return TRUE;
|
||||
|
||||
@@ -57,6 +57,7 @@ libgdk_win32_la_SOURCES = \
|
||||
gdkglcontext-win32.h \
|
||||
gdkglobals-win32.c \
|
||||
gdkkeys-win32.c \
|
||||
gdkkeys-win32.h \
|
||||
gdkkeys-win32-impl.c \
|
||||
gdkkeys-win32-impl-wow64.c \
|
||||
gdkmain-win32.c \
|
||||
|
||||
@@ -80,13 +80,19 @@ G_DEFINE_TYPE (GtkApplicationImplQuartz, gtk_application_impl_quartz, GTK_TYPE_A
|
||||
|
||||
-(NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender
|
||||
{
|
||||
/* We have no way to give our message other than to pop up a dialog
|
||||
* ourselves, which we should not do since the OS will already show
|
||||
* one when we return NSTerminateNow.
|
||||
*
|
||||
* Just let the OS show the generic message...
|
||||
*/
|
||||
return quartz->quit_inhibit == 0 ? NSTerminateNow : NSTerminateCancel;
|
||||
const gchar *quit_action_name = "quit";
|
||||
GActionGroup *action_group = G_ACTION_GROUP (quartz->impl.application);
|
||||
|
||||
if (quartz->quit_inhibit != 0)
|
||||
return NSTerminateCancel;
|
||||
|
||||
if (g_action_group_has_action (action_group, quit_action_name))
|
||||
{
|
||||
g_action_group_activate_action (action_group, quit_action_name, NULL);
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
|
||||
return NSTerminateNow;
|
||||
}
|
||||
|
||||
-(void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames
|
||||
|
||||
@@ -812,11 +812,6 @@ gtk_switch_dispose (GObject *object)
|
||||
priv->action = NULL;
|
||||
}
|
||||
|
||||
g_clear_object (&priv->gadget);
|
||||
g_clear_object (&priv->slider_gadget);
|
||||
g_clear_object (&priv->on_gadget);
|
||||
g_clear_object (&priv->off_gadget);
|
||||
|
||||
g_clear_object (&priv->pan_gesture);
|
||||
g_clear_object (&priv->multipress_gesture);
|
||||
|
||||
@@ -826,8 +821,14 @@ gtk_switch_dispose (GObject *object)
|
||||
static void
|
||||
gtk_switch_finalize (GObject *object)
|
||||
{
|
||||
GtkSwitchPrivate *priv = GTK_SWITCH (object)->priv;
|
||||
gtk_switch_end_toggle_animation (GTK_SWITCH (object));
|
||||
|
||||
g_clear_object (&priv->gadget);
|
||||
g_clear_object (&priv->slider_gadget);
|
||||
g_clear_object (&priv->on_gadget);
|
||||
g_clear_object (&priv->off_gadget);
|
||||
|
||||
G_OBJECT_CLASS (gtk_switch_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
@@ -959,7 +959,7 @@ foreach l: immodules
|
||||
cond = l.get(2, true)
|
||||
cflags = l.get(3, [])
|
||||
|
||||
if cond and builtin_immodules
|
||||
if cond and (builtin_immodules.contains(name) or builtin_all_immodules)
|
||||
gtk_cargs += ['-DINCLUDE_IM_@0@'.format(name.underscorify())]
|
||||
mod = static_library('staticimmodule-@0@'.format(name),
|
||||
sources + gtk_dep_sources,
|
||||
|
||||
39
meson.build
39
meson.build
@@ -499,7 +499,10 @@ else
|
||||
cdata.set_quoted('ISO_CODES_PREFIX', get_option('prefix'))
|
||||
endif
|
||||
|
||||
pc_gdk_extra_libs = []
|
||||
backend_immodules = []
|
||||
|
||||
pc_gdk_extra_libs = []
|
||||
pc_gdk_extra_cflags = []
|
||||
|
||||
cairo_found_type = cairo_dep.type_name()
|
||||
if cairo_found_type == 'internal'
|
||||
@@ -554,6 +557,7 @@ if wayland_enabled
|
||||
wlprotocolsdep = dependency('wayland-protocols', version: wayland_proto_req)
|
||||
wlcursordep = dependency('wayland-cursor', version: wayland_req)
|
||||
wlegldep = dependency('wayland-egl')
|
||||
backend_immodules += ['wayland']
|
||||
|
||||
wayland_pkgs = [
|
||||
'wayland-client', wayland_req,
|
||||
@@ -578,6 +582,8 @@ if x11_enabled
|
||||
fontconfig_dep = dependency('fontconfig', fallback: ['fontconfig', 'fontconfig_dep'])
|
||||
atkbridge_dep = dependency('atk-bridge-2.0', version: at_spi2_atk_req)
|
||||
|
||||
backend_immodules += ['xim']
|
||||
|
||||
x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr']
|
||||
|
||||
if xcursor_dep.found()
|
||||
@@ -656,10 +662,14 @@ endif
|
||||
|
||||
if broadway_enabled
|
||||
pc_gdk_extra_libs += ['-lz']
|
||||
backend_immodules += ['broadway']
|
||||
endif
|
||||
|
||||
if quartz_enabled
|
||||
pc_gdk_extra_libs += ['-Wl,-framework,Cocoa', '-Wl,-framework,Carbon', '-Wl,-framework,CoreGraphics']
|
||||
pc_gdk_extra_libs += ['-Wl,-framework,Cocoa', '-Wl,-framework,Carbon', '-Wl,-framework,CoreGraphics']
|
||||
# See discussion of MR !535.
|
||||
pc_gdk_extra_cflags += ['-I${includedir}/gtk-@0@/gdk/'.format(gtk_api_version)]
|
||||
backend_immodules += ['quartz']
|
||||
endif
|
||||
|
||||
extra_demo_ldflags = []
|
||||
@@ -674,6 +684,7 @@ if win32_enabled
|
||||
pc_gdk_extra_libs += ['-Wl,-luuid']
|
||||
endif
|
||||
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
|
||||
backend_immodules += ['ime']
|
||||
|
||||
# Check whether libepoxy is built with EGL support on Windows
|
||||
win32_has_egl = epoxy_dep.get_variable(
|
||||
@@ -684,20 +695,30 @@ endif
|
||||
|
||||
# IMModules stuff-unfortunately we need to put items here
|
||||
# as they can be built as modules or built directly into GTK
|
||||
builtin_all_immodules = false
|
||||
|
||||
builtin_modules_opt = get_option('builtin_immodules')
|
||||
if builtin_modules_opt == 'auto'
|
||||
builtin_immodules = []
|
||||
|
||||
if builtin_modules_opt == ''
|
||||
if os_win32
|
||||
# Current MSVC projects build all immodules directly into GTK by default,
|
||||
# as does the mingw autotools build
|
||||
message('IMModules are built into GTK for MSVC builds by default')
|
||||
builtin_immodules = true
|
||||
builtin_immodules = ['all']
|
||||
else
|
||||
builtin_immodules = false
|
||||
builtin_immodules = ['none']
|
||||
endif
|
||||
elif builtin_modules_opt == 'yes'
|
||||
builtin_immodules = true
|
||||
else
|
||||
builtin_immodules = false
|
||||
builtin_immodules = builtin_modules_opt.split(',')
|
||||
endif
|
||||
|
||||
if builtin_immodules.contains('none')
|
||||
builtin_immodules = []
|
||||
elif builtin_immodules.contains('all')
|
||||
builtin_all_immodules = true
|
||||
elif builtin_immodules.contains('backend')
|
||||
builtin_immodules += backend_immodules
|
||||
endif
|
||||
|
||||
proto_sources = [
|
||||
@@ -932,7 +953,7 @@ pkgconf.set('GDK_EXTRA_LIBS', ' '.join(pc_gdk_extra_libs))
|
||||
pkgconf.set('GSK_EXTRA_LIBS', '')
|
||||
pkgconf.set('GTK_EXTRA_LIBS', '')
|
||||
|
||||
pkgconf.set('GDK_EXTRA_CFLAGS', '')
|
||||
pkgconf.set('GDK_EXTRA_CFLAGS', ' '.join(pc_gdk_extra_cflags))
|
||||
pkgconf.set('GSK_EXTRA_CFLAGS', '')
|
||||
pkgconf.set('GTK_EXTRA_CFLAGS', '')
|
||||
|
||||
|
||||
@@ -45,5 +45,5 @@ option('installed_tests', type: 'boolean', value: 'false',
|
||||
description : 'enable installed tests')
|
||||
|
||||
# input modules
|
||||
option('builtin_immodules', type: 'combo', choices : ['yes', 'no', 'auto'],
|
||||
value: 'auto', description: 'Build immodules into GTK so/DLL')
|
||||
option('builtin_immodules', type: 'string',
|
||||
value: '', description: 'Build specified immodules into GTK so/DLL (comma-separated list), "all", "none" or "backend"')
|
||||
|
||||
@@ -7,7 +7,7 @@ foreach l: immodules
|
||||
cond = l.get(2, true)
|
||||
cflags = l.get(3, [])
|
||||
|
||||
if cond and not builtin_immodules
|
||||
if cond and not (builtin_immodules.contains(name) or builtin_all_immodules)
|
||||
shared_module('im-@0@'.format(name),
|
||||
immod_sources,
|
||||
c_args: common_cflags + cflags,
|
||||
|
||||
@@ -22,9 +22,7 @@ libreftest = shared_library('reftest',
|
||||
|
||||
gtk_reftest = executable('gtk-reftest', 'gtk-reftest.c',
|
||||
link_with : [libgtkreftestprivate, libreftest],
|
||||
dependencies : libgtk_dep,
|
||||
install: get_option('installed_tests'),
|
||||
install_dir: installed_test_bindir)
|
||||
dependencies : libgtk_dep)
|
||||
|
||||
test_data = [
|
||||
'721800-0px-dotted-border.css',
|
||||
@@ -291,9 +289,6 @@ test_data = [
|
||||
'label-text-shadow-clipping.css',
|
||||
'label-text-shadow-clipping.ref.ui',
|
||||
'label-text-shadow-clipping.ui',
|
||||
'label-text-shadow-changes-modify-clip.css',
|
||||
'label-text-shadow-changes-modify-clip.ref.ui',
|
||||
'label-text-shadow-changes-modify-clip.ui',
|
||||
'label-width-chars-dont-shrink.ref.ui',
|
||||
'label-width-chars-dont-shrink.ui',
|
||||
'label-wrap-justify.ref.ui',
|
||||
@@ -405,10 +400,6 @@ test_data = [
|
||||
'textview-margins.ui',
|
||||
'textview-tags.ref.ui',
|
||||
'textview-tags.ui',
|
||||
'toplevel-vs-popup.ref.ui',
|
||||
'toplevel-vs-popup.ui',
|
||||
'treeview-crash-too-wide.ref.ui',
|
||||
'treeview-crash-too-wide.ui',
|
||||
'treeview-fixed-height.css',
|
||||
'treeview-fixed-height.ref.ui',
|
||||
'treeview-fixed-height.ui',
|
||||
@@ -464,24 +455,3 @@ foreach testname : test_data
|
||||
is_parallel: false)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
reftests_installed_tests = [
|
||||
'reftests-dark.test',
|
||||
'reftests-hc.test',
|
||||
'reftests-hci.test',
|
||||
'reftests.test',
|
||||
]
|
||||
|
||||
if get_option('installed_tests')
|
||||
test_cdata = configuration_data()
|
||||
test_cdata.set('libexecdir', gtk_libexecdir)
|
||||
|
||||
foreach t: reftests_installed_tests
|
||||
configure_file(input: '@0@.in'.format(t),
|
||||
output: t,
|
||||
configuration: test_cdata,
|
||||
install_dir: installed_test_datadir)
|
||||
endforeach
|
||||
|
||||
install_data(test_data, install_dir: testexecdir)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user