mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
WindowMaker: Add Balloon to the clip
Display a standard Window Maker balloon with the workspace name when the
mouse enters the clip area.
This complements commit 4954d4df23 ("clip: Do not display balloon with
workspace name") because now the balloon which appears on the clip is the
same as in other parts of wmaker.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
4954d4df23
commit
6368bde7e5
@@ -439,7 +439,15 @@ static void appiconBalloon(WObjDescriptor * object)
|
|||||||
WScreen *scr = aicon->icon->core->screen_ptr;
|
WScreen *scr = aicon->icon->core->screen_ptr;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
if (aicon->command && aicon->wm_class) {
|
/* Show balloon if it is the Clip and the workspace name is > 5 chars */
|
||||||
|
if (object->parent == scr->clip_icon) {
|
||||||
|
if (strlen(scr->workspaces[scr->current_workspace]->name) > 5) {
|
||||||
|
scr->balloon->text = wstrdup(scr->workspaces[scr->current_workspace]->name);
|
||||||
|
} else {
|
||||||
|
wBalloonHide(scr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (aicon->command && aicon->wm_class) {
|
||||||
int len = strlen(aicon->command) + strlen(aicon->wm_class) + 8;
|
int len = strlen(aicon->command) + strlen(aicon->wm_class) + 8;
|
||||||
tmp = wmalloc(len);
|
tmp = wmalloc(len);
|
||||||
snprintf(tmp, len, "%s\n(%s)", aicon->wm_class, aicon->command);
|
snprintf(tmp, len, "%s\n(%s)", aicon->wm_class, aicon->command);
|
||||||
@@ -510,24 +518,19 @@ void wBalloonEnteredObject(WScreen * scr, WObjDescriptor * object)
|
|||||||
balloon->ignoreTimer = 0;
|
balloon->ignoreTimer = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (object->parent_type) {
|
switch (object->parent_type) {
|
||||||
case WCLASS_FRAME:
|
case WCLASS_FRAME:
|
||||||
if (wPreferences.window_balloon) {
|
if (wPreferences.window_balloon)
|
||||||
frameBalloon(object);
|
frameBalloon(object);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WCLASS_DOCK_ICON:
|
case WCLASS_DOCK_ICON:
|
||||||
if (object->parent != scr->clip_icon && wPreferences.appicon_balloon)
|
if (wPreferences.appicon_balloon)
|
||||||
appiconBalloon(object);
|
appiconBalloon(object);
|
||||||
else
|
|
||||||
wBalloonHide(scr);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WCLASS_MINIWINDOW:
|
case WCLASS_MINIWINDOW:
|
||||||
if (wPreferences.miniwin_balloon) {
|
if (wPreferences.miniwin_balloon)
|
||||||
miniwindowBalloon(object);
|
miniwindowBalloon(object);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case WCLASS_APPICON:
|
case WCLASS_APPICON:
|
||||||
if (wPreferences.appicon_balloon)
|
if (wPreferences.appicon_balloon)
|
||||||
|
|||||||
Reference in New Issue
Block a user