Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK+ window as desktop #51

Merged
merged 3 commits into from Sep 16, 2012
Merged

GTK+ window as desktop #51

merged 3 commits into from Sep 16, 2012

Conversation

Ivshti
Copy link
Contributor

@Ivshti Ivshti commented Sep 15, 2012

Under UNIX-like operating systems that use X11, the GTK+ hint "GDK_WINDOW_TYPE_HINT_DESKTOP" means that the window will be used as a desktop background window.

An example of a desktop background window is Nautilus, when it shows the icons on your desktop, or explorer.exe under Windows.

This allows using node-webkit to develop desktop environments (DEs) or other interesting projects that might need a desktop window.

as_desktop must be set in the window object of package.json.
Tested only under Linux.

zcbenz added a commit that referenced this pull request Sep 16, 2012
[GTK] GTK+ window as desktop
@zcbenz zcbenz merged commit 004e900 into nwjs:master Sep 16, 2012
@zcbenz
Copy link
Contributor

zcbenz commented Sep 16, 2012

Thank you!

@Mithgol
Copy link
Contributor

Mithgol commented Oct 12, 2012

A great addition, but it should probably be documented somewhere.

@Ivshti
Copy link
Contributor Author

Ivshti commented Oct 12, 2012

Just set as_desktop to true in the "window" field of your config file.

This is an example:
{ "name": "linvo-board-2014", "main": "board.html", "window": { "toolbar": false, "as_desktop": true } }

Then, board.html will be started as desktop background, and the window size will automatically be the whole screen size.

@Mithgol
Copy link
Contributor

Mithgol commented Oct 12, 2012

Thank you.

And I've just noticed also that it was documented in the “Manifest format” article in the wiki, inside the “Window Sub Fields” section.

I remember reading that article, I must have missed that item.

@dounai
Copy link

dounai commented Oct 16, 2013

The option "as_desktop" does not work on Window XP?

@Ivshti
Copy link
Contributor Author

Ivshti commented Oct 16, 2013

It does not work under Windows. I'm not sure how to implement that under Windows.

This is implemented on a GTK+ level, and it's possible that it DOES support GDK_WINDOW_TYPE_HINT_DESKTOP under Windows, however if I'm not mistaken, node-webkit/Chromium won't use GTK+ to create the window under Windows - it would use the windows API.

@dounai
Copy link

dounai commented Oct 17, 2013

I'm not familiar with C++, but I know the methods "FindWindowEx" and then "SetParent" in "user32.dll" can achieve that.

@EladBezalel
Copy link

So any ideas how to achieve this on windows?
Iv'e tried to catch window position changed event and manipulate it but still no success..

@georgii-ivanov
Copy link

Not working under linux Ubuntu 14.04 64-bit.
Nothing happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants