mirror of
https://github.com/dylanaraps/sowm.git
synced 2026-11-17 19:31:17 +00:00
sowm: Shuffle declarations around
This commit is contained in:
3 files changed
+24
-23
No files matched your search
@@ -1,27 +1,7 @@
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
struct wconf {
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint8_t stack_mode;
|
||||
xcb_window_t sibling;
|
||||
};
|
||||
|
||||
xcb_connection_t *dpy;
|
||||
xcb_screen_t *scr;
|
||||
xcb_drawable_t root;
|
||||
|
||||
uint32_t ev_vals[3];
|
||||
|
||||
#define EVENT_MASK(e) (((e) & ~0x80))
|
||||
|
||||
void init_wm(void);
|
||||
void init_input(void);
|
||||
void run_loop(void);
|
||||
|
||||
void event_button_press(xcb_generic_event_t *ev);
|
||||
void event_button_release(xcb_generic_event_t *ev);
|
||||
void event_configure_request(xcb_generic_event_t *ev);
|
||||
@@ -41,5 +21,3 @@ void (*events[XCB_NO_OPERATION])(xcb_generic_event_t *) = {
|
||||
[XCB_ENTER_NOTIFY] = event_notify_enter,
|
||||
[XCB_MOTION_NOTIFY] = event_notify_motion
|
||||
};
|
||||
|
||||
void win_add(xcb_window_t win);
|
||||
@@ -5,7 +5,20 @@
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
#include "sowm.h"
|
||||
#include "event.h"
|
||||
#include "types.h"
|
||||
|
||||
static xcb_connection_t *dpy;
|
||||
static xcb_screen_t *scr;
|
||||
static xcb_drawable_t root;
|
||||
|
||||
/* required for button press, motion and release */
|
||||
static uint32_t ev_vals[3];
|
||||
|
||||
static void init_wm(void);
|
||||
static void init_input(void);
|
||||
static void run_loop(void);
|
||||
static void win_add(xcb_window_t win);
|
||||
|
||||
void event_button_press(xcb_generic_event_t *ev) {
|
||||
xcb_button_press_event_t *e = (xcb_button_press_event_t *)ev;
|
||||
|
||||
Reference in new issue
Block a user