From: <enl...@li...> - 2005-08-10 15:31:56
|
Enlightenment CVS committal Author : kwo Project : e16 Module : e Dir : e16/e/src Modified Files: ewins.c iclass.c mod-trans.c Log Message: Speed up pseudotrans changes. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -3 -r1.92 -r1.93 --- ewins.c 7 Aug 2005 20:33:16 -0000 1.92 +++ ewins.c 10 Aug 2005 15:31:48 -0000 1.93 @@ -1599,17 +1599,25 @@ } static void -EwinsTouch(void) +EwinsTouch(int desk) { int i, num; EWin *const *lst, *ewin; - lst = EwinListStackGet(&num); + if (desk < 0) + lst = EwinListGetAll(&num); + else + lst = EwinListGetForDesk(&num, desk); + for (i = num - 1; i >= 0; i--) { ewin = lst[i]; - if (EwinIsMapped(ewin)) + if (EwinIsMapped(ewin) && EwinIsOnScreen(ewin)) +#if 1 /* FIXME - Which one? */ EwinMove(ewin, EoGetX(ewin), EoGetY(ewin)); +#else + EwinResize(ewin, ewin->client.w, ewin->client.h); +#endif } } @@ -1872,12 +1880,8 @@ */ static void -EwinsSighan(int sig, void *prm __UNUSED__) +EwinsSighan(int sig, void *prm) { - EWin *ewin; - EWin **ewin_lst; - int win_cnt, i; - switch (sig) { case ESIGNAL_INIT: @@ -1894,19 +1898,13 @@ break; #endif case ESIGNAL_DESK_RESIZE: - EwinsTouch(); + EwinsTouch(-1); break; case ESIGNAL_THEME_TRANS_CHANGE: + EwinsTouch(DesksGetCurrent()); + break; case ESIGNAL_BACKGROUND_CHANGE: - /* FIXME - Only visible windows */ - /* FIXME - BG: Only affected desk */ - ewin_lst = (EWin **) EwinListStackGet(&win_cnt); - for (i = 0; i < win_cnt; i++) - { - ewin = ewin_lst[i]; - if (EwinIsMapped(ewin)) - EwinResize(ewin, ewin->client.w, ewin->client.h); - } + EwinsTouch((long)prm); break; } } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -3 -r1.72 -r1.73 --- iclass.c 4 Aug 2005 22:05:30 -0000 1.72 +++ iclass.c 10 Aug 2005 15:31:48 -0000 1.73 @@ -91,10 +91,26 @@ prev_alpha = Conf.trans.alpha; Conf.trans.alpha = transparency; } + + if (!changed) + return; + /* Generate the color modifier tables */ TransparencyMakeColorModifier(); - if (changed) - ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL); + + if (prev_alpha == 0) + { + /* Hack to get tiled backgrounds regenerated at full size */ + int i, num; + + num = DesksGetNumber(); + for (i = 0; i < num; i++) + { + BackgroundPixmapFree(DeskGetBackground(i)); + DeskRefresh(i); + } + } + ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL); } #endif /* ENABLE_THEME_TRANSPARENCY */ =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/mod-trans.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- mod-trans.c 2 Aug 2005 16:50:38 -0000 1.8 +++ mod-trans.c 10 Aug 2005 15:31:48 -0000 1.9 @@ -40,6 +40,19 @@ static int tmp_st_hilight; static void +TransparencyChangeTimeout(int val, void *data __UNUSED__) +{ + TransparencySet(val); +} + +static void +TransparencyChange(int val) +{ + RemoveTimerEvent("PT-Change"); + DoIn("PT-Change", .01, TransparencyChangeTimeout, val, NULL); +} + +static void CB_ConfigureTrans(Dialog * d __UNUSED__, int val, void *data __UNUSED__) { if (val < 2) @@ -72,8 +85,9 @@ Conf.trans.pager = ICLASS_ATTR_BG; Conf.trans.iconbox = ICLASS_ATTR_BG; Conf.trans.warplist = ICLASS_ATTR_BG; - - TransparencySet(tmp_theme_transparency); +#if 0 /* Should not be necessary */ + TransparencyChange(tmp_theme_transparency); +#endif } autosave(); } @@ -88,10 +102,8 @@ Esnprintf(s, sizeof(s), _("Theme transparency: %2d"), tmp_theme_transparency); DialogItemSetText(di, s); - DialogDrawItems(tr_sel_dialog, di, 0, 0, 99999, 99999); - /* FIXME - We may not want to do this unless things are speeded up */ - TransparencySet(tmp_theme_transparency); + TransparencyChange(tmp_theme_transparency); } static void |