Help with Window Movement
Posted: Wed Jul 05, 2023 11:27 pm
I have been working on the window manager for my OS and I have came across an issue I was wondering if someone with more anvanced C++ skills could help me with.
Source code for the project is here https://github.com/maxtyson123/max-os
My problem is that the window is not receiving the on click event that my mouse driver raises. I have setup and debugged with GDB to find the following results:
In mouse.cpp, MouseDriver::HandleInterrupt is called correctly
In, mouse.cpp, MouseDriver::HandleInterrupt passes the event to the setup mouse event handlers
I,ve put a break point at MouseEventHandler::onMouseDownEvent and the execution stops there showing that it is reached, however the desktop (Which extends the class MouseEvent handler, and overrides the onMouseDownEvent function) does not stop execution when a break point is placed there, either meaning I am using GDB wrong or the desktop does not receive the event.
I put a break point at MouseDriver::connectMouseEventHandler and it correctly shows that the desktop is registered as an event handler.
Is there anything else I should test for? Otherwise from those testings I conclude that there might be a problem with the way I override the onMouseDownEvent function, although it could be entirely separate and something to do with window movement code, however I have tried to make the window change its colours on click and that test failed so I'm thinking the problem is that its not receiving the event.
Would someone be able to guide me why this is not working? In the meantime I will continue to try problem solve it myself.
Thanks.
Source code for the project is here https://github.com/maxtyson123/max-os
My problem is that the window is not receiving the on click event that my mouse driver raises. I have setup and debugged with GDB to find the following results:
In mouse.cpp, MouseDriver::HandleInterrupt is called correctly
In, mouse.cpp, MouseDriver::HandleInterrupt passes the event to the setup mouse event handlers
I,ve put a break point at MouseEventHandler::onMouseDownEvent and the execution stops there showing that it is reached, however the desktop (Which extends the class MouseEvent handler, and overrides the onMouseDownEvent function) does not stop execution when a break point is placed there, either meaning I am using GDB wrong or the desktop does not receive the event.
I put a break point at MouseDriver::connectMouseEventHandler and it correctly shows that the desktop is registered as an event handler.
Is there anything else I should test for? Otherwise from those testings I conclude that there might be a problem with the way I override the onMouseDownEvent function, although it could be entirely separate and something to do with window movement code, however I have tried to make the window change its colours on click and that test failed so I'm thinking the problem is that its not receiving the event.
Would someone be able to guide me why this is not working? In the meantime I will continue to try problem solve it myself.
Thanks.