You are not logged in.

#1 2013-09-06 13:39:45

Active Build
Member
Registered: 2013-09-04
Posts: 12

XCB - how to launch and show an application (terminal for example)?

Hello, everyone!

I'm trying to learn XCB, but all of the tutorials I've found so far do not explain how can XCB used as a window manager.

I understand how to draw a single window and add a string to it, but how can I launch something from it and show it to the user?


[ github ]

Offline

#2 2013-09-07 16:28:13

cmtptr
Member
Registered: 2008-09-01
Posts: 135

Re: XCB - how to launch and show an application (terminal for example)?

XCB is an implementation of the client side of the X protocol.  In other words, it's a library for writing X applications and window managers; it's not a window manager itself.

If you're interested in learning about how window managers launch applications, you probably want to read up on fork() and execve().  This is essentially how all processes are created on a Linux system (from init, a shell, window manager, etc.).

Also, if you're interested in learning how window managers work, a good place to start might be tinywm.  It's a single C file intended to be the bare minimum to be a window manager.  It uses Xlib though, not XCB, but at this point your goal should be to understand the concepts.  Somebody out there may have created an XCB version by now, anyway...

Last edited by cmtptr (2013-09-07 16:43:52)

Offline

#3 2013-09-07 21:06:42

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,012

Re: XCB - how to launch and show an application (terminal for example)?

mcwm is a xcb based window manager and there's links to the xcb documentation on that web page as well.


You're just jealous because the voices only talk to me.

Offline

#4 2013-09-13 06:02:51

gsingh93
Member
Registered: 2013-07-19
Posts: 96

Re: XCB - how to launch and show an application (terminal for example)?

EDIT: Oops, I thought you were asking how to make a window in XCB, now how to make a window manager.

Original Post:

I'm working on a C++ UI toolkit that uses XCB. You can see the code for creating a window in the Window::show() function in window.cpp: https://github.com/gsingh93/ui-toolkit

The code is essentially based of off this tutorial: http://www.x.org/releases/X11R7.7/doc/l … index.html

Last edited by gsingh93 (2013-09-13 06:04:06)

Offline

Board footer

Powered by FluxBB