Move the default visual to globalconf
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
e76310ef77
commit
cc4e8d57d5
8
draw.c
8
draw.c
|
@ -134,7 +134,7 @@ draw_context_init(draw_context_t *d,
|
||||||
d->height = height;
|
d->height = height;
|
||||||
d->pixmap = px;
|
d->pixmap = px;
|
||||||
d->surface = cairo_xcb_surface_create(globalconf.connection,
|
d->surface = cairo_xcb_surface_create(globalconf.connection,
|
||||||
px, globalconf.screens.tab[0].visual,
|
px, globalconf.visual,
|
||||||
width, height);
|
width, height);
|
||||||
d->cr = cairo_create(d->surface);
|
d->cr = cairo_create(d->surface);
|
||||||
d->layout = pango_cairo_create_layout(d->cr);
|
d->layout = pango_cairo_create_layout(d->cr);
|
||||||
|
@ -307,10 +307,10 @@ draw_rotate(draw_context_t *ctx,
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
|
|
||||||
surface = cairo_xcb_surface_create(globalconf.connection, dest,
|
surface = cairo_xcb_surface_create(globalconf.connection, dest,
|
||||||
globalconf.screens.tab[0].visual,
|
globalconf.visual,
|
||||||
dest_w, dest_h);
|
dest_w, dest_h);
|
||||||
source = cairo_xcb_surface_create(globalconf.connection, src,
|
source = cairo_xcb_surface_create(globalconf.connection, src,
|
||||||
globalconf.screens.tab[0].visual,
|
globalconf.visual,
|
||||||
src_w, src_h);
|
src_w, src_h);
|
||||||
cr = cairo_create (surface);
|
cr = cairo_create (surface);
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ draw_text_extents(draw_text_context_t *data)
|
||||||
|
|
||||||
surface = cairo_xcb_surface_create(globalconf.connection,
|
surface = cairo_xcb_surface_create(globalconf.connection,
|
||||||
globalconf.default_screen,
|
globalconf.default_screen,
|
||||||
globalconf.screens.tab[0].visual,
|
globalconf.visual,
|
||||||
s->width_in_pixels,
|
s->width_in_pixels,
|
||||||
s->height_in_pixels);
|
s->height_in_pixels);
|
||||||
|
|
||||||
|
|
2
font.c
2
font.c
|
@ -43,7 +43,7 @@ font_new(const char *fontname)
|
||||||
* order to get font informations */
|
* order to get font informations */
|
||||||
surface = cairo_xcb_surface_create(globalconf.connection,
|
surface = cairo_xcb_surface_create(globalconf.connection,
|
||||||
globalconf.default_screen,
|
globalconf.default_screen,
|
||||||
globalconf.screens.tab[0].visual, 1, 1);
|
globalconf.visual, 1, 1);
|
||||||
|
|
||||||
cr = cairo_create(surface);
|
cr = cairo_create(surface);
|
||||||
layout = pango_cairo_create_layout(cr);
|
layout = pango_cairo_create_layout(cr);
|
||||||
|
|
|
@ -109,6 +109,8 @@ typedef struct
|
||||||
} systray;
|
} systray;
|
||||||
/** The monitor of startup notifications */
|
/** The monitor of startup notifications */
|
||||||
SnMonitorContext *snmonitor;
|
SnMonitorContext *snmonitor;
|
||||||
|
/** The default visual, used to draw */
|
||||||
|
xcb_visualtype_t *visual;
|
||||||
} awesome_t;
|
} awesome_t;
|
||||||
|
|
||||||
extern awesome_t globalconf;
|
extern awesome_t globalconf;
|
||||||
|
|
7
screen.c
7
screen.c
|
@ -151,8 +151,6 @@ screen_scan_randr(void)
|
||||||
if(globalconf.screens.len > 1)
|
if(globalconf.screens.len > 1)
|
||||||
globalconf.xinerama_is_active = true;
|
globalconf.xinerama_is_active = true;
|
||||||
|
|
||||||
globalconf.screens.tab[0].visual = screen_default_visual(xutil_screen_get(globalconf.connection, globalconf.default_screen));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,9 +211,6 @@ screen_scan_xinerama(void)
|
||||||
|
|
||||||
p_delete(&xsq);
|
p_delete(&xsq);
|
||||||
|
|
||||||
xcb_screen_t *s = xutil_screen_get(globalconf.connection, globalconf.default_screen);
|
|
||||||
globalconf.screens.tab[0].visual = screen_default_visual(s);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +227,6 @@ static void screen_scan_x11(void)
|
||||||
s.geometry.y = 0;
|
s.geometry.y = 0;
|
||||||
s.geometry.width = xcb_screen->width_in_pixels;
|
s.geometry.width = xcb_screen->width_in_pixels;
|
||||||
s.geometry.height = xcb_screen->height_in_pixels;
|
s.geometry.height = xcb_screen->height_in_pixels;
|
||||||
s.visual = screen_default_visual(xcb_screen);
|
|
||||||
screen_array_append(&globalconf.screens, s);
|
screen_array_append(&globalconf.screens, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,6 +239,7 @@ screen_scan(void)
|
||||||
screen_scan_x11();
|
screen_scan_x11();
|
||||||
|
|
||||||
globalconf.screen_focus = globalconf.screens.tab;
|
globalconf.screen_focus = globalconf.screens.tab;
|
||||||
|
globalconf.visual = screen_default_visual(xutil_screen_get(globalconf.connection, globalconf.default_screen));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the Xinerama screen number where the coordinates belongs to.
|
/** Return the Xinerama screen number where the coordinates belongs to.
|
||||||
|
|
2
screen.h
2
screen.h
|
@ -38,8 +38,6 @@ struct a_screen
|
||||||
client_t *prev_client_focus;
|
client_t *prev_client_focus;
|
||||||
/** Focused client */
|
/** Focused client */
|
||||||
client_t *client_focus;
|
client_t *client_focus;
|
||||||
/** The default visual, used to draw */
|
|
||||||
xcb_visualtype_t *visual;
|
|
||||||
/** The signals emitted by screen objects */
|
/** The signals emitted by screen objects */
|
||||||
signal_array_t signals;
|
signal_array_t signals;
|
||||||
/** True if the banning on this screen needs to be updated */
|
/** True if the banning on this screen needs to be updated */
|
||||||
|
|
Loading…
Reference in New Issue