mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
.desktop: remove StartupWMClass from server, use distinct StartupWMClass for foot and footclient
For this to work, the default app-id of footclient has been changed from ‘foot’ to ‘footclient’. By using distinct StartupWMClasses, the compositor can connect a running foot/footclient instance to the correct .desktop-file. This ensures the correct icon is being used in e.g. docks, and that actions like “open another window” works correctly. Note that the user can override the app-id, either by setting app-id in foot.ini, or with the -a,--app-id command line option. Closes #1355
This commit is contained in:
parent
f4b8e4f4d6
commit
134b54dfe0
10 changed files with 19 additions and 13 deletions
7
config.c
7
config.c
|
|
@ -2905,7 +2905,8 @@ config_font_list_clone(struct config_font_list *dst,
|
|||
bool
|
||||
config_load(struct config *conf, const char *conf_path,
|
||||
user_notifications_t *initial_user_notifications,
|
||||
config_override_t *overrides, bool errors_are_fatal)
|
||||
config_override_t *overrides, bool errors_are_fatal,
|
||||
bool as_server)
|
||||
{
|
||||
bool ret = false;
|
||||
enum fcft_capabilities fcft_caps = fcft_capabilities();
|
||||
|
|
@ -2914,7 +2915,7 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.term = xstrdup(FOOT_DEFAULT_TERM),
|
||||
.shell = get_shell(),
|
||||
.title = xstrdup("foot"),
|
||||
.app_id = xstrdup("foot"),
|
||||
.app_id = (as_server ? xstrdup("footclient") : xstrdup("foot")),
|
||||
.word_delimiters = xc32dup(U",│`|:\"'()[]{}<>"),
|
||||
.size = {
|
||||
.type = CONF_SIZE_PX,
|
||||
|
|
@ -3348,7 +3349,7 @@ UNITTEST
|
|||
user_notifications_t nots = tll_init();
|
||||
config_override_t overrides = tll_init();
|
||||
|
||||
bool ret = config_load(&original, "/dev/null", ¬s, &overrides, false);
|
||||
bool ret = config_load(&original, "/dev/null", ¬s, &overrides, false, false);
|
||||
xassert(ret);
|
||||
|
||||
struct config *clone = config_clone(&original);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue