From: cedlemo <ce...@gm...> - 2017-02-24 13:44:48
|
Jhon, after looking at the documentation https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html and at the Gdk code : https://github.com/GNOME/gtk/blob/master/gdk/x11/gdkwindow-x11.c it seems that Gdk does not provide the api you want. Can I ask you what do you want to do ? why do you want to set the window manager hints ? Do you really need them ? Could you not do what you want with the available api without settings the window manager hints ? cedlemo On 24/02/2017 12:43, John Lane wrote: > On 22/02/17 11:02, John Lane wrote: >> I'd like to set window properties, specifically window manager hints >> (such as _NET_WM_STRUT_PARTIAL). However, I cannot find an appropriate >> method on Gdk.Window to do this. I would expect to be able to write >> something like >> >> topw = toplevel.window >> topw.property_change("_NET_WM_STRUT","CARDINAL",32, >> Gdk::PROP_MODE_REPLACE, >> [0, 0, bar_size, 0]) >> topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, >> Gdk::PROP_MODE_REPLACE, >> [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) >> >> >> (I looked for methods like this `topw.methods.sort.each{|m| p m}`) >> >> I can see in the source code that there is a commented-out TODO block >> in file gdk3-no-gi/ext/gdk3-no-gi/rbgdkproperty.c with a call to >> `gdk_property_change`. That's the only mention I can find. I expect this >> means it's unimplemented ? >> > Further to this, I now realise that the 'property_change' function is > set in the Gtk C source code to be non-introspectable which means that > this method is not available in Gtk3 bindings. > > However, I also cannot find it in Ruby Gtk2. It is definitely supported > by Gtk2 and it is present in the gem source 'ext/gtk2/rbgdkproperty.c'. > The underlying Gtk2 C function is `gdk_property_change`. > > The below should be valid for Gtk2 Ruby. The constant > 'Gdk::Property::MODE_REPLACE' does exist but I cannot find the > 'property_change' method. I expected to find it at > 'Gdk::Window.property_change'. > > topw = toplevel.window > topw.property_change("_NET_WM_STRUT","CARDINAL",32, > Gdk::Property::MODE_REPLACE, > [0, 0, bar_size, 0]) > topw.property_change("_NET_WM_STRUT_PARTIAL","CARDINAL",32, > Gdk::Property::MODE_REPLACE, > [0, 0, bar_size, 0, 0, 0, 0, 0, x, x+width-1, 0, 0]) > > I expected to find it at Gdk.Window.property_change > > Is it there, if so, where? > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |