Modal dialogs lock the window's input until they are closed

This commit is contained in:
2023-03-24 01:31:40 -04:00
parent a2c0ff5f4c
commit bdc1109bcf
2 changed files with 11 additions and 0 deletions

View File

@@ -119,6 +119,7 @@ func (window *window) handleKeyPress (
event xevent.KeyPressEvent,
) {
if window.child == nil { return }
if window.hasModal { return }
keyEvent := *event.KeyPressEvent
key, numberPad := window.backend.keycodeToKey(keyEvent.Detail, keyEvent.State)
@@ -180,6 +181,7 @@ func (window *window) handleButtonPress (
event xevent.ButtonPressEvent,
) {
if window.child == nil { return }
if window.hasModal { return }
buttonEvent := *event.ButtonPressEvent
if buttonEvent.Detail >= 4 && buttonEvent.Detail <= 7 {