X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=inline;f=openbox%2Fframe.c;h=0975214cbf4ddef804dc7e849d49a9c171b4fec8;hb=b097f84dfdf4e2548dba96aa63325cb05b5244a1;hp=5b7ecac61276c148399cd8714119ba0190ccd76d;hpb=29637976e6aecf45bae84ba9ce3ecb26635012f7;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index 5b7ecac6..0975214c 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -101,13 +101,12 @@ ObFrame *frame_new(ObClient *client) mask |= CWColormap | CWBackPixel | CWBorderPixel; /* create a colormap with the visual */ self->colormap = attrib.colormap = - XCreateColormap(obt_display, - RootWindow(obt_display, ob_screen), + XCreateColormap(obt_display, obt_root(ob_screen), visual, AllocNone); attrib.background_pixel = BlackPixel(obt_display, ob_screen); attrib.border_pixel = BlackPixel(obt_display, ob_screen); } - self->window = createWindow(RootWindow(obt_display, ob_screen), visual, + self->window = createWindow(obt_root(ob_screen), visual, mask, &attrib); /* create the visible decor windows */ @@ -215,27 +214,10 @@ static void set_theme_statics(ObFrame *self) ob_rr_theme->paddingx + 1, ob_rr_theme->title_height); XResizeWindow(obt_display, self->trrresize, ob_rr_theme->paddingx + 1, ob_rr_theme->title_height); - - /* set up the dynamic appearances */ - self->a_unfocused_title = RrAppearanceCopy(ob_rr_theme->a_unfocused_title); - self->a_focused_title = RrAppearanceCopy(ob_rr_theme->a_focused_title); - self->a_unfocused_label = RrAppearanceCopy(ob_rr_theme->a_unfocused_label); - self->a_focused_label = RrAppearanceCopy(ob_rr_theme->a_focused_label); - self->a_unfocused_handle = - RrAppearanceCopy(ob_rr_theme->a_unfocused_handle); - self->a_focused_handle = RrAppearanceCopy(ob_rr_theme->a_focused_handle); - self->a_icon = RrAppearanceCopy(ob_rr_theme->a_icon); } static void free_theme_statics(ObFrame *self) { - RrAppearanceFree(self->a_unfocused_title); - RrAppearanceFree(self->a_focused_title); - RrAppearanceFree(self->a_unfocused_label); - RrAppearanceFree(self->a_focused_label); - RrAppearanceFree(self->a_unfocused_handle); - RrAppearanceFree(self->a_focused_handle); - RrAppearanceFree(self->a_icon); } void frame_free(ObFrame *self) @@ -1076,10 +1058,8 @@ void frame_release_client(ObFrame *self) if (reparent) { /* according to the ICCCM - if the client doesn't reparent itself, then we will reparent the window to root for them */ - XReparentWindow(obt_display, self->client->window, - RootWindow(obt_display, ob_screen), - self->client->area.x, - self->client->area.y); + XReparentWindow(obt_display, self->client->window, obt_root(ob_screen), + self->client->area.x, self->client->area.y); } /* remove all the windows for the frame from the window_map */ @@ -1357,7 +1337,7 @@ ObFrameContext frame_context(ObClient *client, Window win, gint x, gint y) if (moveresize_in_progress) return OB_FRAME_CONTEXT_MOVE_RESIZE; - if (win == RootWindow(obt_display, ob_screen)) + if (win == obt_root(ob_screen)) return OB_FRAME_CONTEXT_ROOT ; if (client == NULL) return OB_FRAME_CONTEXT_NONE; if (win == client->window) {