x11

xclip does not terminate when tracing it

那年仲夏 提交于 2019-12-01 05:19:16
I have made the following observations: $ xclip text.txt The execution terminates instantly, it copies the content of text.txt to the default selection XA_PRIMARY which means you can paste it through your middle mouse button or xclip -o . When I want to see what xclip is doing, it does not terminate anymore: $ xclip -verbose text.txt Connected to X server. Using UTF8_STRING. Reading text.txt... Waiting for selection requests, Control-C to quit Waiting for selection request number 1 It does not terminate until I select something in my X11 system, for instance this very output I have pasted here

xclip does not terminate when tracing it

我怕爱的太早我们不能终老 提交于 2019-12-01 02:44:15
问题 I have made the following observations: $ xclip text.txt The execution terminates instantly, it copies the content of text.txt to the default selection XA_PRIMARY which means you can paste it through your middle mouse button or xclip -o . When I want to see what xclip is doing, it does not terminate anymore: $ xclip -verbose text.txt Connected to X server. Using UTF8_STRING. Reading text.txt... Waiting for selection requests, Control-C to quit Waiting for selection request number 1 It does

Get a screenshot of a window that is cover or not visible or minimized with Xcomposite extension for X11

ぐ巨炮叔叔 提交于 2019-12-01 00:47:04
I have the follow starting code to get a screenshot of a X window (the window can be covered, not visibled, or minimized). #include <stdlib.h> #include <stdio.h> #include <X11/Xlib.h> #include <X11/X.h> #include <X11/extensions/Xcomposite.h> #include <X11/extensions/Xrender.h> int main () { Display *display = XOpenDisplay (NULL); XID xid = 90177543; // xdotool search --name "World of Warcraft" | head -1 // Check if Composite extension is enabled int event_base_return; int error_base_return; if (XCompositeQueryExtension (display, &event_base_return, &error_base_return)) printf ("COMPOSITE IS

Using X11 in OSX 10.8.3 : “ld: library not found for -lX11”

我只是一个虾纸丫 提交于 2019-11-30 21:17:05
I have the following makefile: PROG = draw CFLAGS = -w -s -O2 -ansi -DSHM XLIBS = -lX11 -lXext -lXmu -lXext -lXmu -lXt -lXi -lSM -lICE LIBS = -framework OpenGL INCLS = -I/usr/X11R/include -I/share/mesa/include LIBDIR = -L/usr/X11/lib -L/usr/X11R6/lib #source codes SRCS = draw_main.cpp $(PROG).cpp #substitute .cpp by .o to obtain object filenames OBJS = $(SRCS:.cpp=.o) #$< evaluates to the target's dependencies, #$@ evaluates to the target $(PROG): $(OBJS) g++ -o $@ $(OBJS) $(LIBDIR) $(LIBS) $(XLIBS) $(OBJS): g++ -c $*.cpp $(INCLS) clean: rm $(OBJS) Every time I try to run it, I get the

Open Browser window from Java program

拈花ヽ惹草 提交于 2019-11-30 21:16:54
Question I have an application written in Java. It is designed to run on a Linux box standalone. I am trying to spawn a new firefox window. However, firefox never opens. It always has a shell exit code of 1. I can run this same code with gnome-terminal and it opens fine. Background So, here is its initialization process: Start X "Xorg :1 -br -terminate -dpms -quiet vt7" Start Window Manager "metacity --display=:1 --replace" Configure resources "xrdb -merge /etc/X11/Xresources" Become a daemon and disconnect from controlling terminal Once the program is up an running, there is a button the user

How to make transparent window on linux

吃可爱长大的小学妹 提交于 2019-11-30 19:48:52
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? Jonathan Henson 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 glXChooseVisua l. Also, here is another S.O. question that may be helpful. Furthermore, this is for windows, but it should still apply.

Get a screenshot of a window that is cover or not visible or minimized with Xcomposite extension for X11

左心房为你撑大大i 提交于 2019-11-30 19:48:19
问题 I have the follow starting code to get a screenshot of a X window (the window can be covered, not visibled, or minimized). #include <stdlib.h> #include <stdio.h> #include <X11/Xlib.h> #include <X11/X.h> #include <X11/extensions/Xcomposite.h> #include <X11/extensions/Xrender.h> int main () { Display *display = XOpenDisplay (NULL); XID xid = 90177543; // xdotool search --name "World of Warcraft" | head -1 // Check if Composite extension is enabled int event_base_return; int error_base_return;

Xkb: How to convert a keycode to keysym

假装没事ソ 提交于 2019-11-30 19:22:23
I am simply trying to take a KeyCode and a modifier mask and convert it to a KeySym using the Xkb extension. I cant seem to figure out why this doesn't work. Its obvious that the modifiers dont match but I dont know why. I don't even know if I am converting the group correctly. #include <stdio.h> #include <stdlib.h> #include <X11/X.h> #include <X11/XKBlib.h> void check(XkbDescPtr keyboard_map, KeyCode keycode, unsigned int mask) { //What the hell is diff between XkbKeyGroupInfo and XkbKeyNumGroups? unsigned char info = XkbKeyGroupInfo(keyboard_map, keycode); int num_groups = XkbKeyNumGroups

How to copy to clipboard with X11?

偶尔善良 提交于 2019-11-30 19:21:59
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 == NULL) { CFRelease(clipboard); return -1; } CFDataRef data = CFDataCreateWithBytesNoCopy

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

亡梦爱人 提交于 2019-11-30 18:22:52
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. You need to handle Expose events. This tutorial explains with an example how to handle Expose events : #include <stdio.h> #include <stdlib.h> #include <X11/Xlib.h> #include