Skip to content

Patches the X11 calls to comply with the standard and desired behavior.

Notifications You must be signed in to change notification settings

joka90/matlab-focus-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Patches the X11 calls to comply with the standard and desired behavior.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published