[widget] Stop using useless screen fct
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8776b3adb5
commit
b3bb0faf36
10
widget.c
10
widget.c
|
@ -29,7 +29,6 @@
|
||||||
#include "statusbar.h"
|
#include "statusbar.h"
|
||||||
#include "titlebar.h"
|
#include "titlebar.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "screen.h"
|
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
extern awesome_t globalconf;
|
extern awesome_t globalconf;
|
||||||
|
@ -133,12 +132,13 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_
|
||||||
{
|
{
|
||||||
xcb_window_t rootwin;
|
xcb_window_t rootwin;
|
||||||
xcb_pixmap_t rootpix;
|
xcb_pixmap_t rootpix;
|
||||||
|
xcb_screen_t *s;
|
||||||
widget_node_t *w;
|
widget_node_t *w;
|
||||||
int left = 0, right = 0;
|
int left = 0, right = 0;
|
||||||
char *data;
|
char *data;
|
||||||
xcb_get_property_reply_t *prop_r;
|
xcb_get_property_reply_t *prop_r;
|
||||||
xcb_get_property_cookie_t prop_c;
|
xcb_get_property_cookie_t prop_c;
|
||||||
area_t rectangle = { 0, 0, 0, 0, NULL, NULL }, rootsize;
|
area_t rectangle = { 0, 0, 0, 0, NULL, NULL };
|
||||||
xcb_atom_t rootpix_atom, pixmap_atom;
|
xcb_atom_t rootpix_atom, pixmap_atom;
|
||||||
xutil_intern_atom_request_t rootpix_atom_req, pixmap_atom_req;
|
xutil_intern_atom_request_t rootpix_atom_req, pixmap_atom_req;
|
||||||
|
|
||||||
|
@ -154,6 +154,7 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_
|
||||||
|
|
||||||
if(ctx->bg.alpha != 0xffff)
|
if(ctx->bg.alpha != 0xffff)
|
||||||
{
|
{
|
||||||
|
s = xcb_aux_get_screen(globalconf.connection, globalconf.default_screen);
|
||||||
rootwin = xcb_aux_get_screen(globalconf.connection, ctx->phys_screen)->root;
|
rootwin = xcb_aux_get_screen(globalconf.connection, ctx->phys_screen)->root;
|
||||||
pixmap_atom = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, pixmap_atom_req);
|
pixmap_atom = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, pixmap_atom_req);
|
||||||
rootpix_atom = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, rootpix_atom_req);
|
rootpix_atom = xutil_intern_atom_reply(globalconf.connection, &globalconf.atoms, rootpix_atom_req);
|
||||||
|
@ -164,13 +165,12 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_
|
||||||
if((data = xcb_get_property_value(prop_r)))
|
if((data = xcb_get_property_value(prop_r)))
|
||||||
{
|
{
|
||||||
rootpix = *(xcb_pixmap_t *) data;
|
rootpix = *(xcb_pixmap_t *) data;
|
||||||
rootsize = display_area_get(ctx->phys_screen, NULL, NULL);
|
|
||||||
switch(position)
|
switch(position)
|
||||||
{
|
{
|
||||||
case Left:
|
case Left:
|
||||||
draw_rotate(ctx,
|
draw_rotate(ctx,
|
||||||
rootpix, ctx->pixmap,
|
rootpix, ctx->pixmap,
|
||||||
rootsize.width, rootsize.height,
|
s->width_in_pixels, s->height_in_pixels,
|
||||||
ctx->width, ctx->height,
|
ctx->width, ctx->height,
|
||||||
M_PI_2,
|
M_PI_2,
|
||||||
y + ctx->width,
|
y + ctx->width,
|
||||||
|
@ -179,7 +179,7 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_
|
||||||
case Right:
|
case Right:
|
||||||
draw_rotate(ctx,
|
draw_rotate(ctx,
|
||||||
rootpix, ctx->pixmap,
|
rootpix, ctx->pixmap,
|
||||||
rootsize.width, rootsize.height,
|
s->width_in_pixels, s->height_in_pixels,
|
||||||
ctx->width, ctx->height,
|
ctx->width, ctx->height,
|
||||||
- M_PI_2,
|
- M_PI_2,
|
||||||
- y,
|
- y,
|
||||||
|
|
Loading…
Reference in New Issue