Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
Help! I have spent all the afternoon trying to correct a simple xlib program written by a customer without any effect!!!! VMS 5.1 - DECwindows 1.0 1. the program create a window(w1) and a subwindow(subw1). 2. Set the WIN_GRAVITY of subw1 to CenterGravity (or any value different from default!!) 3. Ask for Expose event on w1 & subw1 4. Read input queue 4a. FOR ANY EVENT.TYPE - Clear w1 & subw1 - Draw a string on w1 - Loop to 4. If she don't ask for win gravity, the program works fine. If she ask any type of win gravity, due to resize of w1 garbage is drawn in w1 (also no one expose event is sent). QUESTIONS: The garbage appears as the server has lost w1 contents, but no event is generated. If i ask for win gravity, i must also able to manage the subwindows motion??????? Perhaps can be already known bug? If you want i can provide the small program to reproduce this strange behaviour THANKS!! Giancarlo
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2483.1 | The code.... | MLNEDU::FERRARA | Giancarlo - Customer Trng ITALY | Wed Mar 21 1990 11:56 | 74 |
Here is a piece of code that reproduce this "strange behaviour". Compile it (pay attention to default search list for include) & link with xlib. I have tested it also on a GPX VMS5.2 and the behaviour is the same! Try to resize the window! ----- Gravity.c ------------------------------------- #include <stdio.h> #include <Xlib.h> #define screenNumber DefaultScreen(display) #define rootWindow RootWindow(display,screenNumber) #define blackPixel BlackPixel(display,screenNumber) #define whitePixel WhitePixel(display,screenNumber) #define defaultGC DefaultGC(display,screenNumber) #define depth DefaultDepth(display,screenNumber) main(argc, argv) unsigned int argc; char *argv[]; { Display *display; Window window; Window window1; unsigned long attribute_mask; XSetWindowAttributes window_attributes; if (!(display = XOpenDisplay(NULL))) { fprintf(stderr, "Can't open display\n"); exit(0); } /* Define window attributes and create the window */ window_attributes.background_pixel = whitePixel; window_attributes.event_mask = ExposureMask | StructureNotifyMask | SubstructureNotifyMask; attribute_mask = CWBackPixel | CWEventMask; window = XCreateWindow(display, rootWindow, 100, 100, 300,300, 1, depth, CopyFromParent, CopyFromParent, attribute_mask, &window_attributes); /* Define window attributes and create the window1 */ window_attributes.background_pixel = whitePixel; window_attributes.win_gravity = CenterGravity; window_attributes.event_mask = ExposureMask; attribute_mask = CWBackPixel | CWEventMask | CWWinGravity; window1 = XCreateWindow(display, window, 30,30, 50, 50, 5, depth, CopyFromParent, CopyFromParent, attribute_mask, &window_attributes); XMapWindow(display, window); XMapWindow(display, window1); while (1) { XEvent event; XNextEvent(display, &event); XClearWindow(display,window); XDrawString(display, window, defaultGC, 10,10, "XXX",3); XClearWindow(display,window1); } } | |||||
2483.2 | Suggestion: Upgrade | DECWIN::JMSYNGE | James M Synge, VMS Development | Wed Mar 21 1990 16:15 | 23 |
From: DECWIN::ADAMS 21-MAR-1990 16:03:30.20 Basically gravity has been broken from day one. MIT claims to have it correct in RL4. As far as VMS DECwindows the status is as follows and has been described in the release notes for V5.3 to present. V5.1 (V1) - unknown - I did not own the code and have had QARs for it. I assume it does not work. My suggestion is to move on to a later version. V5.3 (V2) - FORGET bit gravity with all window gravities except UNMAP and STATIC works. Still may be corruption problems with bit gravity other than FORGET. (The bit gravities other than FORGET are using unaltered MIT RL3 code.) V5.4 Same as V2 Expect that all window gravities work with FORGET bit gravity. Next Major Release - All gravities are expected to be fixed. Bill | |||||
2483.3 | Thanks a lot! | MLNEDU::FERRARA | Giancarlo - Customer Trng ITALY | Thu Mar 22 1990 11:24 | 1 |
Thanks! |