mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
todo moving floating
This commit is contained in:
parent
d3d5e4379b
commit
f440ca4e37
4 changed files with 17 additions and 5 deletions
|
@ -88,7 +88,7 @@ void Events::eventMapWindow(xcb_generic_event_t* event) {
|
||||||
g_pWindowManager->setFocusedWindow(E->window);
|
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 E = reinterpret_cast<xcb_key_press_event_t*>(event);
|
||||||
|
|
||||||
const auto KEYSYM = KeybindManager::getKeysymFromKeycode(E->detail);
|
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) {
|
void Events::eventExpose(xcb_generic_event_t* event) {
|
||||||
const auto E = reinterpret_cast<xcb_expose_event_t*>(event);
|
const auto E = reinterpret_cast<xcb_expose_event_t*>(event);
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ namespace Events {
|
||||||
EVENT(Leave);
|
EVENT(Leave);
|
||||||
EVENT(Destroy);
|
EVENT(Destroy);
|
||||||
EVENT(MapWindow);
|
EVENT(MapWindow);
|
||||||
EVENT(KeyPress);
|
EVENT(ButtonPress);
|
||||||
EVENT(Expose);
|
EVENT(Expose);
|
||||||
|
EVENT(KeyPress);
|
||||||
|
|
||||||
// A thread to notify xcb to redraw our shiz
|
// A thread to notify xcb to redraw our shiz
|
||||||
void redraw();
|
void redraw();
|
||||||
|
|
|
@ -92,13 +92,17 @@ bool CWindowManager::handleEvent() {
|
||||||
break;
|
break;
|
||||||
case XCB_KEY_PRESS:
|
case XCB_KEY_PRESS:
|
||||||
case XCB_BUTTON_PRESS:
|
case XCB_BUTTON_PRESS:
|
||||||
Events::eventKeyPress(ev);
|
Events::eventButtonPress(ev);
|
||||||
Debug::log(LOG, "Event dispatched KEYPRESS");
|
Debug::log(LOG, "Event dispatched BUTTON_PRESS");
|
||||||
break;
|
break;
|
||||||
case XCB_EXPOSE:
|
case XCB_EXPOSE:
|
||||||
Events::eventExpose(ev);
|
Events::eventExpose(ev);
|
||||||
Debug::log(LOG, "Event dispatched EXPOSE");
|
Debug::log(LOG, "Event dispatched EXPOSE");
|
||||||
break;
|
break;
|
||||||
|
case XCB_KEY_PRESS:
|
||||||
|
|
||||||
|
Debug::log(LOG, "Event dispatched KEY_PRESS");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
//Debug::log(WARN, "Unknown event: " + std::to_string(ev->response_type & ~0x80));
|
//Debug::log(WARN, "Unknown event: " + std::to_string(ev->response_type & ~0x80));
|
||||||
|
|
|
@ -19,6 +19,8 @@ public:
|
||||||
xcb_drawable_t Drawable;
|
xcb_drawable_t Drawable;
|
||||||
uint32_t Values[3];
|
uint32_t Values[3];
|
||||||
|
|
||||||
|
bool modKeyDown = false;
|
||||||
|
|
||||||
uint8_t Depth = 32;
|
uint8_t Depth = 32;
|
||||||
xcb_visualtype_t* VisualType;
|
xcb_visualtype_t* VisualType;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue