From ee569220df3fd89a52f9e97cc258123aa8312d58 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Mon, 15 Mar 2010 17:50:17 +0100 Subject: [PATCH] Remove NEWAPPICON #ifdefs It wasn't defined anywhere and when I defined it, the compilation did not finish: appicon.c: In function drawCorner: appicon.c:206: error: WScreen has no member named focused_texture appicon.c:208: error: WScreen has no member named unfocused_texture appicon.c: At top level: appicon.c:214: error: conflicting types for drawCorner appicon.c:193: note: previous definition of drawCorner was here make[2]: *** [appicon.o] Fehler 1 make[1]: *** [all] Fehler 2 make: *** [all-recursive] Fehler 1 So let's simply remove those #ifdefs. --- src/actions.c | 18 +++--------------- src/appicon.c | 22 ---------------------- src/application.h | 13 ------------- 3 files changed, 3 insertions(+), 50 deletions(-) diff --git a/src/actions.c b/src/actions.c index 891c4f29..34384826 100644 --- a/src/actions.c +++ b/src/actions.c @@ -136,15 +136,10 @@ void wSetFocusTo(WScreen * scr, WWindow * wwin) if (wwin == NULL) { XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, CurrentTime); - if (old_focused) { + if (old_focused) wWindowUnfocus(old_focused); - } - if (oapp) { + if (oapp) wAppMenuUnmap(oapp->menu); -#ifdef NEWAPPICON - wApplicationDeactivate(oapp); -#endif - } WMPostNotificationName(WMNChangedFocus, NULL, (void *)True); return; @@ -205,12 +200,8 @@ void wSetFocusTo(WScreen * scr, WWindow * wwin) wwin->next = NULL; scr->focused_window = wwin; - if (oapp && oapp != napp) { + if (oapp && oapp != napp) wAppMenuUnmap(oapp->menu); -#ifdef NEWAPPICON - wApplicationDeactivate(oapp); -#endif - } } wWindowFocus(wwin, focused); @@ -222,9 +213,6 @@ void wSetFocusTo(WScreen * scr, WWindow * wwin) if (wwin->flags.mapped) wAppMenuMap(napp->menu, wwin); -#ifdef NEWAPPICON - wApplicationActivate(napp); -#endif } XFlush(dpy); diff --git a/src/appicon.c b/src/appicon.c index d4b98a9a..bc506072 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -189,28 +189,6 @@ void wAppIconDestroy(WAppIcon * aicon) wrelease(aicon); } -#ifdef NEWAPPICON -static void drawCorner(WIcon * icon, WWindow * wwin, int active) -{ - WScreen *scr = wwin->screen_ptr; - XPoint points[3]; - GC gc; - - points[0].x = 2; - points[0].y = 2; - points[1].x = 12; - points[1].y = 2; - points[2].x = 2; - points[2].y = 12; - if (active) { - gc = scr->focused_texture->any.gc; - } else { - gc = scr->unfocused_texture->any.gc; - } - XFillPolygon(dpy, icon->core->window, gc, points, 3, Convex, CoordModeOrigin); -} -#endif /* NEWAPPICON */ - static void drawCorner(WIcon * icon) { WScreen *scr = icon->core->screen_ptr; diff --git a/src/application.h b/src/application.h index 57a1b5cc..d4ded889 100644 --- a/src/application.h +++ b/src/application.h @@ -57,18 +57,5 @@ WApplication *wApplicationOf(Window window); void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance, char *wm_class); - -#ifdef NEWAPPICON - -# define wApplicationActivate(wapp) {\ - wapp->main_window_desc->flags.focused=1; \ - wAppIconPaint(wapp->app_icon);\ - } -#define wApplicationDeactivate(wapp) {\ - wapp->main_window_desc->flags.focused=0;\ - wAppIconPaint(wapp->app_icon);\ - } -#endif - #endif