Skip to content

renjuashokan/x11Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X11Test Programs

This is a simple program to do the following operation on windows on x11 machine(ubuntu)

  1. Raise Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.RaiseWindow(hdl)
  2. Lower Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.LowerWindow(hdl)
  3. Show Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.ShowWindow(hdl)
  4. Hide Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.HideWindow(hdl)
  5. Maximize Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.MaximizeWindow(hdl)
  6. Remove Window Decorations
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.RemoveWindowDecoration(hdl)
  7. Move Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.MoveWindow(hdl, 400, 300);
  8. Resize Window
    WindowManager::WindowMgrLib wmgr;
    // make sure one window with this name exists
    Window hdl = wmgr.GetWindowHandle("TestWindow");
    wmgr.ResizeWindow(hdl, 400, 300);

Additional info

Window names can be found with following command

xwininfo -root -tree

Install X11 libraries


Be sure to install X11 libraries before proceeding.

sudo apt install libx11-dev
sudo apt install libxrandr-dev

Build and run

cd x11test
mkdir build
cd build
cmake ..
make -j4

or run the below script

cd x11test
./build.sh

About

Simple x11 programs to manage windows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published