x11

Xlib and Firefox behavior

╄→гoц情女王★ 提交于 2019-11-30 05:33:48
I'm trying to create a small window manager (just for fun), but I'm having problems in handling windows created by Firefox (only with that application, other apps works fine) The problem is, after I launch Firefox, and add my decoration, it seems to work fine, but if for example I try to click on the menu button, the (sub)window doesn't appear. What seems to happen is that after the click, a ClientMessage event is fired with the following values: Data: (null) Data: _NET_WM_STATE_HIDDEN Data: (null) Data: (null) Data: (null) Now the problem is that I don't know how to show the window, which

How to make transparent window on linux

北城余情 提交于 2019-11-30 03:57:05
问题 I want to make application an application with a splash screen on Linux. I want to use X11 and glx (OpenGL application). I've found a way to remove the border around the window, but I can't find how to make it transparent. How can I accomplish this? 回答1: This is definitely something that you will want to offload to the GPU. I would not recommend directly using the X11 lib for performance reasons. Let OpenGL do it. I did find the following link for glXChooseVisual. Also, here is another S.O.

How to copy to clipboard with X11?

久未见 提交于 2019-11-30 03:53:23
问题 Using the frameworks on OS X, I can use the following to copy a PNG to the pasteboard (in C — obviously I could use NSPasteboard with Cocoa): #include <ApplicationServices/ApplicationServices.h> int copyThatThing(void) { PasteboardRef clipboard; if (PasteboardCreate(kPasteboardClipboard, &clipboard) != noErr) { return -1; } if (PasteboardClear(clipboard) != noErr) { CFRelease(clipboard); return -1; } size_t len; char *pngbuf = createMyPNGBuffer(&len); /* Defined somewhere else */ if (pngbuf =

Equivalent of “Invalidate Rect” / “WM_PAINT” in X11

China☆狼群 提交于 2019-11-30 02:40:45
问题 I'm Porting some code from Windows to XLib. In the windows code, I can force a redraw by calling InvalidateRect and then handling the corresponding WM_PAINT message. However, I am having trouble finding out how to do this in X11/XLib. I see there is an Expose message but not sure if that is the same thing. If it matters, I need to do this to force the window to render at a certain frame rate for an OpenGL based program. 回答1: You need to handle Expose events. This tutorial explains with an

How to check if X server is running?

五迷三道 提交于 2019-11-29 22:04:23
Is there any way to find out if the current session user is running an Xserver (under Linux) ? I'v started off with things like: ps -e | grep X but this doesn't work always and one more thing I tried is checking the $DISPLAY variable Are there any other ways to check this? EDIT: Some people suggested using the $DISPLAY variables but what if the user fiddles with this variable ? what if he tries to do something and changes this variable and then when I check it, it no longer reflects an accurate state of the system. Is there no specific way to do this that will always return a correct answer ?

loading ggplot2 (colorspace, actually) opens up x11

坚强是说给别人听的谎言 提交于 2019-11-29 21:45:18
问题 Whenever I so much as load ggplot2 , X11 jumps into action (hogging resources). library(ggplot2) Is what I do, and boom – X11 The thing is, I don't want to use X11, nor do I want it to be open – I want to use Quartz and the build-in graphics in RStudio. Whenever I close X11, so goes my R session. My setup: OS X Yosemite 10.10.2 R 3.1.2 Platform: x86_64-apple-darwin13.4.0 (64-bit) ggplot 1.0.0 XQuartz 2.7.7 (xorg-server 1.15.2) OS X also recently (yesterday?) updated the Command Line Tools to

Disable/suppress tcltk popup for CRAN mirror selection in R

佐手、 提交于 2019-11-29 21:25:03
My question is similar to a question previously posted but never really answered here: Disable GUI, graphics devices in R I do not like the R tcltk popups for CRAN mirror selection. They also pop up to choose a package when searching for help on a function in two packages. Is there any way to disable these windows without disabling X11 completely? I still want plot() commands to work as normal, but disable the little select menus that take forever to load over a remote connection. For example, if you use ssh, but don't use -X, then the mirror select is just text within R, you type a number. It

X11 Mouse Movement Event

大兔子大兔子 提交于 2019-11-29 21:15:26
问题 When creating a Window in XLib What are the masks I provide to the SetWindowAttributes.event_mask member? What do I have to pass to the 11th paramater of XCreateWindow() What are the Events I am looking for in the main message loop (Where I use XNextEvent(lDisplay, &xEvent); ? Since X behaves differently than Microsoft's Win32 API, how do I determine if the mouse is over my window or a window in my "Application" and not over the desktop? I have looked for a similar post. If there is already

Creating a window manager for Linux

南笙酒味 提交于 2019-11-29 20:42:52
I want to create a simple stacking window manager (in C ) for private use, mainly for the purpose of learning and challenging myself. I've looked through twm 's source code which has relatively few bells and whistles but it seems very low level since it's not based on a widget toolkit. 1 Would using a toolkit such as GTK+ be preferable? I'm afraid that some of the code and libraries in twm might be too antiquated ( edit: deprecated) and I want the window manager to use relatively modern libraries. For the sake of understanding I would also be interested in suggestions how to start a window

Embed an app into a window

怎甘沉沦 提交于 2019-11-29 20:13:28
问题 FvwmButtons (a module of fvwm window manager) has the Swallow function, that embeds the window of an application into a panel. I have to do something like this with Motif and Xlib. I want to embed an Xclock into my application. I guess I have to change the Window ID of the embedded app. How can I do that? 回答1: the only supported and reliable mechanism is XEmbed, but it requires the embedded app to cooperate. Without a cooperating app, you're in a world of scary hacks. The basic thing you need