check that loadawesomeprops() set view on at least one tag
This commit is contained in:
parent
a84eae2700
commit
83e58a3a73
|
@ -52,6 +52,7 @@
|
|||
#include "client.h"
|
||||
#include "focus.h"
|
||||
#include "ewmh.h"
|
||||
#include "tag.h"
|
||||
#include "common/awclient.h"
|
||||
#include "common/util.h"
|
||||
#include "common/awesome-version.h"
|
||||
|
@ -309,7 +310,9 @@ main(int argc, char *argv[])
|
|||
/* do this only for real screen */
|
||||
for(screen = 0; screen < ScreenCount(dpy); screen++)
|
||||
{
|
||||
loadawesomeprops(screen);
|
||||
/* if loadawesomeprops fails, set view on first tag */
|
||||
if(!loadawesomeprops(screen))
|
||||
tag_view(globalconf.screens[screen].tags, True);
|
||||
ewmh_set_supported_hints(screen);
|
||||
/* call this to at least grab root window clicks */
|
||||
window_root_grabbuttons(screen);
|
||||
|
|
11
layout.c
11
layout.c
|
@ -111,12 +111,13 @@ layout_get_current(int screen)
|
|||
return l;
|
||||
}
|
||||
|
||||
void
|
||||
Bool
|
||||
loadawesomeprops(int screen)
|
||||
{
|
||||
int i, ntags = 0;
|
||||
char *prop;
|
||||
Tag *tag;
|
||||
Bool ret = False;
|
||||
|
||||
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
|
||||
ntags++;
|
||||
|
@ -127,9 +128,15 @@ loadawesomeprops(int screen)
|
|||
XInternAtom(globalconf.display, "_AWESOME_PROPERTIES", False),
|
||||
prop, ntags + 1))
|
||||
for(i = 0, tag = globalconf.screens[screen].tags; tag && prop[i]; i++, tag = tag->next)
|
||||
tag_view_byindex(screen, i, prop[i] == '1');
|
||||
if(prop[i] == '1')
|
||||
{
|
||||
tag_view_byindex(screen, i, prop[i] == '1');
|
||||
ret = True;
|
||||
}
|
||||
|
||||
p_delete(&prop);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue