Can I get the handle to the foreground (active, focused) window (similar to GetForegroundWindow for Windows)?

Is there any handle for the X Window Manager to do this? Or this is not supported?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.