x11

Picture format for _NET_WM_ICON

眉间皱痕 提交于 2019-12-11 04:07:18
问题 Environment: Ubuntu 16.04 In my app, I get an application's icon by calling XGetWindowProperty with _NET_WM_ICON atom. unsigned char* data; XGetWindowProperty(..., &data); unsigned long* data1 = (unsigned long*) data; long width = *data1; long height = *(data1 + 1) unsigned char* imageData = (unsigned char*) (data1 + 2); Here are the specs for the returned data: https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm140130317554480 According to the specs, the returned image must

What pixel format does X server use?

*爱你&永不变心* 提交于 2019-12-11 02:39:39
问题 What pixel format (RGBA, ARBG, BGRA) does the X server use? If any specific format at all. Update: I'm specifically looking for information about the color component order and bit patterns. 回答1: You mean the framebuffer format? Or all the supported pixmap formats? Whichever it is, it depends on your graphics hardware, driver and configuration. To see all the formats supported on your X server (they're called "visuals" in X lingo), try the xdpyinfo utility. You will probably see lots of

After SDL_SetWindowSize resizes, drawing is done offset down the screen

无人久伴 提交于 2019-12-11 01:57:22
问题 I'm using Ubuntu 19.0.4 with SDL version 2.0.9+dfsg1-1ubuntu1. The code works fine with Visual Studio and MinGW's g++, and if I read others' comments right, other versions of Unix. But with Ubuntu, my version, it shows the rectangle drawn ~200 pixels down the screen (should be at 0, 0). There's a commented-out section that seems to fix it by delaying, but a) that's weird and b) I don't entirely trust it. Am I doing something wrong? Surely there's a fix that makes sense. #include <SDL.h>

Using imshow in opencv without running X

左心房为你撑大大i 提交于 2019-12-11 00:59:44
问题 I've got an application with a Raspberry Pi running Debian that is pretty performance demanding and I am trying to avoid starting X when booting and jumping directly into the program. This works fine, but if I would like to use the 'imshow' function in OpenCV, it does not work correctly, instead it says 'GTK-Warning: cannot open display" and exits the program. Is it feasible to display a fullscreen image/video capture with opencv using imshow or any other function without X, or is it entirely

How to open a non-decorated fullscreen window on Ubuntu

拟墨画扇 提交于 2019-12-11 00:54:45
问题 What is the trick to open a non-decorated fullscreen window on Ubuntu? I used to change the _NET_WM_STATE property to _NET_WM_STATE_FULLSCREEN to achieve this but while working fine on KDE it doesn't seem to work on Ubuntu (GNOME; tested with 12.04 LTS). The launcher on the left and the title bar are still there and appear above my non-decorated fullscreen window which is not what I want. When switching to fullscreen mode in Firefox, however, Firefox's fullscreen window covers the complete

matplotlib backend for remote plot display (alternative for gtk/x11) OS X El Capitan with homebrew

怎甘沉沦 提交于 2019-12-11 00:33:13
问题 Lost enough time on this one today to justify a post... I previously relied on GTKAgg matplotlib backend for remote display and interactive plotting from the ipython command line on a remote server. This approach is similar to the one described here: https://stackoverflow.com/a/3453527/1665400 This week I upgraded to El Capitan (10.10.5), and a fresh homebrew install. Everything is working correctly, but I recently learned that the homebrew project dropped x11 support for gtk, and is

Qt/X11: How to make a QWidget override-redirect / calling XChangeWindowAttributes() with QWidget

非 Y 不嫁゛ 提交于 2019-12-10 20:45:49
问题 Does anybody has an example how to make a QWidget instance (as toplevel window) override-redirect with the X11 library? the following code doesn't work: QWidget* widget = new QWidget(); XSetWindowAttributes attr; attr.override_redirect = true; XChangeWindowAttributes(display, widget->winId(), CWOverrideRedirect, &attr); widget->show(); Does anybody has an idea? The bigger toplevel-problem i try to solve is the following: QWidget / X11: Prevent window from beeing activated/focussed by mouse

Rails 3 - RMagick doesn't find libfreetype.6.dylib using Paperclip

孤街醉人 提交于 2019-12-10 20:44:42
问题 I'm trying to use Paperclip to upload some image. It's work fine but if I want add some style with : :styles => { :small => "100x100" } It does not work anymore, I have this error message : myImage is not recognized by the 'identify' command. So, I've found some tips on the web and I've installed ImageMagick with Brew then I've added gem 'Rmagick' to my GemFile. And now when I restart my server, I get this message error : /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rmagick-2.13.1/lib

How to change _NET_WM_NAME (X Library)

别来无恙 提交于 2019-12-10 19:49:52
问题 This question was migrated from Unix & Linux Stack Exchange because it can be answered on Stack Overflow. Migrated 5 years ago . I try use http://xkbind.sourceforge.net/ (useful for displaying keyboard state in window title) on my Mint Maya (based on Ubuntu 12.04) But xkbind change only WM_NAME property Here is xkbind.c code fragment if(XGetWindowAttributes(dpy, window, &wa)) { XSelectInput(dpy, window, wa.your_event_mask&~PropertyChangeMask); XSync(dpy, False); XSetWMName(dpy, window, p_tp);

XLib Lock Mouse position (Mouse wrap)

拜拜、爱过 提交于 2019-12-10 19:43:50
问题 I am trying to create a a mouse wrap within X11 for openGL games/content. The approach I was trying to take is to hide the cursor (which I can do just fine), lock the mouse position in the center of the window and then use the mouse delta positions to detect movement. I cannot find any way however to lock the mouse position other then to keep moving it back to the center every frame. In windows this can be done with ClipCursor() and in OSX mouse wrap can be done using