mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[linux] dispatchOnMainThread
This commit is contained in:
parent
5129c0f4e2
commit
281f6335c1
1 changed files with 10 additions and 15 deletions
|
|
@ -326,26 +326,21 @@ func (w *linuxWebviewWindow) disableSizeConstraints() {
|
|||
}
|
||||
|
||||
func (w *linuxWebviewWindow) unfullscreen() {
|
||||
fmt.Println("unfullscreen")
|
||||
globalApplication.dispatchOnMainThread(func() {
|
||||
C.gtk_window_unfullscreen((*C.GtkWindow)(w.window))
|
||||
w.unmaximise()
|
||||
})
|
||||
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
|
||||
}
|
||||
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)
|
||||
})
|
||||
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