mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Switch max/min to use per window lock from event sync lock
This commit is contained in:
parent
dc291cb2a6
commit
68936f97e1
1 changed files with 6 additions and 2 deletions
|
|
@ -658,6 +658,10 @@ The on-window-change clog-obj received is the new window"))
|
|||
:accessor keep-on-top
|
||||
:initform nil
|
||||
:documentation "If t don't change z-order")
|
||||
(window-size-mutex
|
||||
:reader window-size-mutex
|
||||
:initform (bordeaux-threads:make-lock)
|
||||
:documentation "Sync maximize / normalize events")
|
||||
(window-select-item
|
||||
:accessor window-select-item
|
||||
:initform nil
|
||||
|
|
@ -1061,7 +1065,7 @@ the browser."))
|
|||
:focus (default t)."))
|
||||
|
||||
(defmethod window-maximize ((obj clog-gui-window) &key (focus t))
|
||||
(with-sync-event (obj) ; prevent race condition of maximize/normalize
|
||||
(bordeaux-threads:with-lock-held ((window-size-mutex obj)) ; prevent race condition of maximize/normalize
|
||||
(let ((app (connection-data-item obj "clog-gui")))
|
||||
(when focus
|
||||
(unless (keep-on-top obj)
|
||||
|
|
@ -1092,7 +1096,7 @@ the browser."))
|
|||
:focus (default t)."))
|
||||
|
||||
(defmethod window-normalize ((obj clog-gui-window) &key (focus t))
|
||||
(with-sync-event (obj) ; prevent race condition of maximize/normalize
|
||||
(bordeaux-threads:with-lock-held ((window-size-mutex obj)) ; prevent race condition of maximize/normalize
|
||||
(when focus
|
||||
(unless (keep-on-top obj)
|
||||
(window-focus obj)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue