mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-10 20:53:21 +08:00
[linux] dispatchOnMainThread
This commit is contained in:
parent
5129c0f4e2
commit
281f6335c1
@ -326,17 +326,13 @@ func (w *linuxWebviewWindow) disableSizeConstraints() {
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) unfullscreen() {
|
||||
fmt.Println("unfullscreen")
|
||||
globalApplication.dispatchOnMainThread(func() {
|
||||
C.gtk_window_unfullscreen((*C.GtkWindow)(w.window))
|
||||
w.unmaximise()
|
||||
})
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) fullscreen() {
|
||||
w.maximise()
|
||||
w.lastWidth, w.lastHeight = w.size()
|
||||
globalApplication.dispatchOnMainThread(func() {
|
||||
x, y, width, height, scale := w.getCurrentMonitorGeometry()
|
||||
if x == -1 && y == -1 && width == -1 && height == -1 {
|
||||
return
|
||||
@ -345,7 +341,6 @@ func (w *linuxWebviewWindow) fullscreen() {
|
||||
w.setSize(width*scale, height*scale)
|
||||
C.gtk_window_fullscreen((*C.GtkWindow)(w.window))
|
||||
w.setPosition(0, 0)
|
||||
})
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) unminimise() {
|
||||
|
Loading…
Reference in New Issue
Block a user