Open moteus opened 4 years ago
I haven't seen this with tooltips and autocomplete dropdowns, but I've seen it on a couple of occasions with the commandbar. I'm not sure what to make of this, as the coordinates are set explicitly, so this looks like some sort of bug in the window manager. I don't have better ideas. In my case the position for the commandbar wasn't random, as it was occasionally positioned shifted, but always horizontally by some number of pixels. I've never seen it shifted vertically.
If this happens regularly for you, I can provide some troubleshooting hints (what code to add where) to check on what coordinates are being sent to Scintilla methods.
Is there anything else that may be special about your setup? I called the commandbar two dozen times or so (as I was debugging another issue), but it was always shown correctly. Does it happen with any regularity for you?
At first, I use Ubuntu 18.04.4 LTS with Gnome shell 3.28.2 on a laptop with the external monitor. I think there 2 separate issues.
Command bar - showed on the screen where the mouse cursor is. Also, it shows on the left side most of the time, but in some cases, it shows on the right side. On my Ubuntu 16 system, it shows on the right side all the time.
With autocomplete I think the problem on the wxWidgets side because I got the problem with the position even when I call ide:GetEditor():AutoCompShow(2, "print")
from the console (I type pr
in the editor and then call a command from the console). It happens almost all the time when I maximize a window on the external monitor. When the editor placed on the main screen (monitor of the laptop) all works as expected. All this happens on the wxWidgets 3.1.4, wxLua 3.0.0.8. When I replace binaries to the wxWidgets 3.1.1, wxLua 2.8.12.3 all starts working correctly.
@moteus, apologies, missed your response.
I think you are correct with respect to it showing where the mouse cursor is, but the mouse position is not taken into account in the calculations (showCommandBar
function in commandbar.lua). The position should be based on the position of the notebook and nothing else.
What may be happening is the screen position for the notebook not being reported correctly (ide:GetEditorNotebook():GetScreenPosition()
); or possibly positions for individual pages.
There is a related comment for tabs (may report 0 as their screen position on Linux, which is incorrect.
), which is addressed by comparing with the notebook position, but maybe there are corner cases that still pass the check.
ide:GetEditor():AutoCompPosStart()
return correct position when the popup is shown?It could be directly related to the external monitor (as I don't have one in my setup, but will try to connect to see if I can reproduce it this way).
@moteus, is there any additional information for the screen position?
I did not investigate it further.
Maybe you have some hint to where I can start
E.g. how to check Does ide:GetEditor():AutoCompPosStart() return correct position when the popup is shown
.
PS. I switched back to the gtk2 on my Ubuntu system an has no problem with drop-down lists. I have only problem with the command bar position, but i can live with that.
On my Ubuntu system, I have a problem with drop-down auto-complete lists. This list may show in the wrong position. I have 2 monitors (in fact it is a laptop with the external monitor).
I have the same issues with the hints (e.g. show values during debugging or show function arguments)
Also, I have a problem with positioning the command bar like navigate to the line. It can show in some random place on the screen.