Replies: 4 comments 7 replies
-
Right, so in your config you have a variable static const char *tags[] = { "α", "β", "γ", "δ", "ε" }; and in the problematic functions in seamlessrestart.c you have: if (nitems) {
tags = *(Atom *)p;
m->tagset[m->seltags] = tags & TAGMASK;
} The macro of TAGMASK will expand to: m->tagset[m->seltags] = tags & ((1 << LENGTH(tags)) - 1); and So if you rename the local variables to something else then it will compile fine, e.g. diff --git a/seamlessrestart.c b/seamlessrestart.c
index 4db3f93..b4dba17 100644
--- a/seamlessrestart.c
+++ b/seamlessrestart.c
@@ -157,7 +157,7 @@ getmonitortags(Monitor *m)
unsigned long dl, nitems;
unsigned char *p = NULL;
char atom[22] = {0};
- Atom da, monitor_tags = None, tags;
+ Atom da, monitor_tags = None, seltags;
sprintf(atom, "_DWM_MONITOR_TAGS_%u", m->num);
monitor_tags = XInternAtom(dpy, atom, False);
@@ -168,8 +168,8 @@ getmonitortags(Monitor *m)
}
if (nitems) {
- tags = *(Atom *)p;
- m->tagset[m->seltags] = tags & TAGMASK;
+ seltags = *(Atom *)p;
+ m->tagset[m->seltags] = seltags & TAGMASK;
}
XFree(p);
@@ -237,11 +237,11 @@ setclienttags(Client *c)
int
getclienttags(Client *c)
{
- Atom tags = getatomprop(c, clientatom[ClientTags], AnyPropertyType);
- if (tags == None)
+ Atom clienttags = getatomprop(c, clientatom[ClientTags], AnyPropertyType);
+ if (clienttags == None)
return 0;
- c->tags = tags & TAGMASK;
+ c->tags = clienttags & TAGMASK;
return 1;
} |
Beta Was this translation helpful? Give feedback.
-
It can get messy very quickly. Besides preserving information before restarting the restoring of client state, etc., also depends on the order things happen in I would have created a standalone patch for seamless restart, but there is not that much that can be preserved on a bare dwm besides nmaster, the layout and whether the bar is shown or not. The As for 1. I'd say that this is related to that the window float position is stored for clients and thus the As for 2. do you perhaps have something that automatically starts dwm again if you quit? Otherwise could be that the layout is actually floating upon restart. You mentioned an issue with preserving layouts on restart. Also worth noting that it doesn't copy anything into For 3. I'm not entirely sure, but in cleanup when restarting we unmap and destroy the systray window. In most cases the systray application will try to map the systray icon window again. It may be that Gajim feels that life is not worth living after having been abandoned by the charming but abrasive systray window and decides to off itself. |
Beta Was this translation helpful? Give feedback.
-
So, I decided to continue all this stuff (I'm still porting only parts relevant to the patches I'm using) after adding
I decided to define The git tree URL is the same |
Beta Was this translation helpful? Give feedback.
-
So I mitigated another name clash (pushed), and it compiles successfully. However, the same issues remain, except for these:
|
Beta Was this translation helpful? Give feedback.
-
Hi there, hello. I wanna port the seamless restart feature to my build of dwm, but it seems to be heavily dependent on dusk and dwm-flexipatch's own features.
First, I straight up copied seamless_restart.c (and cut out any lines that for patches I'm not using), added to dwm.c only lines activated by
SEAMLESS_RESTART
and expandedgetatomprop()
to work with three arguments (so it doesn't output errors on arguments number mismatch). There's still one error that I don't know how to deal with -- TAGMASK type:This part seems to rely on your implementation of the number of tags, which I personally don't wanna implement. How can I adapt it to the vanilla implementation? Do I need to copy more stuff from this commit of yours where you introduced it first?
Reference:
Beta Was this translation helpful? Give feedback.
All reactions