I am trying to programmatically move a window so that it is partially on screen. For instance, clicking the VLC title bar and dragging it so that only half the window is visible works just fine. When I output the results of wmctrl -lG this works just fine: However, when I then move it back on screen and try and
Tag: x11
Xlib: Adding a window to the save-set using XAddToChangeSet does not work from Java/JNI
I am getting stuck and don’t know where to look further. I have a Java application and one of its functionality is to grab some specific windows (ie third party application windows) and host them within itself (with some extra frames, etc…) The whole thing works great, except when my Java application gets killed (or crashes). When this happens, the
How to move or resize X11 windows (even if they are maximized)?
I want to change position of a window. My problem is that the window can be maximized, this does not allow to change its size and location (window can belong to any application). I use KDE4. I tried to use ewmh Python module. In my case when the window is maximized I just want to move it from one monitor
Get UTF-8 input with X11 Display
I’ve been trying and reading lots of resources on the internet, trying to find a way to get an UTF-8 keyboard (composed) input from a X Display. But I could not make it work. I have tried the example code from this link (exaple 11-4), but no success. I also have written a simple example (below) to try to make
Why XGrabKey generates extra focus-out and focus-in events?
Does anyone know an xlib function to trap a keypress event without losing the original focus? How to get rid of it? (or “to use XGrabKey() without generating Grab-style focusout”?) (or “How to get rid of NotifyGrab and NotifyUngrab focus events at system level?) The XGrabKey will lose focus on key pressed and restore focus on key released. And I
How to get started writing a compositing WM?
I would like to write a basic hardware-accelerated window manager, so I’ve been looking for some documentation on how to get started, but I’ve only managed to find this tutorial, which uses an outdated version of Clutter and won’t build with any version currently available. Are there any other good resources for how to do this, or alternatively, a really
Replace of XKeycodeToKeysym
When I try to build my code with the X11 headers in Ubuntu 12.04 What is the expected result? Compiles. What happens instead? As a result of https://bugs.freedesktop.org/show_bug.cgi?id=5349 XKeycodeToKeysym is now properly marked as being deprecated. How to fix my code for warning free and correct build? Thanks Answer Provided XKB is available then the simplest replacement for XKeycodeToKeysym is:
Is XCB ready for production use? Should I use Xlib instead?
If one needs low level access to X11 events, windowing and input without using GTK, QT et al., should one use Xlib or XCB? What are the pros and cons of each? Answer You can use both of them. XCB is simpler to use, has a better response to a multithread environment but lacks documentation, while Xlib is a more
How to change Keyboard Layout (a X11 API solution)
I want to change keyboard layout in Linux by programming, What X11’s API function does this? Answer I found one good solution. It’s a c++ class wrriten by Jay Bromley, that I can add to my app and using it. source code It’s very easy to use: you can read source code and found some another useful functions. for compiling
Drawing on the X root window
I’d like to be able to draw on the root window in Linux. I.e. make an OSD. I’m using Gnome. Code samples or links to them would be appreciated. Answer It is possible, but you will not see anything in GNOME. Nautilus, GNOME’s file manager, opens its own window on top of root X window to display icons. Because of