#include <util.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
-#include <X11/Xatom.h>
-#include <X11/XKBlib.h>
-#include <X11/Xlib-xcb.h>
-#include <X11/Xproto.h>
-#include <X11/Xutil.h>
+#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/XTest.h>
-#include <xcb/randr.h>
+#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_event.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/xtest.h>
+#include <xcb/randr.h>
/* local includes */
#include "version.h"
char *bar_fonts;
struct passwd *pwd;
-#define SWM_MENU_FN (2)
-#define SWM_MENU_NB (4)
-#define SWM_MENU_NF (6)
-#define SWM_MENU_SB (8)
-#define SWM_MENU_SF (10)
-
/* layout manager data */
struct swm_geometry {
int x;
void
custom_region(char *val)
{
- unsigned int sidx, x, y, w, h;
- int num_screens;
+ unsigned int x, y, w, h;
+ int sidx, num_screens;
xcb_screen_t *screen;
num_screens = xcb_setup_roots_length(xcb_get_setup(conn));
- if (sscanf(val, "screen[%u]:%ux%u+%u+%u", &sidx, &w, &h, &x, &y) != 5)
+ if (sscanf(val, "screen[%d]:%ux%u+%u+%u", &sidx, &w, &h, &x, &y) != 5)
errx(1, "invalid custom region, "
"should be 'screen[<n>]:<n>x<n>+<n>+<n>");
if (sidx < 1 || sidx > num_screens)
void
grabkeys(void)
{
- int num_screens;
- unsigned int j, k;
+ int num_screens, k;
+ unsigned int j;
xcb_keycode_t *code;
unsigned int modifiers[] =
{ 0, LockMask, numlockmask, numlockmask | LockMask };
xcb_window_t trans = XCB_WINDOW_NONE;
struct workspace *ws;
struct ws_win *win, *ww;
- int i, ws_idx, border_me = 0;
+ int ws_idx, border_me = 0;
xcb_atom_t ws_idx_atom = XCB_ATOM_NONE;
char ws_idx_str[SWM_PROPLEN], *prop = NULL;
size_t proplen;
const char *errstr;
struct pid_e *p;
struct quirk *qp;
- uint32_t event_mask;
+ uint32_t event_mask, i;
xcb_atom_t prot;
xcb_get_property_reply_t *gpr;
xcb_icccm_get_wm_protocols_reply_t wpr;
buttonpress(xcb_button_press_event_t *e)
{
struct ws_win *win;
- int i, action;
+ int i;
+ unsigned int action;
DNPRINTF(SWM_D_EVENT, "buttonpress: window 0x%x, detail: %u\n",
e->event, e->detail);
xcb_flush(conn);
}
-int
-xerror_start(Display *d, XErrorEvent *ee)
-{
- other_wm = 1;
- return (-1);
-}
-
-int
-xerror(Display *d, XErrorEvent *ee)
-{
- /* warnx("error: %p %p", display, ee); */
- return (-1);
-}
-
void
active_wm(void)
{