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

Floating sub-windows move around on their own? #196

Open
johnabs opened this issue Mar 12, 2024 · 8 comments
Open

Floating sub-windows move around on their own? #196

johnabs opened this issue Mar 12, 2024 · 8 comments
Assignees
Labels

Comments

@johnabs
Copy link

johnabs commented Mar 12, 2024

Hi there,

I've had a few issues when trying to play and chat where the various floating windows want to move on me (diagonally toward the bottom right of my screen), and I'm unsure why this keeps happening. It doesn't matter whether I have Xmonad in floats or tabs tiling mode for the sub-windows, but if I have the main window in a float, it does the same thing.

Even if I could just force these smaller windows to tile, that would be great because they would then be fixed in place and not jump around and screw up my inputs when trying to click some of the small buttons.

Would you happen to have any ideas as to what's going on?

Edit: this appears to be an issue when mousing over input fields specifically, such as buttons and dropdown menus, but not textboxes or window headers. Also, if you switch focus from the container to another window and back, it doesn't matter where you put your mouse it still causes a jitter by some number of pixels, but always in a consistent direction. Oh, also, if you leave a cursor blinking in a text box, it does it as well (e.g. click on a text box, and as the cursor blinks to indicate you can provide input, each blink produces the same motion, but hovering over it does not).

Edit 2: It seems like re-drawing certain features (e.g blinking cursor, and the highlight-on-hover effect of the buttons is what causes the issue).

Best,
johnabs

OS: Linux (Gnu Guix)
Desktop environment: XMonad
Graphics card: Intel Integrated Graphics
Output of docker info:

Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.25-ce
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runtime.v1.linux /gnu/store/ynahv7c819vj73w4lk64x5hdkm0h3zl6-runc-1.1.9/sbin/runc io.containerd.runc.v2
 Default Runtime: /gnu/store/ynahv7c819vj73w4lk64x5hdkm0h3zl6-runc-1.1.9/sbin/runc
 Init Binary: /gnu/store/hf19m37znd9n4fpq9jh3y0h7yqwsgspq-tini-0.19.0/bin/tini-static
 containerd version: 0
 runc version:
 init version:
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 6.3.11
 Operating System: Guix System
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 62.53GiB
 Name: laptop
 ID: 2A2Y:ULWM:77YD:KBR5:26N3:FFGV:IUF5:NJQN:YD4F:BJAF:SZ2I:JQSO
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

<output of './run-mtgo &>output.log'>

IMAGE=docker.io/panard/mtgo:latest
run(): docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.25-ce
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: /gnu/store/ynahv7c819vj73w4lk64x5hdkm0h3zl6-runc-1.1.9/sbin/runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: /gnu/store/ynahv7c819vj73w4lk64x5hdkm0h3zl6-runc-1.1.9/sbin/runc
 Init Binary: /gnu/store/hf19m37znd9n4fpq9jh3y0h7yqwsgspq-tini-0.19.0/bin/tini-static
 containerd version: 0
 runc version: 
 init version: 
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 6.3.11
 Operating System: Guix System
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 62.53GiB
 Name: laptop
 ID: 2A2Y:ULWM:77YD:KBR5:26N3:FFGV:IUF5:NJQN:YD4F:BJAF:SZ2I:JQSO
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
run(): docker run --privileged --rm -e DISPLAY -v mtgo64-data-johnbs:/home/wine/.wine/host/ -v mtgo64-data-johnbs:/home/wine/.wine/drive_c/users/ -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/johnbs/.local/share/mtgo/Xauthority:/home/wine/.Xauthority:ro --net=host --ipc=host -e TZ=/usr/share/zoneinfo/America/Indiana/Indianapolis --name mtgo_running -v /home/johnbs/.local/share/mtgo/files:/home/wine/.wine/drive_c/users/wine/Documents --cpuset-cpus 0-3 docker.io/panard/mtgo:latest mtgo
winetricks gdiplus=builtin sound=alsa winegstreamer=disabled wmp=disabled
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
warning: You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this.
------------------------------------------------------
Using winetricks 20240105-next - sha256sum: 30de40300f3b76333eff7049896d6fb4d55085664474a664a29baa7aa14ce432 with wine-9.2 and WINEARCH=win64
Using builtin override for following DLLs: gdiplus
Executing wine C:\windows\syswow64\regedit.exe C:\windows\Temp\_builtin\override-dll.reg
012c:err:environ:init_peb starting L"C:\\windows\\syswow64\\regedit.exe" in experimental wow64 mode
Executing wine C:\windows\regedit.exe C:\windows\Temp\_builtin\override-dll.reg
Executing mkdir -p /home/wine/.wine/dosdevices/c:/windows/temp/_builtin
Executing w_do_call sound=alsa
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
warning: You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this.
------------------------------------------------------
Executing load_sound alsa
Setting sound driver to alsa
Executing wine C:\windows\syswow64\regedit.exe C:\windows\Temp\set-sound.reg
019c:err:environ:init_peb starting L"C:\\windows\\syswow64\\regedit.exe" in experimental wow64 mode
Executing wine C:\windows\regedit.exe C:\windows\Temp\set-sound.reg
Using  override for following DLLs: winegstreamer
Executing wine C:\windows\syswow64\regedit.exe C:\windows\Temp\_disabled\override-dll.reg
01ac:err:environ:init_peb starting L"C:\\windows\\syswow64\\regedit.exe" in experimental wow64 mode
Executing wine C:\windows\regedit.exe C:\windows\Temp\_disabled\override-dll.reg
Executing mkdir -p /home/wine/.wine/dosdevices/c:/windows/temp/_disabled
Using  override for following DLLs: wmp
Executing wine C:\windows\syswow64\regedit.exe C:\windows\Temp\_disabled\override-dll.reg
01bc:err:environ:init_peb starting L"C:\\windows\\syswow64\\regedit.exe" in experimental wow64 mode
Executing wine C:\windows\regedit.exe C:\windows\Temp\_disabled\override-dll.reg
Executing mkdir -p /home/wine/.wine/dosdevices/c:/windows/temp/_disabled
wineboot
01d4:err:wineboot:ProcessStartupItems Couldn't get desktop folder.
removed '/home/wine/.wine/dosdevices/z:'
wine /opt/mtgo/mtgo.exe
01dc:err:environ:init_peb starting L"\\\\?\\unix\\opt\\mtgo\\mtgo.exe" in experimental wow64 mode
01e4:err:vulkan:wine_vk_init Failed to load libvulkan.so.1.
01dc:err:ole:create_server class {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} not registered
01dc:err:ole:com_get_class_object no class object {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} could be created for context 0x4
01dc:err:ole:create_server class {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} not registered
01dc:err:ole:com_get_class_object no class object {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} could be created for context 0x4
01dc:err:ole:create_server class {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} not registered
01dc:err:ole:com_get_class_object no class object {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} could be created for context 0x4
01dc:err:ole:create_server class {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} not registered
01dc:err:ole:com_get_class_object no class object {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} could be created for context 0x4
01dc:err:ole:create_server class {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} not registered
01dc:err:ole:com_get_class_object no class object {20fd4e26-8e0f-4f73-a0e0-f27b8c57be6f} could be created for context 0x4
0284:err:ole:CoGetContextToken apartment not initialised
0294:err:vulkan:wine_vk_init Failed to load libvulkan.so.1.
0294:err:wgl:init_opengl Failed to load libGL: libGL.so.1: cannot open shared object file: No such file or directory
0294:err:wgl:init_opengl OpenGL support is disabled.
0294:err:d3d:wined3d_caps_gl_ctx_create Failed to find a suitable pixel format.
0294:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 00007F4FDDE2BE30.
0294:err:d3d:wined3d_caps_gl_ctx_create Failed to find a suitable pixel format.
0294:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 00007F4FDDE2BE30.
0278:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Foundation.Diagnostics.AsyncCausalityTracer"
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default
====== MTGO.exe has started.
====== shutting down
wineserver -kw
@pauleve
Copy link
Owner

