Skip to content

Instantly share code, notes, and snippets.

@kui
kui / gist:2622504
Last active September 11, 2024 01:47
get the active window on X window system.
// -*- coding:utf-8-unix; mode:c; -*-
//
// get the active window on X window system
//
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#include <X11/Xlib.h> // `apt-get install libx11-dev`