Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDEA menus may appear at an offset #3202

Closed
cavedon opened this issue Jul 14, 2021 · 6 comments
Closed

IDEA menus may appear at an offset #3202

cavedon opened this issue Jul 14, 2021 · 6 comments
Assignees
Labels
bug Something isn't working geometry

Comments

@cavedon
Copy link

cavedon commented Jul 14, 2021

When using IntelliJ IDEA via Xpra, under some circumstance the menus will appear at an offset (see attached video).

The problem starts happening when doing some action that will cause navigating to a different file in the editor view.
The problem disappears once I move or resize the IDEA window.

The problem is reliably reproducible.
The offset seems to be related to the position of the window on the screen: the further away the main window is from the top left corner of the screen, the greater the offset of the menu is.

In addition to the menus appearing at an offset, it looks like that "some" parts of the window see the mouse pointer at an offset. E.g. resizing panes needs to be done at an offset.

Other observations:

  • tested with IDEA 2020.3.4 community edition
  • OS is Ubuntu 20.04 on amd64, running gnome-shell- changing window manager to i3 did not help
  • disabling scaling (for high resolution monitor) did not help
  • it happens in the same whether I am using openjdk 1.11 or 1.14
  • when running IDEA in Xvfb and connecting to it via x11vnc, the problem does not happen
  • when using ssh with X11 forwarding, the problem does not happen

I cannot rule out it is a Java or IDEA bug, but I was not able to reproduce it without xpra, so I think the debugging should start here.

How can I debug this further?

Video: https://user-images.githubusercontent.com/171046/125608113-741da315-141b-4dbd-9a3f-f2cbe9846cce.mp4

@totaam totaam added bug Something isn't working geometry labels Jul 14, 2021
@totaam totaam self-assigned this Jul 14, 2021
@totaam
Copy link
Collaborator

totaam commented Jul 14, 2021

@cavedon I bet it doesn't happen with start-desktop mode either.
Can you please specify the xpra version and commands used?

@cavedon
Copy link
Author

cavedon commented Jul 14, 2021

Can you please specify the xpra version and commands used?

Oh, of course, sorry for the obvious omission

Version 4.2-r0-1 from xpra deb repo

Server: xpra start :100
Client: xpra attach --opengl=no --pulseaudio=no --min-speed=90 ssh://127.0.0.1/

I bet it doesn't happen with start-desktop mode either.

checking

@cavedon
Copy link
Author

cavedon commented Jul 14, 2021

I bet it doesn't happen with start-desktop mode either.

Correct. It does not happen in start-desktop mode.

@totaam
Copy link
Collaborator

totaam commented Jul 15, 2021

Reproducible on Fedora.

IDEA sends a StackMode configure request (most applications never use this):

do_child_configure_request_event(<X11:ConfigureRequest {'send_event': '0', 'serial': '0x359a', \
    'delivered_to': '0x400010', 'window': '0x180004c', 'x': '0', 'y': '0', 'width': '1390', 'height': '1042', \
   'border_width': '0', 'above': 'None', 'detail': '0', 'value_mask': '64'}>) \
   client=0x180004c, corral=0x400010, value_mask=StackMode, size-hints={'position': (202, 167), 'gravity': 1, 'minimum-size': (340, 0)}
restack above=None, detail=0

And then we were wrongly claiming to have updated the window geometry in the configure notification message we sent back.

Now, we weren't actually changing the window position or size and the window manager is free to do so if it so wishes, so this bug may still exist in IDEA: it looks like they're miscalculating the window's position.

@cavedon you can apply this tiny fix by hand to your installation, use the latest Ubuntu 20.04 packages from the beta repository or wait for the 4.2.2 update.

@stdedos
Copy link
Collaborator

stdedos commented Jul 27, 2021

Verified as fixed in r29499 - thanks 😀

@cavedon
Copy link
Author

cavedon commented Aug 23, 2021

Confirming it fixes my issue in 4.2.2, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working geometry
Projects
None yet
Development

No branches or pull requests

3 participants