x11

Get UTF-8 input with X11 Display

ⅰ亾dé卋堺 提交于 2019-12-18 04:17:28
问题 I've been trying and reading lots of resources on the internet, trying to find a way to get an UTF-8 keyboard (composed) input from a X Display. But I could not make it work. I have tried the example code from this link (exaple 11-4), but no success. I also have written a simple example (below) to try to make it work. My simple test case is to print an "é", which happens by typing the acute and then the e. What is wrong? Thanks, Here is my example: #include <X11/Xlib.h> #include <X11/Xutil.h>

Python DBUS SESSION_BUS - X11 dependency

ε祈祈猫儿з 提交于 2019-12-17 19:37:24
问题 I've got running sample python code which is fine in Ubuntu desktop: import dbus, gobject from dbus.mainloop.glib import DBusGMainLoop from dbus.mainloop.glib import threads_init import subprocess from subprocess import call gobject.threads_init() threads_init() dbus.mainloop.glib.DBusGMainLoop( set_as_default = True ) p = subprocess.Popen('dbus-launch --sh-syntax', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) call( "export DBUS_SESSION_BUS_ADDRESS" , shell=True ) call(

R: building a simple command line plotting tool/Capturing window close events

非 Y 不嫁゛ 提交于 2019-12-17 19:28:14
问题 I am trying to use R within a script that will act as a simple command line plot tool. I.e. user pipes in a csv file and they get a plot. I can get to R fine and get the plot to display through various temp file machinations, but I have hit a roadblock. I cannot figure out how to get R to keep running until the users closes the window. If I plot and exit, the plot disappears immediately. If I plot and use some kind of infinite loop, the user cannot close the plot; he must exit by using an

Preventing window overlap in GTK

自作多情 提交于 2019-12-17 19:04:18
问题 I've got a Python/Linux application that displays bits of info I need in a GTK window. For the purposes of this discussion, it should behave exactly like a dock - exists on all virtual desktops, and maximized windows do not overlap it. The first point is pretty easy, but I have spent days bashing my head against my monitor trying to get the second point - preventing overlap. My app should not be covered if another window is maximized. Setting "always on top" is not enough, as the other

How to determine a terminal's background color?

浪尽此生 提交于 2019-12-17 18:28:12
问题 I'd like to know if there is any way to determine a terminal's background color ? In my case, using gnome-terminal. It might matter, since it's entirety up to the terminal application to draw the background of its windows, which may even be something else than a plain color. 回答1: I've came up with the following: #!/bin/sh # # Query a property from the terminal, e.g. background color. # # XTerm Operating System Commands # "ESC ] Ps;Pt ST" oldstty=$(stty -g) # What to query? # 11: text

How to get another application window's title, position and size in Mac OS without Accessibility API?

血红的双手。 提交于 2019-12-17 17:59:18
问题 How can I get window's title, position and size if it does not support Accessibility API? Accessibility Inspector does not see it at all. Say, it's a xterm window in X11.app (X11->Applications->Terminal). 回答1: You should be able to get all of this window information through the methods exposed in the CGWindow.h header file. Apple's docs are online on the Quartz Window Services Reference page. They also have a very informative sample app called Son of Grab which should get you started. 回答2:

How to know which window has focus and how to change it?

女生的网名这么多〃 提交于 2019-12-17 16:13:44
问题 I would like to know how can I ask X11 which windows has focus. And if for any reason my own application (that may be visible or not) got the focus I want be able to let the former windows to get focus again. For instance, my application is running with many others (e.g. firefox, gvim, nautilus,...) Suppose that at first firefox has focus and that the user clicked on my app which now has the focus. I want that my application put focus on firefox again. Does anyone knows how to achieve this?

How to identify top-level X11 windows using xlib?

半城伤御伤魂 提交于 2019-12-17 15:36:43
问题 I'm trying to get a list of all top level desktop windows in an X11 session. Basically, I want to get a list of all windows that are shown in the window managers application-switching UI (commonly opened when the user presses ALT+TAB). I've never done any X11 programming before, but so far I've managed to enumerate through the entire window list, with code that looks something like this: void CSoftwareInfoLinux::enumerateWindows(Display *display, Window rootWindow) { Window parent; Window

Can't load X11 in R after OS X Yosemite upgrade

南楼画角 提交于 2019-12-17 15:34:29
问题 Running into the following error when I try to use ggplot2 and plot within the console after upgrading to Yosemite: Error in (function (display = "", width, height, pointsize, gamma, bg, : X11 module cannot be loaded In addition: Warning message: In (function (display = "", width, height, pointsize, gamma, bg, : unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so': dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded:

Mountain Lion rvm install 1.8.7 x11 error

血红的双手。 提交于 2019-12-17 10:08:47
问题 After update to Mountain Lion, I tried install 1.8.7, and I got error. X11 file not found, I installed Xquarkz, but nothing changed. Whats wrong? Fail to find [tclConfig.sh, tkConfig.sh] Use MacOS X Frameworks. Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk. clang -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_RB_SAFE_LEVEL -DHAVE_RB_HASH_LOOKUP -DHAVE_RB_PROC_NEW -DHAVE_RB_OBJ_TAINT -DHAVE_ST_PTR -DHAVE_ST_LEN -DRUBY_VERSION=\"1.8.7\" -DRUBY_RELEASE_DATE=\"2012-06-29\"