<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Glyph window became active&#x2F;inactive event]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Is there any event that indicates if the glyph window has become active/inactive? Actually becoming inactive is more important in my case.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.robofont.com/topic/617/glyph-window-became-active-inactive-event</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 04:56:26 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/617.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Apr 2019 18:48:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Glyph window became active&#x2F;inactive event on Fri, 12 Apr 2019 19:01:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Is there any event that indicates if the glyph window has become active/inactive? Actually becoming inactive is more important in my case.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.robofont.com/post/2236</link><guid isPermaLink="true">https://forum.robofont.com/post/2236</guid><dc:creator><![CDATA[bahman]]></dc:creator><pubDate>Fri, 12 Apr 2019 19:01:14 GMT</pubDate></item><item><title><![CDATA[Reply to Glyph window became active&#x2F;inactive event on Fri, 12 Apr 2019 19:19:17 GMT]]></title><description><![CDATA[<p dir="auto">hello <a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/80">@bahman</a>,</p>
<p dir="auto">I think you’re looking for <code>viewDidChangeGlyph</code> and <code>viewWillChangeGlyph</code>. (I found them using the <a href="http://github.com/roboDocs/eventObserverExtension" rel="nofollow">EventObserver</a> extension)</p>
<p dir="auto">here’s an example:</p>
<pre><code class="language-python">from vanilla import FloatingWindow
from mojo.events import addObserver, removeObserver
from defconAppKit.windows.baseWindow import BaseWindowController

class TestWindow(BaseWindowController):
    
    def __init__(self):
        self.w = FloatingWindow((123, 123))
        addObserver(self, 'viewDidChangeGlyphCallback', "viewDidChangeGlyph")
        addObserver(self, 'viewWillChangeGlyphCallback', "viewWillChangeGlyph")
        self.setUpBaseWindowBehavior()
        self.w.open()

    def windowCloseCallback(self, sender):
        removeObserver(self, 'viewDidChangeGlyph')
        removeObserver(self, 'viewWillChangeGlyph')
        super(TestWindow, self).windowCloseCallback(sender)

    def viewDidChangeGlyphCallback(self, notification):
        glyph = notification['glyph']
        print(f'entering glyph window ({glyph.name})')

    def viewWillChangeGlyphCallback(self, notification):
        glyph = notification['glyph']
        print(f'exiting glyph window ({glyph.name})')

TestWindow()
</code></pre>
<p dir="auto">cheers!</p>
]]></description><link>https://forum.robofont.com/post/2238</link><guid isPermaLink="true">https://forum.robofont.com/post/2238</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Fri, 12 Apr 2019 19:19:17 GMT</pubDate></item><item><title><![CDATA[Reply to Glyph window became active&#x2F;inactive event on Fri, 12 Apr 2019 20:56:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/22">@gferreira</a> Thank you Gustavo. I had no idea those notifications are also for the glyph window focus. Great!</p>
]]></description><link>https://forum.robofont.com/post/2239</link><guid isPermaLink="true">https://forum.robofont.com/post/2239</guid><dc:creator><![CDATA[bahman]]></dc:creator><pubDate>Fri, 12 Apr 2019 20:56:54 GMT</pubDate></item></channel></rss>