On 12-06-2019 09:15, Alex X wrote:

I have some strange code but after refactoring everything seems to be working as I want, almost.

I'm having 2 issues.

  1. I am getting the position of clicks from the mouse but it seems that the position is relative to the child elements for a paned. This causes position calculations to not be correct as I would like.

The coordinates should usually be relative to the widget that receives
the signal.

gdk.Window.coordsFromParent()
gdk.Window.coordsToParent()

Can be useful if you need the coordinates relative to the parent.

  1. In my paned I have some text entries in some children... when they are in edit mode(they have focus) the paned's handle no longer moves, at lead in some conditions which I haven't figured out.

One of the problems is the way I'm doing some things where I let clicking on the item to do other things... but using a modifier... and essentially both handlers get called. e.g., if I use ctrl and click the entry still get's focus I could probably override the handlers and avoid this possibly but I'd have to do it for each handler. I'll probably have to do this to get everything working in the end but I'll then still have my paned not work if the entries have focus.

Maybe one of the signal handlers is returning true instead of false
stopping gtk from preforming the default behavior for the event?