| 360 | } |
| 361 | |
| 362 | void WMInstance::MouseRight(bool pressed){ |
| 363 | auto it = windows.end(); |
| 364 | do { |
| 365 | WMWindow* win = *it; |
| 366 | |
| 367 | if(PointInWindowProper(win, input.mouse.pos)){ |
| 368 | Lemon::LemonEvent ev; |
| 369 | |
| 370 | if(pressed){ |
| 371 | ev.event = Lemon::EventRightMousePressed; |
| 372 | } else { |
| 373 | ev.event = Lemon::EventRightMouseReleased; |
| 374 | } |
| 375 | |
| 376 | ev.mousePos = input.mouse.pos - win->pos; |
| 377 | if(!(win->flags & WINDOW_FLAGS_NODECORATION)) ev.mousePos = ev.mousePos - (vector2i_t){1, 25}; |
| 378 | |
| 379 | PostEvent(ev, win); |
| 380 | } |
| 381 | } while (it-- != windows.begin()); |
| 382 | } |
| 383 | |
| 384 | void WMInstance::MouseUp(){ |
| 385 | if(contextMenuActive && Lemon::Graphics::PointInRect(contextMenuBounds, input.mouse.pos)){ |
no test coverage detected