I found this the hard way. I dove into source code of wx.lib.agw.aui.framemanager
and tried to figure out why docking hints don't work properly. I have checked every step until in the very end of calculating a place to draw a hint there was a method ClientToScreen(self,x,y)
which should return x,y
with an offset of self: wx.Window
, but returns x,y
with the same offset every time. Then I tried specifying the starting position in the constructor of my main frame, which didn't have any effect on the position of the frame. Then I checked an output from GetScreenPosition
while handling EVT_MOVE
and it turns out that EVT_MOVE
is not even emitted on Wayland, except when you use Move
or maximize/minimize the frame (maybe in some other cases, but I have only found mentioned cases).
Inside EVT_MOVE
handler GetScreenPosition
returns:
- (0,0) when you maximize the window,
- the coordinates that you specify
in
Move
when triggered by it (but theMove
itself doesn't work) (26, 23)
in other cases (including calling it in other places)
Is this a known bug? Maybe I am the only one experiencing it. If not, I will add an issue in wxWidgets/Phoenix.
edit: python 3.6.9, wxPython 4.0.7, Ubuntu 18.04.1, Gnome 3.28.4