Skip to content

Commit

Permalink
Merge pull request #48 from Jarod42/mixed_or_and_fix
Browse files Browse the repository at this point in the history
Mixed or and fix
  • Loading branch information
Jarod42 authored Aug 22, 2024
2 parents 543fe48 + 661c744 commit d1a0b35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from ba5109fdd43281372247cf4259c5cf19376271ce
* Continue rebasing from a813cccba0894a7a027212409dc949c95409a792
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
3 changes: 1 addition & 2 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,7 @@ namespace gcn
int sourceWidgetX, sourceWidgetY;
sourceWidget->getAbsolutePosition(sourceWidgetX, sourceWidgetY);

if (mFocusHandler->getModalFocused() != NULL
&& sourceWidget->isModalFocused()
if ((mFocusHandler->getModalFocused() != NULL && sourceWidget->isModalFocused())
|| mFocusHandler->getModalFocused() == NULL)
{
sourceWidget->requestFocus();
Expand Down
9 changes: 3 additions & 6 deletions src/widgets/dropdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,9 @@ namespace gcn
}

// Released outside of widget. Can happen when we have modal input focus.
if (0 > mouseEvent.getY()
|| mouseEvent.getY() >= getHeight()
|| mouseEvent.getX() < 0
|| mouseEvent.getX() >= getWidth()
&& mouseEvent.getButton() == MouseEvent::LEFT
&& isModalMouseInputFocused())
if ((0 > mouseEvent.getY() || mouseEvent.getY() >= getHeight() || mouseEvent.getX() < 0
|| mouseEvent.getX() >= getWidth())
&& mouseEvent.getButton() == MouseEvent::LEFT && isModalMouseInputFocused())
{
releaseModalMouseInputFocus();

Expand Down

0 comments on commit d1a0b35

Please sign in to comment.