pauleve commented Mar 13, 2024

I also have that issue.
I fixed it switching to the "emulate desktop" feature of wine you can activate with ./run-mtgo --winecfg:

@johnabs
Copy link
Author

johnabs commented Mar 13, 2024

Thank you for the quick response!

I was able to somewhat address this in Xmonad by using the SinkAll function: it forces all the windows on the current workspace to tile (and since I use a tabbed layout, basically turns them all into tabs). I'll try your method out as well, but I wanted to throw this out there for anyone else who might have the same issue if emulate-desktop fails them for whatever reason!

I'll edit this comment with my results once I try it out and you/I can close the issue at that point, if you think that would be appropriate :)

@pauleve
Copy link
Owner

pauleve commented Mar 13, 2024

Thanks for the tip on SinkAll, I'll give a try as well!

@johnabs
Copy link
Author

johnabs commented Mar 14, 2024

Actually, I have a follow up question (not sure if I should ask it here, or add another issue).

Basically, what volumes are mounted for the docker container for MTGO, and what external processes can the container see, if you don't mind me asking? Clearly it can access networking, but can it see anything else on the host machine or is the container fully isolated other than that?

@pauleve
Copy link
Owner

pauleve commented Mar 15, 2024

You can decipher most of the information from the docker command line which is printed by ./run-mtgo.
Essentially, regarding the volumes:

  • there is one pure docker volume (not tied to the filesystem), to store most of the installation and user files
  • /tmp/.X11-unix and ~/.local/share/mtgo are mounted within the container for handling the connection to the X server

In our case, the isolation is not very strong (the container also has access to the host network and do inter-process communication with it + it runs in privileged mode).
The main security layer is more related to user permission: the processes are run as a regular user.

Note that you should be able to run it using podman instead of docker thanks to #187, which may be a bit simpler in terms of security.

@johnabs
Copy link
Author

johnabs commented Mar 16, 2024

Okay, so it can access the X server for making windows and such (totally makes sense), the network, and those two directories.

Could you explain a bit of what it means to run in privileged mode if you don't mind?

@pauleve
Copy link
Owner

pauleve commented Mar 17, 2024

https://docs.docker.com/reference/cli/docker/container/run/#privileged

That being said, maybe that mode is no longer necessary for running MTGO within Docker (it was several years ago, but I cannot recall why). I'll give a try soon.

@johnabs
Copy link
Author

johnabs commented Mar 27, 2024

Thanks for the reference and being willing to investigate this! I'll try it as well after taking a quick look into the link you sent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants