todo moving floating

This commit is contained in:
vaxerski 2021-11-21 15:25:57 +01:00
parent d3d5e4379b
commit f440ca4e37
4 changed files with 17 additions and 5 deletions

View file

@ -88,7 +88,7 @@ void Events::eventMapWindow(xcb_generic_event_t* event) {
g_pWindowManager->setFocusedWindow(E->window);
}
void Events::eventKeyPress(xcb_generic_event_t* event) {
void Events::eventButtonPress(xcb_generic_event_t* event) {
const auto E = reinterpret_cast<xcb_key_press_event_t*>(event);
const auto KEYSYM = KeybindManager::getKeysymFromKeycode(E->detail);
@ -100,6 +100,12 @@ void Events::eventKeyPress(xcb_generic_event_t* event) {
}
}
void Events::eventKeyPress(xcb_generic_event_t* event) {
const auto E = reinterpret_cast<xcb_key_press_event_t*>(event);
// todo: super resize and move floating
}
void Events::eventExpose(xcb_generic_event_t* event) {
const auto E = reinterpret_cast<xcb_expose_event_t*>(event);

View file

@ -9,9 +9,9 @@ namespace Events {
EVENT(Leave);
EVENT(Destroy);
EVENT(MapWindow);
EVENT(KeyPress);
EVENT(ButtonPress);
EVENT(Expose);
EVENT(KeyPress);
// A thread to notify xcb to redraw our shiz
void redraw();

View file

@ -92,13 +92,17 @@ bool CWindowManager::handleEvent() {
break;
case XCB_KEY_PRESS:
case XCB_BUTTON_PRESS:
Events::eventKeyPress(ev);
Debug::log(LOG, "Event dispatched KEYPRESS");
Events::eventButtonPress(ev);
Debug::log(LOG, "Event dispatched BUTTON_PRESS");
break;
case XCB_EXPOSE:
Events::eventExpose(ev);
Debug::log(LOG, "Event dispatched EXPOSE");
break;
case XCB_KEY_PRESS:
Debug::log(LOG, "Event dispatched KEY_PRESS");
break;
default:
//Debug::log(WARN, "Unknown event: " + std::to_string(ev->response_type & ~0x80));

View file

@ -19,6 +19,8 @@ public:
xcb_drawable_t Drawable;
uint32_t Values[3];
bool modKeyDown = false;
uint8_t Depth = 32;
xcb_visualtype_t* VisualType;