xwindows

How to get the inside dimensions of a decorated window in XWindows?

If I create a full screen window where m_winw and m_winh is the full screen size, it seems to create a window for me where the outside dimension is the full screen and the inside is smaller based on the "decoration" (window border) size. Is there a way to query the window to get it's inside width and height? m_win=XCreateWindow(m_displa...

Self contained GTK application when there is no X windows environment.

I am using a very stripped down version of Linux, I want to create a self contained GTK application on a system that has no X window environment installed. I want to use GTK GUI classes and widgets and not create a server version where GUI is disabled. The only thing you can expect is a working glibc. From what I understand it would i...

will linux emit event when monitor connect with D-sub connector?

I want to write a software, when monitor connect with D-sub connector, this software will pop-up, and ask user to mirror monitor or extend monitor. but i doesn't find any event emit when d-sub connect. on Windows vista, if you connect a monitor, vista can pop-up a software to same thing. does anybody know how to detect d-sub connect ev...

Paste text to active window linux

I want to write application which paste some text to active window on some keystroke. How can i do this with Python or C++ ? Update: Sorry people. I think i don't describe problem clearly. I want to write app, which will work like a daemon and on some global keystroke paste some text to current active application (text editor, browser,...

Why does my simple GLX app leak memory?

The code below shows a small 48 byte leak in valgrind. #include <X11/Xlib.h> #include <GL/glx.h> #include <unistd.h> int main( int argc, char* argv[] ) { Display* _display; Window _windowHandle; XVisualInfo* _visual; GLXContext _context; Atom _deleteWindowMessage; Atom _pingWindowMessage; _display = XOpenDi...

How do I catch keyboard events in X11?

I'm writing an LCD controller, and one feature I want to add is the ability to catch keyboard strokes so that you can do stuff like instant messaging over the LCD. I found xsnoop.c but it's outdated. I'm using xorg-x11-server 1.6.4-0.1.fc11 on Fedora 11. I'm also using Qt. I didn't find anything in the docs that might help, but figured I...

BadAlloc and crash in wxWidgets program. How to find the error?

Hello, We have a fairly large cross-platform C++ program running on wxWidgets. Recently a big chunk of code was ported over from windows to linux, and since then the program crashes upon the display of a pop-up dialog. The error message printed to the console is: The program 'program name' received an X Window System error. This probab...

What file explorer can I use in Cygwin with UNIX like paths?

I'm fed up with using Windows Explorer as my file browser as I use Cygwin bash as my primary command line environment. Windows Explorer shows the full path in the address bar. Usually, I copy that, pasting it to the cygwin command prompt as in cygpath "" I then copy paste the output of cygpath so I can cd to it. I've also set up c...

Convert MFC Doc/View to?

My question will be hard to form, but to start: I have an MFC SDI app that I have worked on for an embarrassingly long time, that never seemed to fit the Doc/View architecture. I.e. there isn't anything useful in the Doc. It is multi-threaded and I need to do more with threading, etc. I dream about also porting it to Linux X Windows, b...

BadAlloc X Error

Hi Guys, Im having some problems with a GTK program im trying to build. When i compile it i keep getting this error: This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 195 error_code 11 request_code 53 minor_code 0) Ive traced it down to the following comman...

How to define a logout script for the Cygwin/X X Server

Is there a way to define a logout script for the Cygwin/X X Server? I'm looking for something like .bash_logout, but only run when the Cygwin/X X Server shuts down. I'm using .startxwinrc to start programs when the X server starts, but I haven't found something similar for when it shuts down. Any ideas? ...

Porting IRIS GL to Open GL?

Hi I'm really new to IRIX, IRIS GL, and Motif. I must compile more than 30 C codes written in 1997. Because these sources require header files such as XmAll.h, Xlib.h, and so on, I thought I just needed Unix and Open Motif to compile them. I installed FreeBSD as a guest OS on my Mac OSX, so almost all missing header files were found. (e...