mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Move the default visual to globalconf
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
e76310ef77
commit
cc4e8d57d5
5 changed files with 8 additions and 13 deletions
8
draw.c
8
draw.c
|
@ -134,7 +134,7 @@ draw_context_init(draw_context_t *d,
|
|||
d->height = height;
|
||||
d->pixmap = px;
|
||||
d->surface = cairo_xcb_surface_create(globalconf.connection,
|
||||
px, globalconf.screens.tab[0].visual,
|
||||
px, globalconf.visual,
|
||||
width, height);
|
||||
d->cr = cairo_create(d->surface);
|
||||
d->layout = pango_cairo_create_layout(d->cr);
|
||||
|
@ -307,10 +307,10 @@ draw_rotate(draw_context_t *ctx,
|
|||
cairo_t *cr;
|
||||
|
||||
surface = cairo_xcb_surface_create(globalconf.connection, dest,
|
||||
globalconf.screens.tab[0].visual,
|
||||
globalconf.visual,
|
||||
dest_w, dest_h);
|
||||
source = cairo_xcb_surface_create(globalconf.connection, src,
|
||||
globalconf.screens.tab[0].visual,
|
||||
globalconf.visual,
|
||||
src_w, src_h);
|
||||
cr = cairo_create (surface);
|
||||
|
||||
|
@ -344,7 +344,7 @@ draw_text_extents(draw_text_context_t *data)
|
|||
|
||||
surface = cairo_xcb_surface_create(globalconf.connection,
|
||||
globalconf.default_screen,
|
||||
globalconf.screens.tab[0].visual,
|
||||
globalconf.visual,
|
||||
s->width_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 */
|
||||
surface = cairo_xcb_surface_create(globalconf.connection,
|
||||
globalconf.default_screen,
|
||||
globalconf.screens.tab[0].visual, 1, 1);
|
||||
globalconf.visual, 1, 1);
|
||||
|
||||
cr = cairo_create(surface);
|
||||
layout = pango_cairo_create_layout(cr);
|
||||
|
|
|
@ -109,6 +109,8 @@ typedef struct
|
|||
} systray;
|
||||
/** The monitor of startup notifications */
|
||||
SnMonitorContext *snmonitor;
|
||||
/** The default visual, used to draw */
|
||||
xcb_visualtype_t *visual;
|
||||
} awesome_t;
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
|
7
screen.c
7
screen.c
|
@ -151,8 +151,6 @@ screen_scan_randr(void)
|
|||
if(globalconf.screens.len > 1)
|
||||
globalconf.xinerama_is_active = true;
|
||||
|
||||
globalconf.screens.tab[0].visual = screen_default_visual(xutil_screen_get(globalconf.connection, globalconf.default_screen));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -213,9 +211,6 @@ screen_scan_xinerama(void)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -232,7 +227,6 @@ static void screen_scan_x11(void)
|
|||
s.geometry.y = 0;
|
||||
s.geometry.width = xcb_screen->width_in_pixels;
|
||||
s.geometry.height = xcb_screen->height_in_pixels;
|
||||
s.visual = screen_default_visual(xcb_screen);
|
||||
screen_array_append(&globalconf.screens, s);
|
||||
}
|
||||
|
||||
|
@ -245,6 +239,7 @@ screen_scan(void)
|
|||
screen_scan_x11();
|
||||
|
||||
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.
|
||||
|
|
2
screen.h
2
screen.h
|
@ -38,8 +38,6 @@ struct a_screen
|
|||
client_t *prev_client_focus;
|
||||
/** Focused client */
|
||||
client_t *client_focus;
|
||||
/** The default visual, used to draw */
|
||||
xcb_visualtype_t *visual;
|
||||
/** The signals emitted by screen objects */
|
||||
signal_array_t signals;
|
||||
/** True if the banning on this screen needs to be updated */
|
||||
|
|
Loading…
Reference in a new issue