Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.88 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.88 KB

Matlab focus fixer

Prevents Matlab from stealing focus. Tries to set the _NET_WM_USER_TIME to a proper value to get the correct window behavior.

The focus is only given to windows which have been started less then 2 sec (2000 ms) since last user interaction in Matlab.

The idea is to intercept the X11 calls with a dynamic library (via LD_PRELOAD) and patch the calls to comply with the X11 documentation.

Build

make

Start matlab

LD_PRELOAD=$PWD/focus_fixer.so matlab

TODO

  • Make new windows minimized if main window is out of focus (not the active window).
  • Make new windows show up in parent windows workspace.
  • Set the PID of the splash screen and make it not on always on top
  • Use the splash screen workspace location for the main window.
  • Clean the code up :)
  • License, wmctrl is GPL ?, the initial version worked without snippets of code from wmctrl.

Reference list