mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 05:25:58 +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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -19,6 +19,8 @@ public:
|
|||
xcb_drawable_t Drawable;
|
||||
uint32_t Values[3];
|
||||
|
||||
bool modKeyDown = false;
|
||||
|
||||
uint8_t Depth = 32;
|
||||
xcb_visualtype_t* VisualType;
|
||||
|
||||
|
|
Loading…
Reference in a new issue