From: Dima K. <no...@di...> - 2014-01-19 06:28:33
|
Hi. I spent a bit of time today trying to get a feature written, and I just can't grok the code. Some help would be appreciated. Currently, if you create a new window while the window you're looking at is full-screened then then new window is full-screened as well. This is fine. However, when you try to un-full-screen the new window, it doesn't work. The reason is that when a window becomes full-screen, notion saves some information about the previous state of the window. Leaving full-screen mode reads this information. The new window started out full-screen, so it never had that information saved. This is straightforward. The previous state is saved with when region_enter_fullscreen() calls region_fullscreen_scr() calls region_make_return_pholder() Then this state is read back when region_leave_fullscreen() calls pholder_attach_mcfgoto() So what I want to do is to add code into ioncore_manage_clientwin() to detect the case when a new full-screen window is being made, and in response to find the pholder of the currently-focussed window (the structure that contains this window's previous state), then clone this pholder, and attach it to the new window. This is all easy, except for the pholder-cloning. THAT is really convoluted, and any help figuring it out would be appreciated. I'm looking at mplexpholder.c, specifically. mplexpholder_init() is the main function used to create the pholder. It takes a WStacking object. Both the WMPlexPHolder and the WStacking objects have linked lists in them, and their relationship and contents are unclear. I think I can figure this out if somebody can add comments to the definitions of these: - mplexpholder_do_link() - mplexpholder_init() - WStacking - WMPlexPHolder - WLListNode If nobody knows how these work, then it'd be good to know that too. I'll maybe dig through it, and add the docs myself then. Thanks dima |