mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Revert "[linux] dispatchOnMainThread"
This reverts commit 346517a185640aa40bc8710b815cf3e5ff7dc4a8.
This commit is contained in:
parent
17647e2c2f
commit
54ba6d47f4
1 changed files with 15 additions and 10 deletions
|
|
@ -326,21 +326,26 @@ func (w *linuxWebviewWindow) disableSizeConstraints() {
|
|||
}
|
||||
|
||||
func (w *linuxWebviewWindow) unfullscreen() {
|
||||
C.gtk_window_unfullscreen((*C.GtkWindow)(w.window))
|
||||
w.unmaximise()
|
||||
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()
|
||||
x, y, width, height, scale := w.getCurrentMonitorGeometry()
|
||||
if x == -1 && y == -1 && width == -1 && height == -1 {
|
||||
return
|
||||
}
|
||||
w.setMinMaxSize(0, 0, width*scale, height*scale)
|
||||
w.setSize(width*scale, height*scale)
|
||||
C.gtk_window_fullscreen((*C.GtkWindow)(w.window))
|
||||
w.setPosition(0, 0)
|
||||
globalApplication.dispatchOnMainThread(func() {
|
||||
x, y, width, height, scale := w.getCurrentMonitorGeometry()
|
||||
if x == -1 && y == -1 && width == -1 && height == -1 {
|
||||
return
|
||||
}
|
||||
w.setMinMaxSize(0, 0, width*scale, height*scale)
|
||||
w.setSize(width*scale, height*scale)
|
||||
C.gtk_window_fullscreen((*C.GtkWindow)(w.window))
|
||||
w.setPosition(0, 0)
|
||||
})
|
||||
}
|
||||
|
||||
func (w *linuxWebviewWindow) unminimise() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue