Implement MouseDelta check (WIP)

This commit is contained in:
scientiist
2024-02-07 11:40:54 -06:00
parent 01eed78c48
commit 3306c6acba
2 changed files with 8 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ void KeyDown(const ReWindow::WindowEvents::KeyDownEvent& e)
Vector2 mouse_pos;
// TODO: Move to J3ML::LinearAlgebra::Vector2
std::ostream& operator<<(std::ostream& os, const Vector2& v)
{
return os << "{" << v.x << ", " << v.y << "}";

View File

@@ -89,6 +89,12 @@ namespace ReWindow {
void RWindow::refresh() {
OnRefresh(0.f);
int x, y;
bool mouseAvailable = XQueryPointer(display, window, nullptr, nullptr, &x, &y, nullptr, nullptr, nullptr);
std::cout << x << ", " << y << std::endl;
}
bool RWindow::getFlag(RWindowFlags flag) const
@@ -121,6 +127,7 @@ namespace ReWindow {
exit(0);
}
}
if (xev.type == FocusIn) {
XAutoRepeatOff(display);
focusGained.Invoke();