如何点击gtk.Window? [英] How to click through gtk.Window?
本文介绍了如何点击gtk.Window?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案所以,答案是:
win.show_all()
#win.window。 input_shape_combine_mask(img,0,0)
def set_mask(win):
#b = gtk.gdk.bitmap_create_from_data(win.window,8,win.window.get_size())
size = win.window.get_size()
打印大小
位图= gtk.gdk.Pixmap(win.window,size [0],size [1],1)
cr = bitmap.cairo_create()
cr.set_operator(cairo.OPERATOR_SOURCE)
cr.set_source_rgba(0.0,0.0,0.0,0.0)
cr.rectangle((0,0)+ size )
cr.fill()
win.window.input_shape_combine_mask(bitmap,0,0)
print'ready'
gobject.timeout_add(5000,set_mask,赢)
Like on unity notifications. set_accept_focus() is not what I need, and I dont see something useful in gtk.gdk constants... Seems like my google-fu failed.
解决方案
So, the answer is:
win.show_all()
#win.window.input_shape_combine_mask(img,0,0)
def set_mask(win):
#b=gtk.gdk.bitmap_create_from_data(win.window,8,win.window.get_size())
size=win.window.get_size()
print size
bitmap=gtk.gdk.Pixmap(win.window,size[0],size[1],1)
cr = bitmap.cairo_create()
cr.set_operator(cairo.OPERATOR_SOURCE)
cr.set_source_rgba(0.0,0.0,0.0,0.0)
cr.rectangle((0,0)+size)
cr.fill()
win.window.input_shape_combine_mask(bitmap,0,0)
print 'ready'
gobject.timeout_add(5000, set_mask, win)
这篇关于如何点击gtk.Window?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文