xlib

Xlib event when window is moved from one workspace to another

I want to know the event name of application moving from one workspace to another using Xlib. ...

How to get raw mouse events with XI2 extension?

I'm using XISelectEvents for root window with deviceid=XIAllDevices and mask=XI_RawMotion, but I don't get any events. What's wrong? ...

X11: How to rotate the gravity/orientation to 90 degrees

Hello, I need to know is it possible to rotate the orientation of all X-based apps to 90 degrees. Without modifying their sources. I guess X11 should have some configuration option for this. So how to do this ??? Regards, Levon ...

Touch screen relative coordinates

Hello, I've rotated X environment with xrandr -o left|right|inverse|normal on touch screen device. Everything is working OK beside touch. When moving finger on the screen, it takes absolute coordinates of finger and moves cursor in opposite direction if the rotation is inverse. So if I slide up actually it slides down. So is there a way...

How to compile '97 C codes using Motif?

Hi I'm trying to compile about 30 C sources written in 1997. Based on required header files such as XmAll.h and Xlib.h and the use of "Widget" syntax, I found that these sources depend on the Motif programming tool kits, so it seems they should be compiled in Linux or Unix system. I have no any experience with X Windows Programming and ...

How to attach X11 app to Dbus.

Hello, How to make X11 application to listen to DBus signal. That to listen to Dbus signal gmainloop should be launched, and for X11 app XEvent loop. So is there an elegant way to do this ? Or do I have to run gmainloop in another thread. Regards, Levon ...

How to get Xlib code work in eclipse for C++ ubuntu

I have some code with the following headers for Xlib but don't know what to do to make it work...I can't find these headers. #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xos.h> #include <X11/Xatom.h> Sorry new to this.. Okay so now I can view the headers in the foldrrs in my eclipse IDE. and i get the following errors.Th...

X11: How to make the application to be on top

Hello, Situation I'm using matchbox keyboard which is X11 based application. When any application is in full screen mode matchbox keyboard cannot be visible as the full screened application is on TOP. So is there a way to launch X11 based application over full screened applictions ? Regards, Levon ...

some keyboard/mouse events cant be caught-xlib programming

hi .. i have a problem with this program ,it lists the current window along with window id thet are running on the system,result is that for a particular window id that i enter i got odd result: for application like firefox or gedit just motion notify event works,non of the other events work?? for my terminal(bash) everything works,key p...

drop/rewrite/generate keyboard events under Linux

I would like to hook into, intercept, and generate keyboard (make/break) events under Linux before they get delivered to any application. More precisely, I want to detect patterns in the key event stream and be able to discard/insert events into the stream depending on the detected patterns. I've seen some related questions on SO, but: ...

Excluding some keys from XGrabKeyboard

Consider an application where it's desirable to grab the keyboard when focused in order to capture all window manager commands (Alt+F4 and whatnot) for processing. Now, this has the downside that the user has no way of switching to another application or virtual desktop via the keyboard when the keyboard is grabbed. I'd like to have a us...

Window position in Xlib

How to get top-level window position relative to root window (i.e. whole screen) using plain ol' xlib (or brand new XCB)? ...

Xlib points of line not the center

I am using Xlib to draw a line between two points which I have taken input from mouse click of the user. I use drawline and fillarc functions. Fillarc for marking start and end points. As soon as I take an input I draw the line between the two points. The problem is that the coordinates I give do not appear to be at the center , rather ...

python-opencv webcam ["noneType"]

few weeks ago I tryed to move my mouse pointer using python and opencv ...I didnt had time to do it and today I accidentally found a piece of code doing that my problem is that I cant open my webcam anymore with opencv ... I`m using ubuntu 10.04 ... /dev/video0 is working I can do luvcview -d /dev/video0 but when I say camera = highgui...

xlib/ xcb deadlock or block

Hi, I’ve a program developed using xlib and cairo. Just for the reference I do mix calls between cairo and xlib, although I’m not sure If that might be the cause of the error. I get a deadlock or a block in some situations. I’ve three threads that work with xlib. One is the main UI thread which makes calls to both xlib and cairo, anothe...

Xlib: XGetWindowAttributes always returns 1x1 ?!

I'd like to have width and height of the currently focussed window. The selection of the window works like a charm whereas the height and width are always returning 1. #include <X11/Xlib.h> #include <stdio.h> int main(int argc, char *argv[]) { Display *display; Window focus; XWindowAttributes attr; int revert; disp...

xrandr changes X's orientation too slowly

Hello, I'm changing X's orientation with following command xrandr -o left xrandr -o normal ... When orientation is changing screen becomes black for a moment then it switches orientation. So how to get rid of this black screen effect ? Maybe some other options should be added to xrandr ? Regards, Levon ...

What method rotates screen in Xserver

Hi, I would like to know the functioncode/source_file which rotates screen by 90/180/270 degrees using xrandr tool ? xrandr -o left xrandr -o right xrandr -o inverted xrandr -o normal What function invokes screen rotation in Xserver using above commands ? Regards, Levon ...

Discover the size of a panel with Xlib

I'm writing a application that put docks in the right side of the screen, like this: I can reserve space in the side of the screen by using the _NET_WM_STRUT_PARTIAL, so that the maximized windows won't overlap the docks. In the image, you can see that there is a top panel. The problem is that the docks will overlap the panel. Is the...

Global Hotkey with X11/Xlib

My goal is to have a program that sleeps in the background but can be activated by the user via some "hotkey". From digging around the Xlib manual and the Xlib O'reilly manual, I gather that the correct way to to this is with XGrabKey. However my understanding of the process is incorrect as a simple proof of concept does not work. My un...