diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-24 10:55:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-24 12:55:56 +0200 |
commit | d4bae3c10e8f9ccafcc911a677093101eaed3ad1 (patch) | |
tree | bbe3b1164eff6169a2f6cefaf4ae96a4f8e2b458 /vcl/inc | |
parent | a798bf1ade3582fb38af4a23174d42ebdaeafaf2 (diff) |
gtk[3|4] wrap gtk_widget_get_window/gtk_native_get_surface
Change-Id: I21c1cf9ab65e056242f09c8c2bbd84afa9ac42e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116044
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/unx/gtk/gtkdata.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index eccac367ca40..6203d10d4530 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -115,6 +115,15 @@ inline void style_context_get_color(GtkStyleContext *pStyle, GdkRGBA *pColor) #endif } +inline GdkSurface* widget_get_surface(GtkWidget* pWidget) +{ +#if GTK_CHECK_VERSION(4,0,0) + return gtk_native_get_surface(gtk_widget_get_native(pWidget)); +#else + return gtk_widget_get_window(pWidget); +#endif +} + inline void widget_set_cursor(GtkWidget *pWidget, GdkCursor *pCursor) { #if GTK_CHECK_VERSION(4, 0, 0) |