From: John L. <jo...@la...> - 2017-02-28 21:14:19
|
On 28/02/17 20:45, cedlemo wrote: > > I can't believe how easy it is to hook up a GI library :) > > I totally agree, and this is thanks to Kouhei's work. You can open issue > for any problem related to GObject-Introspection on the ruby-GNOME2 > github. I am no more than a "power user" for those gems, Kouhei would > provide you a better help for more complicated problems. > thanks for that, and you've been very helpful too. That is much appreciated. > Do you plan to create a gem for the keybinder ? Yes, although it's almost not worth it. Since my last message I discovered that this is sufficient: require 'gi' class Keybinder; end GI::Loader.load('Keybinder', Keybinder) But, since I already have a gem templated I will upload it... > How did you deal with the dock problem and the update of the WM _ > DESKTOP size ? > I had to use Xlib to do it, with the help of 'xlib-objects': require 'xlib-objects' ... def show_all mg = screen.get_monitor_geometry( screen.get_monitor_at_window( screen.active_window())) x = mg.x width = mg.width move(x,0) resize(width,height) super topw = XlibObj::Window.new(XlibObj::Display.new(':0'), toplevel.window.xid) XlibObj::Window::Property.new(topw, '_NET_WM_STRUT').set( [0, 0, self.height, 0 ], :CARDINAL) XlibObj::Window::Property.new(topw, '_NET_WM_STRUT_PARTIAL').set( [0, 0, self.height, 0, 0, 0, 0, 0, x, x+width-1, 0, 0], :CARDINAL) end Best, John |