systray: fix screen number retrieval

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-12-10 10:10:20 +01:00
parent a8425df036
commit 84acfc4652
1 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,7 @@
#include "widget.h"
#include "screen.h"
#include "wibox.h"
#include "luaa.h"
#include "globalconf.h"
#include "common/xembed.h"
#include "common/atoms.h"
@ -41,9 +42,11 @@ typedef struct
static area_t
systray_extents(lua_State *L, widget_t *widget)
{
int screen = screen_virttophys(luaL_optnumber(L, -1, 1));
int screen = luaL_optnumber(L, -1, 1) - 1;
luaA_checkscreen(screen);
area_t geometry;
int phys_screen = screen_virttophys(screen), n = 0;
int phys_screen = screen_virttophys(screen), n = 0;
systray_data_t *d = widget->data;
for(int i = 0; i < globalconf.embedded.len; i++)