srk@actnyc.UUCP (Shalom Krischer) (04/07/89)
I need help! A few of us are working on a project, using X11 as the screen interface, and have come accross the following problem: we call XCreateWindow, XSetNormalHints, XReadBitMapFile, XCreateGC, XCreatePixmap, XCopyPlane, XSetWindowBackgroundPixmap, XFreeGC, XFreePixmap, XMapWindow, XMoveWindow. At this point I would expect to see the window. It does not happen, however, until I click the mouse. When I do so, it pops up anywhere, and then gets moved to where I want it. The extra move I can deal with, but why do I need the click? I am reluctant to call this a bug in X, since it seems that others would have gotten it before. What are we doing wrong? Please respond to ...!uunet!actnyc!srk or rigoutso@acf8.nyu.edu or rigoutso%acf8@CUNYVM.CUNY.EDU Thanks Muchly!!!
converse@EXPO.LCS.MIT.EDU (Donna Converse) (04/07/89)
>At this point I would expect to see the window. It does not happen, >however, until I click the mouse. When I do so, it pops up anywhere, >and then gets moved to where I want it. The extra move I can deal with, >but why do I need the click? Ah, do you know about window managers? The click is happening because the window manager is allowing the user to place the window, using the pointer cursor. This happens as a result of your call to XMapWindow. When you call XSetNormalHints, you can specify to the window manager the programmer's idea of where the window should be. Your call to XMoveWindow is unnecessary, and it also causes the `extra move' that you mention, and it is a very blunt method of placing a window on the screen. It does not follow conventions for bringing up windows, and does not allow the user to indicate preference.