mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Remove DEMATERIALIZE_ICON code
This animation is not as cool as the NORMAL_ICON_KABOON, so I don't think having a choice here is justified. Let's remove this option (it was not defined in wconfig.h.in by default) and keep using the nicer NORMAL_ICON_KABOON.
This commit is contained in:
@@ -106,14 +106,6 @@ WAppIcon *wAppIconCreateForDock(WScreen * scr, char *command, char *wm_instance,
|
||||
wXDNDMakeAwareness(dicon->icon->core->window);
|
||||
#endif
|
||||
|
||||
#ifdef DEMATERIALIZE_ICON
|
||||
{
|
||||
XSetWindowAttributes attribs;
|
||||
attribs.save_under = True;
|
||||
XChangeWindowAttributes(dpy, dicon->icon->core->window, CWSaveUnder, &attribs);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* will be overriden by dock */
|
||||
dicon->icon->core->descriptor.handle_mousedown = appIconMouseDown;
|
||||
dicon->icon->core->descriptor.handle_expose = iconExpose;
|
||||
@@ -149,13 +141,6 @@ WAppIcon *wAppIconCreate(WWindow * leader_win)
|
||||
aicon->wm_instance = wstrdup(leader_win->wm_instance);
|
||||
|
||||
aicon->icon = wIconCreate(leader_win);
|
||||
#ifdef DEMATERIALIZE_ICON
|
||||
{
|
||||
XSetWindowAttributes attribs;
|
||||
attribs.save_under = True;
|
||||
XChangeWindowAttributes(dpy, aicon->icon->core->window, CWSaveUnder, &attribs);
|
||||
}
|
||||
#endif
|
||||
#ifdef XDND
|
||||
wXDNDMakeAwareness(aicon->icon->core->window);
|
||||
#endif
|
||||
|
||||
@@ -45,78 +45,6 @@
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#ifdef DEMATERIALIZE_ICON
|
||||
void DoKaboom(WScreen * scr, Window win, int x, int y)
|
||||
{
|
||||
RImage *icon;
|
||||
RImage *back;
|
||||
RImage *image;
|
||||
Pixmap pixmap;
|
||||
XImage *ximage;
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
int i;
|
||||
int w, h;
|
||||
int run;
|
||||
XEvent event;
|
||||
|
||||
h = w = wPreferences.icon_size;
|
||||
if (x < 0 || x + w > scr->scr_width || y < 0 || y + h > scr->scr_height)
|
||||
return;
|
||||
|
||||
icon = RCreateImageFromDrawable(scr->rcontext, win, None);
|
||||
if (!icon)
|
||||
return;
|
||||
|
||||
gcv.foreground = scr->white_pixel;
|
||||
gcv.background = scr->black_pixel;
|
||||
gcv.graphics_exposures = False;
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc = XCreateGC(dpy, scr->w_win, GCForeground | GCBackground | GCSubwindowMode | GCGraphicsExposures, &gcv);
|
||||
|
||||
XGrabServer(dpy);
|
||||
RConvertImage(scr->rcontext, icon, &pixmap);
|
||||
XUnmapWindow(dpy, win);
|
||||
|
||||
ximage = XGetImage(dpy, scr->root_win, x, y, w, h, AllPlanes, ZPixmap);
|
||||
XCopyArea(dpy, pixmap, scr->root_win, gc, 0, 0, w, h, x, y);
|
||||
XFreePixmap(dpy, pixmap);
|
||||
|
||||
back = RCreateImageFromXImage(scr->rcontext, ximage, NULL);
|
||||
XDestroyImage(ximage);
|
||||
if (!back) {
|
||||
RReleaseImage(icon);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0, run = 0; i < DEMATERIALIZE_STEPS; i++) {
|
||||
XEvent foo;
|
||||
if (!run && XCheckTypedEvent(dpy, ButtonPress, &foo)) {
|
||||
run = 1;
|
||||
XPutBackEvent(dpy, &foo);
|
||||
}
|
||||
image = RCloneImage(back);
|
||||
RCombineImagesWithOpaqueness(image, icon,
|
||||
(DEMATERIALIZE_STEPS - 1 - i) * 256 / (DEMATERIALIZE_STEPS + 2));
|
||||
RConvertImage(scr->rcontext, image, &pixmap);
|
||||
XCopyArea(dpy, pixmap, scr->root_win, gc, 0, 0, w, h, x, y);
|
||||
XFreePixmap(dpy, pixmap);
|
||||
XFlush(dpy);
|
||||
if (!run)
|
||||
wusleep(1000);
|
||||
}
|
||||
|
||||
while (XCheckTypedEvent(dpy, MotionNotify, &event)) {
|
||||
}
|
||||
XFlush(dpy);
|
||||
|
||||
XUngrabServer(dpy);
|
||||
XFreeGC(dpy, gc);
|
||||
RReleaseImage(icon);
|
||||
RReleaseImage(back);
|
||||
}
|
||||
#endif /* DEMATERIALIZE_ICON */
|
||||
|
||||
#ifdef NORMAL_ICON_KABOOM
|
||||
void DoKaboom(WScreen * scr, Window win, int x, int y)
|
||||
{
|
||||
|
||||
@@ -125,14 +125,7 @@
|
||||
*/
|
||||
#undef SHADOW_RESIZEBAR
|
||||
|
||||
/*
|
||||
* Define DEMATERIALIZE_ICON if you want the undocked icon animation
|
||||
* to be a progressive disaparison animation.
|
||||
* This will cause all application icons to be created with Save Under
|
||||
* enable.
|
||||
*/
|
||||
#undef DEMATERIALIZE_ICON
|
||||
|
||||
#define NORMAL_ICON_KABOOM
|
||||
/*
|
||||
* Define ICON_KABOOM_EXTRA if you want extra fancy icon undocking
|
||||
* explosion animation.
|
||||
@@ -316,9 +309,6 @@
|
||||
|
||||
#define WORKSPACE_NAME_DELAY 400
|
||||
|
||||
/* number of steps for icon dematerialization. */
|
||||
#define DEMATERIALIZE_STEPS 16
|
||||
|
||||
/* Delay when cycling colors of selected icons. */
|
||||
#define COLOR_CYCLE_DELAY 200
|
||||
|
||||
@@ -437,10 +427,6 @@
|
||||
#undef LANGUAGE_SK
|
||||
#endif
|
||||
|
||||
#ifndef DEMATERIALIZE_ICON
|
||||
#define NORMAL_ICON_KABOOM
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBINTL_H) && defined(I18N)
|
||||
#include <libintl.h>
|
||||
#define _(text) gettext(text)
|
||||
|
||||
Reference in New Issue
Block a user