[MAC]implement on mac: hide the window from task bar while keeping it shown #1076

merged 5 commits into from Feb 19, 2014


None yet
6 participants

richardcypher commented Sep 6, 2013

I use TransformProcessType to hide and show the dock icon, because the window will hide if I call TransformProcessType(&psn, kProcessTransformToUIElementApplication);, I call [window setCanHide:NO]; to prevent the window from hiding.

Subash commented Oct 15, 2013

@rogerwang What about pulling this ? :) I am using @zhchbin's implementation and it's working very well.

@rogerwang When this pull will be effective? It's a very interesting and needed feature (as you can se in #251). Thanks 😄


rogerwang commented Dec 25, 2013

I'm going to add it in 0.9.0. Thanks for your patience.

@zhchbin zhchbin commented on the diff Dec 25, 2013

@@ -37,6 +38,31 @@
class NativeWindowToolbarWin;
+// HiddenOwnerWindow
+// This class is used as a hidden owner window for NativeWindowWin.
+// Note: The reason for using it is on Windows XP, while using the
+// ITaskbarList::DeleteTab to remove the icon from the taskbar, the icon will
+// appear in taskbar again when it blur and being focused again. This class
+// object will only exist on Windows XP. See the implementation about
+// |NativeWindowWin::SetShowInTaskbar|.

zhchbin Dec 25, 2013


@rogerwang Just find: https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/win/hidden_window.h, I guess it can be used here, then this class: HiddenOwnerWindow can be removed!!. 😄

@zhchbin zhchbin commented on the diff Dec 25, 2013

@@ -86,6 +86,7 @@ class NativeWindow {
virtual void SetMaximumSize(int width, int height) = 0;
virtual void SetResizable(bool resizable) = 0;
virtual void SetAlwaysOnTop(bool top) = 0;
+ virtual void SetShowInTaskbar(bool show = true) = 0;

zhchbin Dec 25, 2013


Suggestion: remove the true.

Sorry for using the default parameter here, which is not allowed by Google C++ Style: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Default_Arguments#Default_Arguments

@rogerwang rogerwang modified the milestone: v0.9.1, v0.9.0, 0.9.2 Feb 7, 2014


clkao commented Feb 17, 2014


clkao referenced this pull request in clkao/gullet Feb 17, 2014


Hide from Dock #7

@rogerwang rogerwang added a commit that referenced this pull request Feb 19, 2014

@rogerwang rogerwang Merge pull request #1076 from richardcypher/skiptb
[MAC]implement on mac: hide the window from task bar while keeping it shown

@rogerwang rogerwang merged commit d8e1d48 into nwjs:master Feb 19, 2014

richardcypher changed the title from [MAC]implement on mac: hide the window from task bar while keeping it shown to [MAC]implement on mac: hide the window from task bar while keeping it shown Apr 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment