Implement application window highlight based on X11, mainly used in screen sharing process to highlight the shared application window and prompt the user.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
Usage: ./demo <window_id> <border_width> <border_length> <border_color:0xAARRGGBB>
- window_id
The window id of target application window, you can query it by
xwininfo -int
- border_width Highlighted border line width, measured in pixels, default value is 6 pixels.
- border_length The length of the highlighted border lines, from any corner of the window (4 corners in total), extending to the length of the adjacent sides. The unit is pix and the default value is 120 pix.Setting it to -1 indicates a fully encompassing highlighted box.
- border_color The color of the highlighted border, using the format 0xAARRGGBB, default value is 0xFF29CCA3.