From 0b6129e625f92c8d1ed8639f041d1a90af3e054d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 12 Feb 2008 15:43:57 +0100 Subject: [PATCH] remove {load,save}awesomeprops() this is too bugged --- awesome.c | 6 +++--- layout.c | 53 ----------------------------------------------------- layout.h | 2 -- tag.c | 1 - 4 files changed, 3 insertions(+), 59 deletions(-) diff --git a/awesome.c b/awesome.c index aabfc14d9..821467723 100644 --- a/awesome.c +++ b/awesome.c @@ -142,6 +142,9 @@ setup(int screen) grabkeys(phys_screen); + /* view at least one tag */ + tag_view(globalconf.screens[screen].tags, True); + for(statusbar = globalconf.screens[screen].statusbar; statusbar; statusbar = statusbar->next) statusbar_init(statusbar); } @@ -310,9 +313,6 @@ main(int argc, char *argv[]) /* do this only for real screen */ for(screen = 0; screen < ScreenCount(dpy); 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); diff --git a/layout.c b/layout.c index 72a42cf9d..4c439c652 100644 --- a/layout.c +++ b/layout.c @@ -111,57 +111,6 @@ layout_get_current(int screen) return l; } -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++; - - prop = p_new(char, ntags + 1); - - if(xgettextprop(RootWindow(globalconf.display, get_phys_screen(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) - if(prop[i] == '1') - { - tag_view_byindex(screen, i, prop[i] == '1'); - ret = True; - } - - p_delete(&prop); - - return ret; -} - -void -saveawesomeprops(int screen) -{ - int i, ntags = 0; - char *prop; - Tag *tag; - - for(tag = globalconf.screens[screen].tags; tag; tag = tag->next) - ntags++; - - prop = p_new(char, ntags + 1); - - for(i = 0, tag = globalconf.screens[screen].tags; tag; tag = tag->next, i++) - prop[i] = tag->selected ? '1' : '0'; - - prop[i] = '\0'; - XChangeProperty(globalconf.display, - RootWindow(globalconf.display, get_phys_screen(screen)), - XInternAtom(globalconf.display, "_AWESOME_PROPERTIES", False), - XA_STRING, 8, PropModeReplace, (unsigned char *) prop, i); - p_delete(&prop); -} - /** Set layout for tag * \param screen Screen ID * \param arg Layout specifier @@ -204,8 +153,6 @@ uicb_tag_setlayout(int screen, char *arg) arrange(screen); widget_invalidate_cache(screen, WIDGET_CACHE_LAYOUTS); - - saveawesomeprops(screen); } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/layout.h b/layout.h index 2ce67df3d..2d57f0156 100644 --- a/layout.h +++ b/layout.h @@ -42,8 +42,6 @@ DO_SLIST(Layout, layout, p_delete); int layout_refresh(void); Layout * layout_get_current(int); -Bool loadawesomeprops(int); -void saveawesomeprops(int); Uicb uicb_tag_setlayout; diff --git a/tag.c b/tag.c index bb75d1b34..7adb5cb1f 100644 --- a/tag.c +++ b/tag.c @@ -325,7 +325,6 @@ tag_view(Tag *tag, Bool view) tag->selected = view; ewmh_update_net_current_desktop(get_phys_screen(tag->screen)); widget_invalidate_cache(tag->screen, WIDGET_CACHE_TAGS); - saveawesomeprops(tag->screen); globalconf.screens[tag->screen].need_arrange = True; }