Re: dev: question about glist_isvisible() and gobj_shouldvis()

Miller Puckette via Pd-list <[email protected]>
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
It's my belief that gobj_shouldvis() is true if the object should be 
visible on the screen,
and that glist_isvisible() is on if the glist has actually been drawn 
(which is not yet true
while the glist is first being drawn). So I think you should check 
gobj_shouldvis() and
not glist_isvisible().

cheers
Miller

On 8/19/25 12:06 PM, Pierre Alexandre Tremblay wrote:
> Hello
>
> I am struggling with a real understanding of when to redraw my 2 flucoma GUI objects. At the moment, I get them to behave most of the time…
>
> Tldr: why is glist_isvisible 0 when a window hosting my gui is in the background at load time?
>
> Any help/good practice/tutorial welcome.
>
> p
>
> ===
>
> The long read:
>
> At the moment I check the status of glist_isvisible && gobj_shouldvis and print when both are on (&& vis flag of my own object)
>
> It works all the time, except:
>
> 1. When I load the patch saved with a [pd patcher] with the gui on (that window opens, but the gui doesn’t draw, by opposition to native ones)
>
> 2. When I close that subpatch window and reopen it, it is not drawn.
>
> 3. When I zoom in/out
>
> In both cases it calls my _draw method but the flag glist_isvisible is 0 (with the added ‘fun’ of calling the draw function twice when I zoom in or out, once with the flag 1 and right after with the flag 0
>
> What have I done wrong? The source code is online, I can send a link….
>
>
>
> ---
> [email protected] - the Pure Data mailinglist
> https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/[email protected]/message/Q3LT3SPTKG3JV33YFBSYFDV6HOLZU5OM/__;!!Mih3wA!BBIsbtoRUuYYTra_j5mFpGWnUOpOrFo1lHdxVmbyxGyhX15BNKJt4GJNABFir-x2XUT-c4kM2zO8$
>
> To unsubscribe send an email to [email protected] mailing list
> UNSUBSCRIBE and account-management -> https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!BBIsbtoRUuYYTra_j5mFpGWnUOpOrFo1lHdxVmbyxGyhX15BNKJt4GJNABFir-x2XUT-c83W2Dzg$


---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/LPJGGHQ7PHZ62HMVFRPM3VOSYHE6QOM2/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.