[PATCH 0/6] [WIP] AppUserModelID implementation

Jonas Kümmerlin rgcjonas at gmail.com
Tue Jul 14 10:07:40 CDT 2015


Hi,

I'm currently working on implementing AppUserModelID[1] support in Wine.
It's far from finished, but it's slowly getting there, so I want to show it
off and get some feedback.


Rationale: AppUserModelIDs can be used to match open windows to shortcuts in
order to make the Win7 Taskbar happen. The idea is similar to WM_CLASS in
X11/freedesktop.org environments: Add the AppUserModelID to every window and
every shortcut and let the shell figure out the matching. The shell can then
do fancy things like pinning the app or showing a high quality icon.

While most windows apps rely on the fallback algorithm of doing the
shortcut<->window mapping via the full path to the executable, some
applications, like LibreOffice, are making use of the AppUserModelID feature
to appear as a set of different applications (Writer, Calc, ...) while
sharing the same exe file (soffice.bin).

Modern freedesktop.org shells work very similar to the Win7 Taskbar in this
regard (using the X11 WM_CLASS attribute and the StartupWMClass= deskop
entry key), and the goal is to have wine apps appear like any native app:
With a high-res icon and pinnable.


At the moment, the following features are implemented and working:
- SetCurrentProcessExplicitAppUserModelID
- IPropertyStore implementation on IShellLink
- Exporting the AppUserModelID as WM_CLASS in the X11 driver

The following things are not yet implemented, but I expect to complete
them in the following weeks:
- The window-specific property store (SHGetPropertyStoreForWindow)
- MSI support for shortcut properties
- Extracting the AppUserModelID in winemenubuilder.exe

The whole thing required me to implement a fair bit of infrastructure
(mostly in propsys.dll), and I am afraid that more might follow.

Since I am kinda new to wine development, I appreciate any early
feedback and comments.

Regards
Jonas Kümmerlin

[1] Application User Model IDs:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx


Jonas Kümmerlin (6):
  shell32: Implement process-wide explicit AppUserModelID
  winex11.drv: Use process-wide AppUserModelID to populate WM_CLASS
  ole32, propsys: Rework PROPVARIANT (de)serialization
  propsys: Implement named properties, serialization on the in-memory
    store
  propsys: Partially implement property stringification
  shell32: Properly implement IPropertyStore for shell links

 dlls/ole32/ole32.spec             |    3 +
 dlls/ole32/stg_prop.c             | 1711 ++++++++++++++++++++++++++++++++-----
 dlls/ole32/tests/propvariant.c    |   55 +-
 dlls/propsys/propstore.c          | 1088 ++++++++++++++++++++++-
 dlls/propsys/propsys.spec         |   34 +-
 dlls/propsys/propsys_classes.idl  |    7 +-
 dlls/propsys/propvar.c            |  821 +++++++++++++++++-
 dlls/propsys/tests/Makefile.in    |    2 +-
 dlls/propsys/tests/propstore.c    |  400 ++++++++-
 dlls/propsys/tests/propsys.c      |  460 +++++++++-
 dlls/shell32/shell32.spec         |    1 +
 dlls/shell32/shell32_main.c       |  109 ++-
 dlls/shell32/shelllink.c          |  218 +++--
 dlls/shell32/tests/Makefile.in    |    1 +
 dlls/shell32/tests/appusermodel.c |  108 +++
 dlls/shell32/tests/shell32_test.h |    9 +
 dlls/shell32/tests/shelllink.c    |  123 +++
 dlls/winex11.drv/window.c         |   72 +-
 include/propidl.idl               |   10 +
 include/propvarutil.h             |  106 ++-
 include/shobjidl.idl              |    6 +
 include/winbase.h                 |    2 +
 22 files changed, 4971 insertions(+), 375 deletions(-)
 create mode 100644 dlls/shell32/tests/appusermodel.c

--
2.4.3




More information about the wine-devel mailing list