mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Turn wApplication{Activate,Deactivate} into real functions
The functions wApplicationActivate and wApplicationDeactivate are now defined as functions, not as preprocessor functions.
This commit is contained in:
committed by
Carlos R. Mafra
parent
517cd6a8be
commit
391a8edb9c
@@ -447,3 +447,24 @@ void wApplicationDestroy(WApplication * wapp)
|
|||||||
if (wPreferences.auto_arrange_icons)
|
if (wPreferences.auto_arrange_icons)
|
||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wApplicationActivate(WApplication *wapp)
|
||||||
|
{
|
||||||
|
#ifdef NEWAPPICON
|
||||||
|
if (wapp->app_icon) {
|
||||||
|
wIconSetHighlited(wapp->app_icon->icon, True);
|
||||||
|
wAppIconPaint(wapp->app_icon);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void wApplicationDeactivate(WApplication *wapp)
|
||||||
|
{
|
||||||
|
#ifdef NEWAPPICON
|
||||||
|
if (wapp->app_icon) {
|
||||||
|
wIconSetHighlited(wapp->app_icon->icon, False);
|
||||||
|
wAppIconPaint(wapp->app_icon);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,23 +55,6 @@ void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
|
|||||||
|
|
||||||
void wAppBounce(WApplication *);
|
void wAppBounce(WApplication *);
|
||||||
void wAppBounceWhileUrgent(WApplication *);
|
void wAppBounceWhileUrgent(WApplication *);
|
||||||
|
void wApplicationActivate(WApplication *);
|
||||||
#ifdef NEWAPPICON
|
void wApplicationDeactivate(WApplication *);
|
||||||
#define wApplicationActivate(wapp) do { \
|
|
||||||
if (wapp->app_icon) { \
|
|
||||||
wIconSetHighlited(wapp->app_icon->icon, True); \
|
|
||||||
wAppIconPaint(wapp->app_icon);\
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
#define wApplicationDeactivate(wapp) do { \
|
|
||||||
if (wapp->app_icon) { \
|
|
||||||
wIconSetHighlited(wapp->app_icon->icon, False); \
|
|
||||||
wAppIconPaint(wapp->app_icon);\
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
#else
|
|
||||||
#define wApplicationActivate(wapp) do { } while (0)
|
|
||||||
#define wApplicationDeactivate(wapp) do { } while (0)
|
|
||||||
#endif /* NEWAPPICON */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user