0

I'm trying to set my window to be GDK_FULLSCREEN_ON_ALL_MONITORS but for this I have to use gdk_window_set_fullscreen_mode, what is the GDK2 version of this?

Thanks

Noitidart
  • 35,443
  • 37
  • 154
  • 323

1 Answers1

2

There is no GDK 2.x version of this API. The set_fullscreen_mode() method was added in 2013, long after GTK+ 2.x was API frozen; this means that no new function is going to be added to the GTK+ 2.x API.

The implementation of the set_fullscreen_mode() on X11 is not trivial; it implies getting the XINERAMA index of each monitor and sending a specially crafter ClientMessage to the running window manager for the _NET_WM_FULLSCREEN_MONITORS atom. You can see the implementation used in GDK attached to the issue that introduced it.

If you need this kind of functionality, you will have to use GTK+ 3.x.

ebassi
  • 8,648
  • 27
  • 29
  • Thanks much @ebassi, I do need this functionality on gtk2 systems as well, would it be enough to position a window at top left most origin, and then give that window the height and width of all the monitors combined? I just need to ensure that the window shows over any special widgets like unity dock etc. I'm making a screenshot thing like this: https://addons.mozilla.org/en-US/firefox/addon/lightshot/ On click it covers all with the full screenshot then user can edit that image. – Noitidart Jul 13 '15 at 15:39
  • 1
    You can use the geometry of the monitors, and if you use a window that is not managed by the window manager (i.e. a `GTK_WINDOW_POPUP` top level GtkWindow) then you may be able to put it over the whole screen area. – ebassi Jul 15 '15 at 09:35
  • May you please see my topic here: http://stackoverflow.com/questions/31366706/gtk-window-cover-entire-screen i cant seem to get it :( – Noitidart Jul 15 '15 at 15:42