I want to resize borderless window with paned (seperator) object, If you know terminal application guake does this with motion-notify-event
here is the code:
self.resizer.connect('motion-notify-event', self.on_resizer_drag)
def on_resizer_drag(self, widget, event):
"""Method that handles the resize drag. It does not actuall
moves the main window. It just set the new window size in
gconf.
"""
(x, y), mod = event.device.get_state(widget.window)
if not 'GDK_BUTTON1_MASK' in mod.value_names:
return
max_height = self.window.get_screen().get_height()
percent = y / (max_height / 100)
if percent < 1:
percent = 1
self.client.set_int(KEY('/general/window_height'), int(percent))
Resizer is paned object but this code using pygtk (gtk2) I'm using python-gobject with gtk3 event.device.get_state(window) method is deprecated or changed. This is not work for me, any advice or solution about resize window borderless window with object drag?