Re: [dev] [libsl][bug] Call FcFini on cleanup for projects calling FcIni

2022-10-28 Thread Anskrevy

On 10/28/22 01:20, Hiltjo Posthuma wrote:

On Thu, Oct 27, 2022 at 01:19:28PM -0700, Anskrevy wrote:

Any program using libsl, or calling FcIni (directly or indirectly), that
does not call FcFini results in a small memory leak. dwm and dmenu are
effected by this. Appending a call to FcFini in the cleanup function will
fix this.



Wouldn't it just free the memory on program exit by the operating system?

In this case I don't see the issue becaus it doesn't memory leak over time.

Let me know if I missed something,


You are correct.

I was trying to find the leak in a program I am developing and found 
that this call resolved it. For those newer who use other suckless 
programs as reference when writing their own it might be nice to have a 
note about this function. Mention of it in the comment above 
drw_fontset_create would be my suggestion.




Re: [dev] [dwm] dmenu dwm wrong screen

2022-10-28 Thread Hiltjo Posthuma
On Fri, Oct 28, 2022 at 11:07:44AM +0200, Yan Doroshenko wrote:
> Helo,
> 
> 
> I have a strange behavior of dmenu inside dwm with two monitors. dmenu is
> displayed on the screen with the mouse cursor (instead of the active one) if
> there are no windows open on any screen. Otherwise it works fine.
> 
> 
> Is this expected behavior?
> 
> 
> Thanks,
> 
> Yan
> 
> 

Hi,

Thanks for reporting it. It was changed in dwm 6.4, but since multiple users
has asked (it doesn't seem to be some edge-case) I've reverted back the change
in the git version of dwm.

See also:
https://git.suckless.org/dwm/commit/ba56fe9fea0a28d8184a727a987836a0903e2682.html
https://git.suckless.org/dwm/commit/c2b748e7931e5f28984efc236f9b1a212dbc65e8.html

-- 
Kind regards,
Hiltjo



[dev] [dwm] dmenu dwm wrong screen

2022-10-28 Thread Yan Doroshenko

Helo,


I have a strange behavior of dmenu inside dwm with two monitors. dmenu 
is displayed on the screen with the mouse cursor (instead of the active 
one) if there are no windows open on any screen. Otherwise it works fine.



Is this expected behavior?


Thanks,

Yan




OpenPGP_signature
Description: OpenPGP digital signature


Re: [dev] [libsl][bug] Call FcFini on cleanup for projects calling FcIni

2022-10-28 Thread Hiltjo Posthuma
On Thu, Oct 27, 2022 at 01:19:28PM -0700, Anskrevy wrote:
> Any program using libsl, or calling FcIni (directly or indirectly), that
> does not call FcFini results in a small memory leak. dwm and dmenu are
> effected by this. Appending a call to FcFini in the cleanup function will
> fix this.
> 

Wouldn't it just free the memory on program exit by the operating system?

In this case I don't see the issue becaus it doesn't memory leak over time.

Let me know if I missed something,

-- 
Kind regards,
Hiltjo