开发者

GTK StatusIcon: Coordinates of left-click?

开发者 https://www.devze.com 2022-12-22 08:16 出处:网络
how do I get the x/y-coordinates of a left click in a Gtk StatusIcon? This is my first GTK app and I\'m stuck. Is there any way to get details about the last button event that occurred? Or is it poss

how do I get the x/y-coordinates of a left click in a Gtk StatusIcon?

This is my first GTK app and I'm stuck. Is there any way to get details about the last button event that occurred? Or is it possible to pass t开发者_运维知识库hose details to the handler function when connect()ing the "activate" callback?

Greets, Philip


Since the status icon isn't a widget, it's a bit roundabout. You might be able to pass in some kind of widget as part of the user parameter object and get the global mouse position on activate. See here on how you might.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号