mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/window: map window after defining WM protocols
ICCCM 4.1.2 says WMs will examine client properties every time window is mapped. Because SetWMProtocols is called before MapWindow some WMs (specifically taowm) never see them. In other WMs this works because they check for WM_DELETE_WINDOW when user tries to close window, not when window is mapped. Signed-off-by: Konstantin Kulikov <k.kulikov2@gmail.com>
This commit is contained in:
committed by
Elias Naur
parent
1bf2c7ef29
commit
101b65f4e5
@@ -528,9 +528,6 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
|
||||
hints.flags = C.InputHint
|
||||
C.XSetWMHints(dpy, win, &hints)
|
||||
|
||||
// make the window visible on the screen
|
||||
C.XMapWindow(dpy, win)
|
||||
|
||||
// set the name
|
||||
ctitle := C.CString(opts.Title)
|
||||
defer C.free(unsafe.Pointer(ctitle))
|
||||
@@ -549,6 +546,9 @@ func newX11Window(gioWin Callbacks, opts *Options) error {
|
||||
w.evDelWindow = w.atom("WM_DELETE_WINDOW", false)
|
||||
C.XSetWMProtocols(dpy, win, &w.evDelWindow, 1)
|
||||
|
||||
// make the window visible on the screen
|
||||
C.XMapWindow(dpy, win)
|
||||
|
||||
go func() {
|
||||
w.w.SetDriver(w)
|
||||
w.setStage(system.StageRunning)
|
||||
|
||||
Reference in New Issue
Block a user