xlib

Can't get a window handle?

被刻印的时光 ゝ 提交于 2019-12-23 23:09:07
问题 I've searched all over to try and find an answer to my predicament but cannot seem to find a valid answer. I'm trying to write some equivalent user32.dll code with Xlib instead so I can support Linux users. I'm of course running Linux, so I'm using Mono. Problem comes along when I cannot even grab a window handle from the Process class because it was never even implemented: [MonoTODO] [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] [MonitoringDescription ("The

How to do a fake mouse wheel move in linux

≡放荡痞女 提交于 2019-12-23 20:08:09
问题 I'm trying to simulate keyboard and mouse events, i've successfully made fake keyboard keydown, keyup. Fake mouse button down, up and fake mouse move, but i don't found how to do fake mouse wheel move, can someone explain to me a simple way to do this in c++? Mouse Move and Mouse button press: Display *dpy = XOpenDisplay(NULL); XTestFakeMotionEvent(dpy, -1, 50, 50, 0); XTestFakeButtonEvent(dpy, Button1, true, 0); XTestFakeButtonEvent(dpy, Button1, false, 0); XFlush(dpy); XCloseDisplay(dpy);

Compiling 32bits qt sources on a 64bit Debian environement

夙愿已清 提交于 2019-12-23 09:16:35
问题 I want to build 32 bits applications on my Debian 64 bits environment. So, I'm trying to compile the Qt sources in order to get the 32 bits libraries. I am trying to use the following configure command: ./configure -platform linux-g++-32 Unfortunately, I get an error as below: Basic XLib functionality test failed! You might need to modify the include and library search paths by editing But when I do the following: ./configure -platform linux-g++-64 It's working fine. Any guesses? 回答1: Based

How to create OpenGL-enabled window with transparent background using xlib and glx

早过忘川 提交于 2019-12-22 18:48:33
问题 I'd like to create a window with transparent background and then render something onto it using OpenGL. I don't want to use the trick where whatever is behind the window is captured and then painted as a background - I want real transparency (I have composition manager running). I'm not using any GUI library (GTK, QT, ...), just raw xlib and glx. Anyone knows how to do it? 回答1: Take a look at these patches to Neverball and SDL. They seem to be based on NVidia's driver documentation. I haven't

Need for XEventsQueued(display, QueuedAfterReading) in XCB

这一生的挚爱 提交于 2019-12-22 12:46:10
问题 I am migrating some code of CYBOI from Xlib to XCB. CYBOI uses a couple of threads for different communication channels like: serial_port, terminal, socket, x_window_system. However, it uses these threads only for signal/event/data detection; the actual receiving and sending is done in the main thread, in order to avoid any multi-threading conflicts of address space. For the x_window_system channel, I previously detected events in a thread: int n = XEventsQueued(display, QueuedAfterReading);

X11 modal dialog

点点圈 提交于 2019-12-22 12:20:50
问题 How can I create a modal dialog in X11 using Xlib? A modal dialog is a a window that stays on top of other windows of the app (like transient windows do) and also refuses to give focus to other windows of the app. In Windows, modality is also signaled by flashing the titlebar of the modal window when trying to steal the focus from it. Thanks. 回答1: You need to set _NET_WM_STATE property (which is of type "atom list") to include _NET_WM_STATE, see references to _NET_WM_STATE in EWMP spec (also

X11 modal dialog

风流意气都作罢 提交于 2019-12-22 12:20:20
问题 How can I create a modal dialog in X11 using Xlib? A modal dialog is a a window that stays on top of other windows of the app (like transient windows do) and also refuses to give focus to other windows of the app. In Windows, modality is also signaled by flashing the titlebar of the modal window when trying to steal the focus from it. Thanks. 回答1: You need to set _NET_WM_STATE property (which is of type "atom list") to include _NET_WM_STATE, see references to _NET_WM_STATE in EWMP spec (also

Get window title with XCB

眉间皱痕 提交于 2019-12-21 21:39:40
问题 I am trying to get information about the window in focus. It seems that I get a correct window id from xcb_get_input_focus_reply_t->focus : it stays the same for my Eclipse IDE (56623164) and is another for any other window in focus. However, the value length is always 0 for XCB_ATOM_WM_NAME . shortened code cookie = xcb_get_property(c, 0, fr->focus, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 0, 0); if ((reply = xcb_get_property_reply(c, cookie, NULL))) { int len = xcb_get_property_value_length(reply

XLib Window Name Problems

∥☆過路亽.° 提交于 2019-12-21 19:43:21
问题 since 4 days, I try to see how XLib works, and I have finally understood that. Si I tried to make a short program wich retrieve open window's name. For that, I created 2 functions : Window *list (Display *disp, unsigned long *len) { Atom prop = XInternAtom(disp,"_NET_CLIENT_LIST",False), type; int form; unsigned long remain; unsigned char *list; if (XGetWindowProperty(disp,XDefaultRootWindow(disp),prop,0,1024,False,XA_WINDOW, &type,&form,len,&remain,&list) != Success) { return 0; } return

pointer motion. why are numbers so high? why does it print info in blocks not a constant stream?

主宰稳场 提交于 2019-12-20 04:43:11
问题 Hi! I am trying to write a program where I need to report the position of every mouse motion. I have called the XSelectInput() function with a PointerMotionMask mask. Everything seems to work alright but the numbers after printing don't appear after every movement, they appear in blocks and also the numbers in event.xmotion.x and event.xmotion.y are very high, in the hundred thousands. What is causing these large numbers? Also is my program getting every number and reporting it immediately or