2 * Acess2 Window Manager v3
3 * - By John Hodge (thePowersGang)
6 * - Window manager core
9 #include <wm_internals.h>
12 extern tWindow *gpWM_RootWindow;
15 tWindow *WM_int_GetWindowAtPos(int X, int Y)
17 tWindow *win, *next_win, *ret;
19 next_win = gpWM_RootWindow;
25 for(win = ret->FirstChild; win; win = win->NextSibling)
27 if( !(win->Flags & WINFLAG_SHOW) ) continue ;
28 if( X < win->X || X >= win->X + win->W ) continue;
29 if( Y < win->Y || Y >= win->Y + win->H ) continue;
30 next_win = win; // Overwrite as we want the final rendered window
37 void WM_Input_MouseMoved(int OldX, int OldY, int NewX, int NewY)
39 // TODO: Mouse motion events
40 // TODO: Send mouseup to match mousedown if the cursor moves out of a window?
43 void WM_Input_MouseButton(int X, int Y, int ButtonIndex, int Pressed)
45 // tWindow *win = WM_int_GetWindowAtPos(X, Y);
47 // Send Press/Release message