From 8d8fc22745e8e5497e3db0a3389c17c3030a230f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 9 Feb 2025 03:00:10 -0600 Subject: detect an attempt to close a window --- structs.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index e33b7dc..4a424b6 100644 --- a/structs.go +++ b/structs.go @@ -10,6 +10,7 @@ package main import ( "fmt" + "os" "reflect" "strconv" "sync" @@ -53,6 +54,7 @@ type config struct { RawW int `default:"1"` // the raw beginning of each window (or tab) RawH int `default:"5"` // the raw beginning of each window (or tab) FakeW int `default:"20"` // offset for the hidden widgets + DropdownId int `default:"-78"` // the widget id to use padded bool // add space between things like buttons bookshelf bool // do you want things arranged in the box like a bookshelf or a stack? canvas bool // if set to true, the windows are a raw canvas @@ -72,6 +74,8 @@ type config struct { dark bool // use a 'dark' color palette mouse mouse // mouse settings showDebug bool // todo: move this into config struct + outf *os.File // hacks for capturing stdout + } // stuff controlling how the mouse works @@ -115,8 +119,8 @@ type dropdown struct { h int // the height active bool // is the dropdown menu currently in use? init bool // moves the window offscreen on startup - wId int // the widget id to use - // dtoggle bool // is a dropdown or combobox currently active? + Id int `default:"-78"` // the widget id to use + wId int `default:"-78"` // the widget id to use } // this is the gocui way -- cgit v1.2.3