'How to get the name of the process that is running full screen on Windows using Python?

I'm using Windows 11.

I want to write a Python script that:

  1. identifies if a process is running full screen, and
  2. gets the name of that process.

For example, if VLC is running at full screen, then the output of this function should be vlc.exe or similar.

However, googling for such a library or example yields no results. There is a Linux alternative but that is of no use to me.

Is such a thing possible using Python on Windows?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source