diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-25 17:18:27 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-25 17:18:27 +0300 |
commit | b2096d3b6d56e5a507f10d8c09bffed60b973f70 (patch) | |
tree | d2a2e0818b5a742b56e1aa86d3d9ad063e2dfe77 /src | |
parent | 5c44f8354238d436734e12d3af44cc0c211d2fe2 (diff) |
Window: Fixed build with ENABLE_WINDOWPOS_FIX; cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/window.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 22f105a4..bc92f111 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -717,16 +717,10 @@ static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) { | |||
717 | case SDL_WINDOWEVENT_LEAVE: | 717 | case SDL_WINDOWEVENT_LEAVE: |
718 | unhover_Widget(); | 718 | unhover_Widget(); |
719 | d->isMouseInside = iFalse; | 719 | d->isMouseInside = iFalse; |
720 | //postCommand_App("window.mouse.exited"); | ||
721 | // SDL_SetWindowInputFocus(mainWindow_App()->base.win); | ||
722 | printf("mouse leaves popup\n"); fflush(stdout); | ||
723 | //SDL_RaiseWindow(mainWindow_App()->base.win); | ||
724 | postRefresh_App(); | 720 | postRefresh_App(); |
725 | return iTrue; | 721 | return iTrue; |
726 | case SDL_WINDOWEVENT_ENTER: | 722 | case SDL_WINDOWEVENT_ENTER: |
727 | d->isMouseInside = iTrue; | 723 | d->isMouseInside = iTrue; |
728 | //postCommand_App("window.mouse.entered"); | ||
729 | printf("mouse enters popup\n"); fflush(stdout); | ||
730 | return iTrue; | 724 | return iTrue; |
731 | } | 725 | } |
732 | return iFalse; | 726 | return iFalse; |
@@ -745,9 +739,9 @@ static iBool handleWindowEvent_MainWindow_(iMainWindow *d, const SDL_WindowEvent | |||
745 | #if defined(LAGRANGE_ENABLE_WINDOWPOS_FIX) | 739 | #if defined(LAGRANGE_ENABLE_WINDOWPOS_FIX) |
746 | if (d->place.initialPos.x >= 0) { | 740 | if (d->place.initialPos.x >= 0) { |
747 | int bx, by; | 741 | int bx, by; |
748 | SDL_GetWindowBordersSize(d->win, &by, &bx, NULL, NULL); | 742 | SDL_GetWindowBordersSize(d->base.win, &by, &bx, NULL, NULL); |
749 | SDL_SetWindowPosition( | 743 | SDL_SetWindowPosition( |
750 | d->win, d->place.initialPos.x + bx, d->place.initialPos.y + by); | 744 | d->base.win, d->place.initialPos.x + bx, d->place.initialPos.y + by); |
751 | d->place.initialPos = init1_I2(-1); | 745 | d->place.initialPos = init1_I2(-1); |
752 | } | 746 | } |
753 | #endif | 747 | #endif |