cocoa: fix problems with sheets and focus
Avoids a problem with the file dialog when a sheet is the current "main window" (Cocoa terminology); when the file dialog is closed, both the sheet owner and the sheet become the main window (in that order), so that when the sheet goes away, the sheet owner doesn't become the main window as it should. It seems like a Cocoa problem. The workaround is to hook into the callback that says a sheet went away. Closes PR 12073 original commit: 69f7e912d2bffd638123475ce0041e6188ab5f02
This commit is contained in:
parent
26d947d5eb
commit
7556774742
|
@ -119,6 +119,13 @@
|
|||
(let ([wx (->wx wxb)])
|
||||
(when wx
|
||||
(send wx force-window-focus))))]
|
||||
[-a _void (windowDidEndSheet: [_id notification])
|
||||
;; In some cases, the window that has a sheet
|
||||
;; stays main even as its sheet becomes main, so
|
||||
;; we need to make the containing window become main
|
||||
;; when the sheet goes away.
|
||||
(when (equal? self (tell app mainWindow))
|
||||
(tell self windowDidBecomeMain: notification))]
|
||||
[-a _void (toggleToolbarShown: [_id sender])
|
||||
(when wxb
|
||||
(let ([wx (->wx wxb)])
|
||||
|
|
Loading…
Reference in New Issue
Block a user