x11

Setup OpenGL on X11

独自空忆成欢 提交于 2019-12-23 01:37:24
问题 I have an Window identifier for X11 Window. I didn't setup this window, I just can get its id (and I suppose, visual id). How can I setup OpenGL context for this window? In particular, I want to use glXMakeCurrent , but this function receives Display and GLXContext objects. I can create context using glXCreateContext(display, vi, 0, GL_TRUE); but again I need in Display and XVisualInfo objects. 回答1: Setting up a OpenGL context on a X11 window is covered by one of my code examples (based upon

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

Register hotkey with only modifiers in Linux

若如初见. 提交于 2019-12-22 08:28:51
问题 I'm using this sample to set hotkey in my program in Linux X11 graphic system. The problem is i don't understand how to set hotkey combinations like Ctrl + Alt and Ctrl + Shift , i.e. without any key, only modifers. I'm trying like this: KeyCode key = XKeysymToKeycode(display, 0); //no key code XGrabKey(display, key, ControlMask | ShiftMask, grabWin, true, GrabModeAsync, GrabModeAsync); But it's not working. However, it is working like this (kind of): KeyCode key = XKeysymToKeycode(display,

Why python Wnck window.activate(int(time.time()))

天涯浪子 提交于 2019-12-22 08:23:15
问题 This to me is VERY strange. Could someone please explain why the activate() function should want a timestamp? Wouldn't 99.9% of the time be NOW or ASAP or "At your earliest convenience"? And furthermore, if you try w.activate(0) you get this warning: Wnck-WARNING: Received a timestamp of 0; window activation may not function properly Every forum thread that I have read about this warning ends with no answer. But they all seem to indicate that the code does not work properly unless you

A virtual display for ubuntu server

社会主义新天地 提交于 2019-12-22 08:02:00
问题 My question is: is there a way to set up a virtual display as default display on a linux server (so that all GUI application launched will be displayed on that display, if no counter indication is made)? I tried using this: xvfb-run java -jar autoclick.jar , which produces the following output : searching graphic devices is Headless:false screen N°1 width:1600 height:900 just 1 robot click: Magic button clicked ! and here's the autoclick code : System.out.println("searching graphic devices");

Qt5 install on OSX -qt-xcb

走远了吗. 提交于 2019-12-22 04:45:16
问题 I am stuck with a problem installing Qt5 on OSX. The Qt Requirements for Mac OSX are done - Xcode and command line are installed. Then I followed the steps: # mkdir qt5 # cd qt5 # git clone git://gitorious.org/qt/qtbase.git # cd qt5 # ./configure The test for linking against libxcb and support libraries failed! You might need to install dependency packages, or pass -qt-xcb. Then I also tried # cd qtbase # ./configure -prefix $HOME/development/macosx/qt5 -nomake docs -nomake examples -nomake

Cannot get XCreateSimpleWindow to open window at the right position

和自甴很熟 提交于 2019-12-21 18:00:32
问题 The following code opens a window of the right size, w,h, but not at the correct position, x,y. #include <iostream> #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xresource.h> using namespace std; int main(int argc, char* argv[]){ Display *display; // A connection to X server int screen_number; Window canvas_window; unsigned long white_pixel; unsigned long black_pixel; display = XOpenDisplay(NULL); // Connect X server by opening a display if(!display){ cerr<<"Unable to connect X

Desktop integrated application (desktop widget like)

喜欢而已 提交于 2019-12-21 17:16:49
问题 i'm currently playing with the idea writing a desktop-integrated application for my personal system, which should act similar like usual desktop widget engines (screenlets, gdesklets, google gadgets). It should give me a complete overview about different information about my system, from the internet and should finally visualize them on my desktop. It should centralized all my daily necessary information. The easiest way would be surely to write my own widgets for one of the known desktop

How to get Xvfb display number

喜欢而已 提交于 2019-12-21 11:33:10
问题 How can I get the display number that used while running Xvfb? For example somebody run ./Xvfb :14 I need somehow to get the used display number 14. Thanks in advance 回答1: on a unix system, run ps -ef|grep Xvfb and it should list it there with the process 回答2: There are two ways I can think of: Look for the lock files, which will typically take the form \tmp.X*-lock, where * is the display number; Look at the log files, typically \var\adm\xfvb.log, but might be anywhere. There should be a