app: implement Window.Close for Wayland

This is a followup from a question sent to the mailing list.

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2021-11-24 18:12:50 +01:00
committed by Elias Naur
parent 858e9930c4
commit ebb7f40e9d
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1478,8 +1478,10 @@ func (w *window) ShowTextInput(show bool) {}
func (w *window) SetInputHint(_ key.InputHint) {}
// Close the window. Not implemented for Wayland.
func (w *window) Close() {}
// Close the window.
func (w *window) Close() {
w.dead = true
}
// Maximize the window. Not implemented for Wayland.
func (w *window) Maximize() {}
+1 -1
View File
@@ -303,7 +303,7 @@ func (w *Window) SetCursorName(name pointer.CursorName) {
// Close the window. The window's event loop should exit when it receives
// system.DestroyEvent.
//
// Currently, only macOS, Windows and X11 drivers implement this functionality,
// Currently, only macOS, Windows, X11 and Wayland drivers implement this functionality,
// all others are stubbed.
func (w *Window) Close() {
w.driverDefer(func(d driver) {