From 892cd5807403db6a7f30e60bf9221d37d802daea Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sun, 13 Aug 2023 19:58:33 -0400 Subject: trashapplet: Remove animation that hasn't worked in years *The trash applet hasn't had working animation in many years *xstuff_zoom_animate also appears in mate-panel with 4 arguments instead of 2. *conflicting function names caused a segfault when built in-process --- trashapplet/src/Makefile.am | 2 - trashapplet/src/trashapplet.c | 8 -- trashapplet/src/xstuff.c | 179 ------------------------------------------ trashapplet/src/xstuff.h | 10 --- 4 files changed, 199 deletions(-) delete mode 100644 trashapplet/src/xstuff.c delete mode 100644 trashapplet/src/xstuff.h (limited to 'trashapplet/src') diff --git a/trashapplet/src/Makefile.am b/trashapplet/src/Makefile.am index 6cb5ef0a..8e5eec2e 100644 --- a/trashapplet/src/Makefile.am +++ b/trashapplet/src/Makefile.am @@ -12,8 +12,6 @@ APPLET_SOURCES = \ trashapplet.c \ trash-empty.h \ trash-empty.c \ - xstuff.c \ - xstuff.h \ $(NULL) APPLET_LIBS = \ diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c index 4a78623d..e4f2966b 100644 --- a/trashapplet/src/trashapplet.c +++ b/trashapplet/src/trashapplet.c @@ -35,7 +35,6 @@ #include #include "trash-empty.h" -#include "xstuff.h" #define TRASH_TYPE_APPLET (trash_applet_get_type ()) @@ -263,14 +262,7 @@ trash_applet_button_release (GtkWidget *widget, (event->type != GDK_2BUTTON_PRESS) && (event->type != GDK_3BUTTON_PRESS)) { -#if defined(GDK_WINDOWING_X11) && !defined(ENABLE_IN_PROCESS) - if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (widget)) && - g_settings_get_boolean (settings, PANEL_ENABLE_ANIMATIONS)) - xstuff_zoom_animate (widget, NULL); -#endif - trash_applet_open_folder (NULL, applet); - return TRUE; } diff --git a/trashapplet/src/xstuff.c b/trashapplet/src/xstuff.c deleted file mode 100644 index fa990eb3..00000000 --- a/trashapplet/src/xstuff.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * MATE panel x stuff - * - * Copyright (C) 2000, 2001 Eazel, Inc. - * 2002 Sun Microsystems Inc. - * - * Authors: George Lebl - * Mark McLoughlin - * - * Contains code from the Window Maker window manager - * - * Copyright (c) 1997-2002 Alfredo K. Kojima - - */ -#include -#include - -#include -#include - -#include - -#include "xstuff.h" - -/* Zoom animation */ -#define MINIATURIZE_ANIMATION_FRAMES_Z 1 -#define MINIATURIZE_ANIMATION_STEPS_Z 6 -/* the delay per draw */ -#define MINIATURIZE_ANIMATION_DELAY_Z 10 - -static void -draw_zoom_animation (GdkScreen *gscreen, - int x, int y, int w, int h, - int fx, int fy, int fw, int fh, - int steps) -{ -#define FRAMES (MINIATURIZE_ANIMATION_FRAMES_Z) - float cx[FRAMES], cy[FRAMES], cw[FRAMES], ch[FRAMES]; - int cxi[FRAMES], cyi[FRAMES], cwi[FRAMES], chi[FRAMES]; - float xstep, ystep, wstep, hstep; - int i, j; - GC frame_gc; - XGCValues gcv; - GdkColor color = { 0, 65535, 65535, 65535 }; - Display *dpy; - Window root_win; - int screen; - int depth; - - dpy = gdk_x11_display_get_xdisplay (gdk_screen_get_display (gscreen)); - root_win = GDK_WINDOW_XID (gdk_screen_get_root_window (gscreen)); - screen = gdk_x11_screen_get_screen_number (gscreen); - depth = DefaultDepth(dpy,screen); - - /* frame GC */ - gcv.function = GXxor; - /* this will raise the probability of the XORed color being different - * of the original color in PseudoColor when not all color cells are - * initialized */ - if (DefaultVisual(dpy, screen)->class==PseudoColor) - gcv.plane_mask = (1<<(depth-1))|1; - else - gcv.plane_mask = AllPlanes; - gcv.foreground = color.pixel; - if (gcv.foreground == 0) - gcv.foreground = 1; - gcv.line_width = 1; - gcv.subwindow_mode = IncludeInferiors; - gcv.graphics_exposures = False; - - frame_gc = XCreateGC(dpy, root_win, GCForeground|GCGraphicsExposures - |GCFunction|GCSubwindowMode|GCLineWidth - |GCPlaneMask, &gcv); - - xstep = (float)(fx-x)/steps; - ystep = (float)(fy-y)/steps; - wstep = (float)(fw-w)/steps; - hstep = (float)(fh-h)/steps; - - for (j=0; j 0) - usleep(MINIATURIZE_ANIMATION_DELAY_Z); -#else - usleep(10); -#endif - for (j=0; j 0) - usleep(MINIATURIZE_ANIMATION_DELAY_Z); -#else - usleep(10); -#endif - for (j=0; j -#include - -void xstuff_zoom_animate (GtkWidget *widget, - GdkRectangle *opt_src_rect); - -#endif /* __XSTUFF_H__ */ -- cgit v1.2.1