Hi, I have noticed that in WindowMaker 0.95.2 application icons bounce
when some actions are done, like starting a program, etc.
Disabling Superfluous or Animations also disabled the minimizing
animation which I am used to, so doing that didn't do the job.
Everyone has got his or her own tastes, but I did not like the new
behavior and didn't find any way to disable it without affecting other
things.
So I made a patch to fix just that. It is below.
It adds a new option in WPrefs.app's Expert Tab called "Do not make
AppIcons bounce" which when enabled,
disables any type of bouncing for Application Icons, restoring the old behavior.
Bouncing stays the new default behavior.

*** CUT HERE ***

diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index e86480d..04b1648 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -31,7 +31,7 @@ typedef struct _Panel {

        WMWidget *parent;

-       WMButton *swi[13];
+       WMButton *swi[14];

 } _Panel;

@@ -54,6 +54,7 @@ static void showData(_Panel * panel)
        WMSetButtonSelected(panel->swi[10],
GetBoolForKey("BounceAppIconsWhenUrgent"));
        WMSetButtonSelected(panel->swi[11],
GetBoolForKey("RaiseAppIconsWhenBouncing"));
        WMSetButtonSelected(panel->swi[12],
GetBoolForKey("OpaqueMoveResizeKeyboard"));
+       WMSetButtonSelected(panel->swi[13], 
GetBoolForKey("DoNotMakeAppIconsBounce"));
 }

 static void createPanel(Panel * p)
@@ -97,6 +98,7 @@ static void createPanel(Panel * p)
        WMSetButtonText(panel->swi[10], _("Bounce AppIcons when the
application wants attention."));
        WMSetButtonText(panel->swi[11], _("Raise AppIcons when bouncing."));
        WMSetButtonText(panel->swi[12], _("Opaque Move,Resize with keyboard."));
+       WMSetButtonText(panel->swi[13], _("Do not make AppIcons bounce."));

        /* If the item is default true, enable the button here */
        WMSetButtonEnabled(panel->swi[6], True);
@@ -129,6 +131,7 @@ static void storeDefaults(_Panel * panel)
        SetBoolForKey(WMGetButtonSelected(panel->swi[10]),
"BounceAppIconsWhenUrgent");
        SetBoolForKey(WMGetButtonSelected(panel->swi[11]),
"RaiseAppIconsWhenBouncing");
        SetBoolForKey(WMGetButtonSelected(panel->swi[12]),
"OpaqueMoveResizeKeyboard");
+       SetBoolForKey(WMGetButtonSelected(panel->swi[13]), 
"DoNotMakeAppIconsBounce");
 }

 Panel *InitExpert(WMScreen * scr, WMWidget * parent)
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index c0560a7..9153496 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -411,6 +411,7 @@ typedef struct WPreferences {
     /* bouncing animation */
     char bounce_appicons_when_urgent;
     char raise_appicons_when_bouncing;
+    char do_not_make_appicons_bounce;

     int edge_resistance;
     int resize_increment;
diff --git a/src/defaults.c b/src/defaults.c
index b5ea8e2..cad53b0 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -387,6 +387,8 @@ WDefaultEntry optionList[] = {
            &wPreferences.bounce_appicons_when_urgent, getBool, NULL, NULL, 
NULL},
        {"RaiseAppIconsWhenBouncing", "NO", NULL,
            &wPreferences.raise_appicons_when_bouncing, getBool, NULL, NULL, 
NULL},
+       {"DoNotMakeAppIconsBounce", "NO", NULL,
+           &wPreferences.do_not_make_appicons_bounce, getBool, NULL, NULL, 
NULL},
        {"DoubleClickTime", "250", (void *)&wPreferences.dblclick_time,
            &wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL},
        {"AlignSubmenus", "NO", NULL,
diff --git a/src/superfluous.c b/src/superfluous.c
index 50b60fe..78679ae 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -394,7 +394,8 @@ static int bounceDirection(WAppIcon *aicon)

 void wAppBounce(WApplication *wapp)
 {
-       if (!wPreferences.no_animations && wapp->app_icon && 
!wapp->flags.bouncing) {
+       if (!wPreferences.no_animations && wapp->app_icon && 
!wapp->flags.bouncing
+               && !wPreferences.do_not_make_appicons_bounce) {
                ++wapp->refcount;
                wapp->flags.bouncing = 1;

*** CUT HERE ***

Commit message: "Enable toggling of AppIcons bouncing"

Regards!
Giuseppe Gatta


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to