How to click through gtk.Window?

我们两清 提交于 2019-11-30 16:00:26

问题


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.


回答1:


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)


来源:https://stackoverflow.com/questions/11914785/how-to-click-through-gtk-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!