Re: Fatal IO Error: 11 (resource temporarily unavailable)

2013-05-20 Thread First Last
I still don't know why the hello world code does not working as I expect. But 
I write a piece of code who works as expected. I'm not sure that's well 
written, (if someone want to take a look). Mouse pointer is rendered, when a 
button is pressed or when a key is release the while loop is stoped.


#includeX11/Xlib.h
#includeX11/cursorfont.h
#includestdio.h
#includestdlib.h
#includestring.h

#define DPYW DisplayWidth(dpy,scr)
#define DPYH DisplayHeight(dpy,scr)


int main(int argc, char *argv[]){
    Display *dpy;
    int scr, stop=0;
   
 Window rootwin;
    Window wbg;
    XEvent e;
    Cursor theCursor;

    dpy = XOpenDisplay(NULL);

    scr=DefaultScreen(dpy);
    rootwin=RootWindow(dpy, scr);
    wbg=XCreateSimpleWindow(dpy,rootwin,0,0,
    DPYW,DPYH,0,
    BlackPixel(dpy,
 scr),
    BlackPixel(dpy, scr) );


    XStoreName(dpy, wbg, background);
    XSelectInput(dpy, wbg, 
ExposureMask|KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask);
    XMapWindow(dpy, wbg);


    theCursor = XCreateFontCursor(dpy, XC_left_ptr);

    XDefineCursor(dpy,wbg,theCursor);

    while(stop==0) {
    XNextEvent(dpy, e);
    if(e.type==Expose
  e.xexpose.count1) {
        XFlush(dpy);
    }

        switch(e.type){
            case KeyRelease     : stop=1;break;
            case ButtonPress     : stop=1;break;
        }        

    }

    XFreeCursor(dpy,theCursor);
    XCloseDisplay(dpy);

    return 0;
}___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Fatal IO Error: 11 (resource temporarily unavailable)

2013-05-19 Thread First Last
Hi,


I got this error when I try to run all example I have of xlib :

Fatal IO Error: 11 (resource temporarily unavailable)

I tried some examples form the book X WINDOW APPLICATION PROGRAMMING from 
ERIC F. JOHNSON  KEVIN REICHARD some from the web, like these one 
:http://www.everything2.com/index.pl?node_id=39055

I guess in all these examples I should see the mouse pointer, particulary in 
the last example of the link I pasted before, I don't see my mouse, clicking 
doesn't works etc. I guess it's linked with my IO error.

I have to kill X from another console, I search how to fix for days now but I 
didn't found it

Don't know if it can help, (it doesn't help me), I add the Xorg.1.logas 
attachment file.


I know, I don't give many informations, simply because I don't know right now 
how to get more interesting informations.

nicoo[  5418.123] 
X.Org X Server 1.14.1
Release Date: 2013-04-17
[  5418.134] X Protocol Version 11, Revision 0
[  5418.137] Build Operating System: Linux 3.8.7-1-ARCH x86_64 
[  5418.141] Current Operating System: Linux band 3.8.11-1-ARCH #1 SMP PREEMPT Wed May 1 20:18:57 CEST 2013 x86_64
[  5418.141] Kernel command line: root=/dev/sda3 ro initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux 
[  5418.148] Build Date: 17 April 2013  02:37:06PM
[  5418.151]  
[  5418.155] Current version of pixman: 0.30.0
[  5418.162] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  5418.162] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  5418.177] (==) Log file: /var/log/Xorg.1.log, Time: Sun May 19 11:14:58 2013
[  5418.181] (==) Using config directory: /etc/X11/xorg.conf.d
[  5418.185] (==) Using system config directory /usr/share/X11/xorg.conf.d
[  5418.185] (==) No Layout section.  Using the first Screen section.
[  5418.185] (==) No screen section available. Using defaults.
[  5418.185] (**) |--Screen Default Screen Section (0)
[  5418.185] (**) |   |--Monitor default monitor
[  5418.186] (==) No monitor specified for screen Default Screen Section.
	Using a default monitor configuration.
[  5418.186] (==) Automatically adding devices
[  5418.186] (==) Automatically enabling devices
[  5418.186] (==) Automatically adding GPU devices
[  5418.186] (WW) `fonts.dir' not found (or not valid) in /usr/share/fonts/100dpi/.
[  5418.186] 	Entry deleted from font path.
[  5418.186] 	(Run 'mkfontdir' on /usr/share/fonts/100dpi/).
[  5418.186] (WW) `fonts.dir' not found (or not valid) in /usr/share/fonts/75dpi/.
[  5418.186] 	Entry deleted from font path.
[  5418.186] 	(Run 'mkfontdir' on /usr/share/fonts/75dpi/).
[  5418.186] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/OTF/,
	/usr/share/fonts/Type1/
