mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Update last focused topics when switching to a new one
This commit is contained in:
parent
9976aa3b3c
commit
d13a26b11e
@ -273,7 +273,11 @@ currentTopicAction tg = topicAction tg =<< gets (W.tag . W.workspace . W.current
|
|||||||
-- | Switch to the given topic.
|
-- | Switch to the given topic.
|
||||||
switchTopic :: TopicConfig -> Topic -> X ()
|
switchTopic :: TopicConfig -> Topic -> X ()
|
||||||
switchTopic tg topic = do
|
switchTopic tg topic = do
|
||||||
|
-- Switch to topic and add it to the last seen topics
|
||||||
windows $ W.greedyView topic
|
windows $ W.greedyView topic
|
||||||
|
setLastFocusedTopic topic (const True)
|
||||||
|
|
||||||
|
-- If applicable, execute the topic action
|
||||||
wins <- gets (W.integrate' . W.stack . W.workspace . W.current . windowset)
|
wins <- gets (W.integrate' . W.stack . W.workspace . W.current . windowset)
|
||||||
when (null wins) $ topicAction tg topic
|
when (null wins) $ topicAction tg topic
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user