Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions v3/UNRELEASED_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ After processing, the content will be moved to the main changelog and this file

## Fixed
<!-- Bug fixes -->
- Apply the window title to frameless windows on Linux, so taskbars and window switchers can tell an application's windows apart in [PR](https://github.com/wailsapp/wails/pull/5960) by @julianstorer

## Deprecated
<!-- Soon-to-be removed features -->
Expand Down
12 changes: 7 additions & 5 deletions v3/pkg/application/linux_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1306,11 +1306,13 @@ func (w *linuxWebviewWindow) present() {
}

func (w *linuxWebviewWindow) setTitle(title string) {
if !w.parent.options.Frameless {
cTitle := C.CString(title)
C.gtk_window_set_title(w.gtkWindow(), cTitle)
C.free(unsafe.Pointer(cTitle))
}
// Set unconditionally, frameless included: gtk_window_set_title writes the
// WM_NAME/_NET_WM_NAME hints that taskbars and window switchers label the
// window with, it does not draw a titlebar. Decorations are governed
// separately, by gtk_window_set_decorated.
cTitle := C.CString(title)
C.gtk_window_set_title(w.gtkWindow(), cTitle)
C.free(unsafe.Pointer(cTitle))
}

func (w *linuxWebviewWindow) setSize(width, height int) {
Expand Down
12 changes: 7 additions & 5 deletions v3/pkg/application/linux_cgo_gtk3.go
Original file line number Diff line number Diff line change
Expand Up @@ -1704,11 +1704,13 @@ func (w *linuxWebviewWindow) setOpacity(opacity float64) {
}

func (w *linuxWebviewWindow) setTitle(title string) {
if !w.parent.options.Frameless {
cTitle := C.CString(title)
C.gtk_window_set_title(w.gtkWindow(), cTitle)
C.free(unsafe.Pointer(cTitle))
}
// Set unconditionally, frameless included: gtk_window_set_title writes the
// WM_NAME/_NET_WM_NAME hints that taskbars and window switchers label the
// window with, it does not draw a titlebar. Decorations are governed
// separately, by gtk_window_set_decorated.
cTitle := C.CString(title)
C.gtk_window_set_title(w.gtkWindow(), cTitle)
C.free(unsafe.Pointer(cTitle))
}

func (w *linuxWebviewWindow) setIcon(icon pointer) {
Expand Down
Loading