xorg

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

Installing and Configuring xvfb

大兔子大兔子 提交于 2019-12-22 02:22:29
问题 I'm trying to find a Ubuntu operating system, version of xorg, and version of xvfb that are compatible. Can anyone help me with directions to install xvfb without getting a hang on Initializing build-in extension GLX So far I've tried the following Ubuntu 13 Server(No graphics card) sudo apt-get install xorg sudo apt-get install xvfb sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic I run the command xvfb :10 and it hangs on Initializing build-in extension GLX

Installing and Configuring xvfb

▼魔方 西西 提交于 2019-12-22 02:21:14
问题 I'm trying to find a Ubuntu operating system, version of xorg, and version of xvfb that are compatible. Can anyone help me with directions to install xvfb without getting a hang on Initializing build-in extension GLX So far I've tried the following Ubuntu 13 Server(No graphics card) sudo apt-get install xorg sudo apt-get install xvfb sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic I run the command xvfb :10 and it hangs on Initializing build-in extension GLX

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

Obtaining List of all Xorg Displays

烂漫一生 提交于 2019-12-18 13:01:31
问题 I would like to know how I can obtain a list of all Xorg displays on my system, along with a list of screens associated with each display. I spent some time looking through the Xlib documentation, but was not able to find a function that does what I want. Please assume that I have no other dependencies other than a POSIX-complaint OS and X (e.g., no GTK). If what I ask is not possible assuming these minimal dependencies, then a solution using other libraries is fine. Thank you very much for

Mechanism of clipboard of xwindow

做~自己de王妃 提交于 2019-12-18 06:53:54
问题 Can anybody explain the mechanism of clipboard of xwindow to me? For example, if I make a operation of open a file from gedit and copy the content of this file using ctrl+c. And then I open vim and use ctrl+v to paste the content into the new opened file. I know that it will use the buffer of xwindow to store the content. But I am curious how it works in the system level. More specifically, how the underlying linux kernel needs to do to handle this copy-paste operation? Is there any system

Mechanism of clipboard of xwindow

寵の児 提交于 2019-12-18 06:52:54
问题 Can anybody explain the mechanism of clipboard of xwindow to me? For example, if I make a operation of open a file from gedit and copy the content of this file using ctrl+c. And then I open vim and use ctrl+v to paste the content into the new opened file. I know that it will use the buffer of xwindow to store the content. But I am curious how it works in the system level. More specifically, how the underlying linux kernel needs to do to handle this copy-paste operation? Is there any system

Saving xlib XImage to PNG

大兔子大兔子 提交于 2019-12-14 01:04:42
问题 I am using xlib. I have an XImage structure filled with information from an XGetImage() call. Is there a popular method to get from XImage to something more meaningful.. namely PNG? I have looked at libpng, but have heard from pretty much everyone that it's a beast to tame. Would this still be the recommended path to take? 回答1: See also How to save XImage as bitmap? though that person had the constraint that they couldn't use a library. If you can use a library, Cairo is a good one that will

Get X/Y position of caret (input text cursor) under Xorg?

淺唱寂寞╮ 提交于 2019-12-13 12:26:32
问题 I'd like to display a popover right above where the user is typing, in any Linux app (GTK, Qt, Electron, etc.), running on X. I figured out creating the popover, now I'm trying to figure out how to get the coordinates of the input text cursor (what blinks while you type, not sure if it's called "caret"?) relative to the screen. I know I can get info on where the mouse with xdotool : xdotool getmouselocation I would need the same thing but for the text cursor, in the currently focused window.