mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
x11: Add back support for the damage extension
commit 14bf58ec5d
dropped support
for using the DAMAGE extension since there was no code that
needed it.
We're going to need it again, however, to address an NVidia
vendor driver issue.
This commit does the plumbing to add it back.
This commit is contained in:
parent
ea1cc4b991
commit
10f2b11fda
@ -123,6 +123,9 @@
|
||||
/* Have the Xcursor library */
|
||||
#mesondefine HAVE_XCURSOR
|
||||
|
||||
/* Have the XDAMAGE X extension */
|
||||
#mesondefine HAVE_XDAMAGE
|
||||
|
||||
/* Have the XFIXES X extension */
|
||||
#mesondefine HAVE_XFIXES
|
||||
|
||||
|
@ -1603,6 +1603,14 @@ gdk_x11_display_open (const gchar *display_name)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XDAMAGE
|
||||
display_x11->have_damage = FALSE;
|
||||
if (XDamageQueryExtension (display_x11->xdisplay,
|
||||
&display_x11->damage_event_base,
|
||||
&display_x11->damage_error_base))
|
||||
display_x11->have_damage = TRUE;
|
||||
#endif
|
||||
|
||||
display->clipboard = gdk_x11_clipboard_new (display, "CLIPBOARD");
|
||||
display->primary_clipboard = gdk_x11_clipboard_new (display, "PRIMARY");
|
||||
|
||||
|
@ -149,6 +149,12 @@ struct _GdkX11Display
|
||||
guint has_glx_multisample : 1;
|
||||
guint has_glx_visual_rating : 1;
|
||||
guint has_glx_create_es2_context : 1;
|
||||
|
||||
#ifdef HAVE_XDAMAGE
|
||||
gint damage_event_base;
|
||||
gint damage_error_base;
|
||||
guint have_damage;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct _GdkX11DisplayClass
|
||||
|
@ -65,6 +65,7 @@ gdk_x11_deps = [
|
||||
xext_dep,
|
||||
x11_dep,
|
||||
xcursor_dep,
|
||||
xdamage_dep,
|
||||
xfixes_dep,
|
||||
xcomposite_dep,
|
||||
xrandr_dep,
|
||||
|
@ -501,6 +501,7 @@ if x11_enabled
|
||||
xi_dep = dependency('xi')
|
||||
xext_dep = dependency('xext')
|
||||
xcursor_dep = dependency('xcursor', required: false)
|
||||
xdamage_dep = dependency('xdamage', required: false)
|
||||
xfixes_dep = dependency('xfixes', required: false)
|
||||
xcomposite_dep = dependency('xcomposite', required: false)
|
||||
fontconfig_dep = dependency('fontconfig')
|
||||
@ -513,6 +514,9 @@ if x11_enabled
|
||||
if xcursor_dep.found()
|
||||
x11_pkgs += ['xcursor']
|
||||
endif
|
||||
if xdamage_dep.found()
|
||||
x11_pkgs += ['xdamage']
|
||||
endif
|
||||
if xfixes_dep.found()
|
||||
x11_pkgs += ['xfixes']
|
||||
endif
|
||||
@ -523,6 +527,7 @@ if x11_enabled
|
||||
atk_pkgs += ['atk-bridge-2.0']
|
||||
|
||||
cdata.set('HAVE_XCURSOR', xcursor_dep.found())
|
||||
cdata.set('HAVE_XDAMAGE', xdamage_dep.found())
|
||||
cdata.set('HAVE_XCOMPOSITE', xcomposite_dep.found())
|
||||
cdata.set('HAVE_XFIXES', xfixes_dep.found())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user