summaryrefslogtreecommitdiff
path: root/libdecor/build/fl_libdecor-plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdecor/build/fl_libdecor-plugins.c')
-rw-r--r--libdecor/build/fl_libdecor-plugins.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/libdecor/build/fl_libdecor-plugins.c b/libdecor/build/fl_libdecor-plugins.c
index fbf4eb657..1e73d736a 100644
--- a/libdecor/build/fl_libdecor-plugins.c
+++ b/libdecor/build/fl_libdecor-plugins.c
@@ -301,23 +301,6 @@ unsigned char *fl_libdecor_titlebar_buffer(struct libdecor_frame *frame,
}
-// When the libdecor version after 0.2.2 will be released, support of older versions
-// will be removed from FLTK. LIBDECOR_MR131 stuff also will be removed.
-struct libdecor_022 { // for libdecor versions ≤ 0.2.2
- int ref_count;
- const struct libdecor_interface *iface;
- struct libdecor_plugin *plugin;
- bool plugin_ready;
- struct wl_display *wl_display;
- struct wl_registry *wl_registry;
- struct xdg_wm_base *xdg_wm_base;
- struct zxdg_decoration_manager_v1 *decoration_manager;
- struct wl_callback *init_callback;
- bool init_done;
- bool has_error;
- struct wl_list frames;
-};
-
struct libdecor { // copied from libdecor.c, for libdecor versions > 0.2.2
int ref_count;
const struct libdecor_interface *iface;
@@ -338,18 +321,9 @@ struct libdecor { // copied from libdecor.c, for libdecor versions > 0.2.2
/* Returns whether surface is a GTK-titlebar created by libdecor-gtk */
bool fl_is_surface_gtk_titlebar(struct wl_surface *surface, struct libdecor *context) {
if (!context || get_plugin_kind(NULL) != GTK3) return false;
- static void *new_symbol = NULL;
- static bool first = true;
- if (first) {
- first = false;
- // new_symbol is NULL for libdecor versions ≤ 0.2.2
- new_symbol = dlsym(RTLD_DEFAULT, "libdecor_frame_get_user_data");
- }
- struct wl_list *frames_addr = (new_symbol ? &context->frames :
- &(((struct libdecor_022*)context)->frames) );
// loop over all decorations created by libdecor-gtk
struct libdecor_frame *frame;
- wl_list_for_each(frame, frames_addr, link) {
+ wl_list_for_each(frame, &context->frames, link) {
struct libdecor_frame_gtk *frame_gtk = (struct libdecor_frame_gtk*)frame;
if (frame_gtk->headerbar.wl_surface == surface) return true;
}