Taskbar grouping in Windows 7
Tobias Häußler
tobias.haeussler@gmx.de
Sat Jul 2 16:51:00 GMT 2011
On 29/06/2011 15:25, Jon TURNEY wrote:
> On 25/06/2011 13:48, Tobias HäuÃler wrote:
>> I created a small patch for XWin that adds correct grouping of taskbar
>> icons when 'Always combine, hide labels' is set in the taskbar
>> properties. It uses the new taskbar APIs introduced in Windows 7 to set
>> an application id for each window. The id is based on the X11 class hints.
>> Maybe it is useful for someone...
>
> Firstly, thanks very much for this patch.
>
> Getting Windows to correctly group XWin windows on the taskbar is something
> that has needed fixing for a while, so it's great to have it done :-)
>
Thanks for your suggestions! I changed the code you mentioned.
> A few minor comments included inline:
>> [...]
> Can you start this file with the license information, like all other files.
>
> This should also serve to confirm that you are happy for me to forward this
> upstream to be distributed under the MIT/X11 license [1]
>
Done. I copied the license text from another file...
>> [...]
>
> Looks like this function can be made static?
>
Yes, however for proper cleanup this function is now also called from
the WM_DESTROY handler and I left it non-static.
>> [...]
>
> Since the results of LoadLibrary/GetProcAddress are invariant at run-time, I'd
> rather these calls were done once, rather than every time we want to use those
> results.
>
> It would also be useful to include a comment mentioning which version of
> Windows these interfaces were added in (so future generations will know when
> they can directly link to those functions :-))
>
> I assume that there is no way to achieve this functionality prior for Windows
> 7, rather than an alternative interface which you chose not to use?
>
The initialization/deinitialization is now done only once when XWin is
started/stopped. I am not sure if there is an API to control the taskbar
grouping on older versions of Windows, therefore I have choosen this one...
>> [...]
>
> Should be PropVariantInit() ?
>
I cannot use PropVariantInit() for the initialization of the PROPVARIANT
structure because it is not supported bei the w32api of cygwin (or at
least I cannot find it). According to the Microsoft SDK, PropVariantInit
only calls memset.
>> [...]
>
> The MSDN description of SHGetPropertyStoreForWindow() says:
> "A window's properties must be removed before the window is closed. If this is
> not done, the resources used by those properties are not returned to the system."
>
> Does this not apply in this case, or is some cleanup needed?
>
You are right about that, I added code for cleanup.
>> [...]
>
> [1] http://cgit.freedesktop.org/xorg/xserver/tree/COPYING
>
Tobias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: taskbar.patch
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20110702/072be4c3/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/
More information about the Cygwin-xfree
mailing list