public inbox for cygwin-xfree@sourceware.org help / color / mirror / Atom feed
From: "Tobias Häußler" <tobias.haeussler@gmx.de> To: cygwin-xfree@cygwin.com Subject: Re: Taskbar grouping in Windows 7 Date: Mon, 25 Jul 2011 11:20:00 -0000 [thread overview] Message-ID: <4E2D417E.1060500@gmx.de> (raw) In-Reply-To: <4E259FF7.5060804@dronecode.org.uk> On 19.07.2011 17:17, Jon TURNEY wrote: > On 01/07/2011 21:38, Tobias Häußler wrote: >> 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. > > Thanks. I've included this patch into the 1.10.3-1 package. > > I noticed that there are a couple of warnings issued when building > >> CC winmultiwindowwm.o >> In file included from winmultiwindowwm.c:69:0: >> taskbar.h:59:19: warning: ‘IID_IPropertyStoreÂ’ initialized and declared ‘externÂ’ >> taskbar.h:67:53: warning: ‘PKEY_AppUserModel_IDÂ’ initialized and declared ‘externÂ’ > > This seems to be related to the nonsense that is INITGUID. I'm not sure how > to fix this warning. Would moving all the GUIDs we use (including the DirectX > ones we use) to a separate file and compiling that with INITGUID defined be > the correct solution? I don't know the right way to deal with that, but it seems to work if taskbar.h is included in a separate .c-file with INITGUID defined, and in winmultiwindowwm.c without: --- taskbar.c: #define INITGUID #include <basetyps.h> #include <shlguid.h> #include "taskbar.h" --- winmultiwindowwm.c: #include "taskbar.h" The current solution produces this warning because of the declaration of DEFINE_GUID in basetyps.h and initguid.h: DEFINE_GUID with INITGUID in basetyps.h resolves to: const GUID IID_IPropertyStore = {a,b,c,...} DEFINE_GUID without INITGUID in basetyps.h resolves to: extern const GUID IID_IPropertyStore; DEFINE_GUID with INITGUID in initguid.h resolves to: (extern) const GUID IID_IPropertyStore = {a,b,c,...} Whether extern is appended or not depends on basetyps.h, which is included before initguid.h. Including initguid.h (with INITGUID defined) after basetyps.h appends "= {a,b,c}", but does not remove "extern". In winmultiwindowwm.c this is the case, as basetyps.h is included by objbase.h before initguid.h. The DirectX-GUIDs are initialized in the lib*.a-files of w32api, therefore INITGUID is not necessary and the warnings are not present. As soon as w32api contains the GUID for IID_IPropertyStore, taskbar.c with INITGUID can be removed. > > The other thing I noticed is that PropVariantClear() has been provided by > ole32.dll since at least NT4, so there's no need to dynamically link with it. > So I'm confused as to why you are using GetProcAddress for that? > PropVariantClear() is not declared in the header files of w32api, so I had to link it dynamically. -- 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/
prev parent reply other threads:[~2011-07-25 10:12 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-25 12:49 Tobias Häußler 2011-06-29 13:26 ` Jon TURNEY 2011-07-02 16:51 ` Tobias Häußler 2011-07-19 15:31 ` Jon TURNEY 2011-07-25 11:20 ` Tobias Häußler [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4E2D417E.1060500@gmx.de \ --to=tobias.haeussler@gmx.de \ --cc=cygwin-xfree@cygwin.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).