[  5418.186] (==) ModulePath set to /usr/lib/xorg/modules
[  5418.186] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  5418.186] (II) Loader magic: 0x7fcc20
[  5418.186] (II) Module ABI versions:
[  5418.186] 	X.Org ANSI C Emulation: 0.4
[  5418.186] 	X.Org Video Driver: 14.1
[  5418.186] 	X.Org XInput driver : 19.1
[  5418.186] 	X.Org Server Extension : 7.0
[  5418.187] (II) config/udev: Adding drm device (/dev/dri/card0)
[  5418.190] (--) PCI:*(0:1:5:0) 1002:5955:1631:c00e rev 0, Mem @ 0x9000/268435456, 0xc000/65536, I/O @ 0xc000/256, BIOS @ 0x/131072
[  5418.194] Initializing built-in extension Generic Event Extension
[  5418.198] Initializing built-in extension SHAPE
[  5418.203] Initializing built-in extension MIT-SHM
[  5418.207] Initializing built-in extension XInputExtension
[  5418.211] Initializing built-in extension XTEST
[  5418.215] Initializing built-in extension BIG-REQUESTS
[  5418.219] Initializing built-in extension SYNC
[  5418.231] Initializing built-in extension XKEYBOARD
[  5418.233] Initializing built-in extension XC-MISC
[  5418.236] Initializing built-in extension SECURITY
[  5418.239] Initializing built-in extension XINERAMA
[  5418.242] Initializing built-in extension XFIXES
[  5418.244] Initializing built-in extension RENDER
[  5418.247] Initializing built-in extension RANDR
[  5418.250] Initializing built-in extension COMPOSITE
[  5418.253] Initializing built-in extension DAMAGE
[  5418.255] Initializing built-in extension MIT-SCREEN-SAVER
[  5418.258] Initializing built-in extension DOUBLE-BUFFER
[  5418.261] Initializing built-in extension RECORD
[  5418.264] Initializing built-in extension DPMS
[  5418.266] Initializing built-in extension X-Resource
[  5418.269] Initializing built-in extension XVideo
[  5418.272] Initializing built-in extension XVideo-MotionCompensation
[  5418.274] Initializing built-in extension XFree86-VidModeExtension
[  5418.276] Initializing built-in extension XFree86-DGA
[  5418.279

Re: Fatal IO Error: 11 (resource temporarily unavailable)

2013-05-19 Thread walter harms

hi,
I have tried the first example an it works fine for me.
(you may like to add \n for the printf() to get more readable output).

re,
 wh


Am 19.05.2013 17:35, schrieb First Last:
 Hi,
 
 
 I got this error when I try to run all example I have of xlib :
 
 Fatal IO Error: 11 (resource temporarily unavailable)
 
 I tried some examples form the book X WINDOW APPLICATION PROGRAMMING from 
 ERIC F. JOHNSON  KEVIN REICHARD some from the web, like these one 
 :http://www.everything2.com/index.pl?node_id=39055
 
 I guess in all these examples I should see the mouse pointer, particulary in 
 the last example of the link I pasted before, I don't see my mouse, clicking 
 doesn't works etc. I guess it's linked with my IO error.
 
 I have to kill X from another console, I search how to fix for days now but I 
 didn't found it
 
 Don't know if it can help, (it doesn't help me), I add the Xorg.1.logas 
 attachment file.
 
 
 I know, I don't give many informations, simply because I don't know right now 
 how to get more interesting informations.
 
 nicoo
 
 
 
 ___
 xorg@lists.x.org: X.Org support
 Archives: http://lists.freedesktop.org/archives/xorg
 Info: http://lists.x.org/mailman/listinfo/xorg
 Your subscription address: wha...@bfs.de
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: Fatal IO Error: 11 (resource temporarily unavailable)

2013-05-19 Thread Alan Coopersmith

On 05/19/13 08:35 AM, First Last wrote:

I got this error when I try to run all example I have of xlib :

Fatal IO Error: 11 (resource temporarily unavailable)


If you got that after killed Xorg, then that's a common client response.


I guess in all these examples I should see the mouse pointer, particulary in the
last example of the link I pasted before, I don't see my mouse, clicking doesn't
works etc. I guess it's linked with my IO error.


Unless you start Xorg with the -retro flag it won't draw a cursor until a client
(usually the window manager or desktop environment) sets the cursor image.  This
is one of many changes in the years since people last wrote books on Xlib. (They
don't anymore since the advice is much shorter now: Don't use Xlib directly,
use a toolkit.)

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Fatal IO error 11 (Resource temporarily unavailable) on X server :0

2012-07-24 Thread Giuseppe Penone
Hi,
on a gtkmm 3 app I'm working on it happened once to have a crash and read
the message:

Gdk-WARNING **: centro: Fatal IO error 11 (Resource temporarily
unavailable) on X server :0.

Could this be a problem in my application or is for sure a bug in xorg?
Regards,
Giuseppe.
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com