1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-31 19:12:32 +01:00

new appicon grouping stuff

This commit is contained in:
kojima
2001-02-11 02:18:26 +00:00
parent 0fae7d3e77
commit 7a491db6c1
12 changed files with 332 additions and 471 deletions

View File

@@ -518,6 +518,7 @@ wWindowObscuresWindow(WWindow *wwin, WWindow *obscured)
}
/*
*----------------------------------------------------------------
* wManageWindow--
@@ -1020,9 +1021,6 @@ wManageWindow(WScreen *scr, Window window)
wFrameWindowUpdatePushButton(wwin->frame, True);
#endif /* OLWM_HINTS */
wFrameWindowChangeTitle(wwin->frame, title ? title : DEF_WINDOW_TITLE);
if (title)
XFree(title);
wwin->frame->workspace = workspace;
@@ -1211,6 +1209,12 @@ wManageWindow(WScreen *scr, Window window)
wwin->prev = NULL;
}
/* Update name must come after WApplication stuff is done */
wWindowUpdateName(wwin, title);
if (title)
XFree(title);
#ifdef GNOME_STUFF
wGNOMEUpdateClientStateHint(wwin, True);
#endif
@@ -1755,6 +1759,53 @@ wWindowUnfocus(WWindow *wwin)
}
void
wWindowUpdateName(WWindow *wwin, char *newTitle)
{
WApplication *app = wApplicationOf(wwin->main_window);
int instIndex = 0;
Bool res;
char prefix[32] = "";
char *tmp, *title;
if (!wwin->frame)
return;
if (app)
instIndex = wApplicationIndexOfInstance(app);
wwin->flags.wm_name_changed = 1;
if (!newTitle) {
/* the hint was removed */
title = DEF_WINDOW_TITLE;
#ifdef KWM_HINTS
wKWMSendEventMessage(wwin, WKWMChangedClient);
#endif
} else {
title = newTitle;
}
if (instIndex > 0) {
sprintf(prefix, " [%i]", instIndex);
title = wstrconcat(title, prefix);
}
if (wFrameWindowChangeTitle(wwin->frame, title)) {
/* only update the menu if the title has actually changed */
UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE);
#ifdef KWM_HINTS
wKWMSendEventMessage(wwin, WKWMChangedClient);
#endif
}
if (instIndex > 0)
wfree(title);
}
/*
*----------------------------------------------------------------------