daves@fs1.ee.ubc.ca (Dave Small) (02/09/90)
I used "xloadimage" under X11R3, and was able to scroll around an image larger than the display by using the first mouse button. I've just recompiled everything for X11R4, and now, though it will still display the image, it doesn't allow scrolling around a large image. Any ideas about what may be wrong? I'm running on a SPARCstation 1, SunOS 4.0.3, xloadimage patch level 03. PS: Does anyone have a version of "xloadimage" that works with 24 bitplanes? -- Dave Small; EE Dept, UBC; 2356 Main Mall; Vancouver, BC; V6T 1W5 Canada daves@ee.ubc.ca uunet!ubc-cs!ee.ubc.ca!daves
madd@world.std.com (jim frost) (02/22/90)
daves@fs1.ee.ubc.ca (Dave Small) writes: >I used "xloadimage" under X11R3, and was able to scroll around an image >larger than the display by using the first mouse button. >I've just recompiled everything for X11R4, and now, though it will still >display the image, it doesn't allow scrolling around a large image. >Any ideas about what may be wrong? Sure do. The distributed version of twm appears to ignore PSize requests, opting for max_width and max_height instead. This is kind of annoying with very large images, especially since xloadimage tries to limit itself to 90% or so of the display. Resizing the image will re-enable scrolling, or switching to a different window manager (awm works fine, or used to work when I used it). >PS: Does anyone have a version of "xloadimage" that works with 24 bitplanes? Not that I know of, although the -view option should work if the server has a PseudoColor or StaticColor visual. Never tested. jim frost saber software jimf@saber.com
mhorstm@swbatl.UUCP (3417) (02/22/90)
>>I've just recompiled everything for X11R4, and now, though it will still >>display the image, it doesn't allow scrolling around a large image. >> >>Any ideas about what may be wrong? > >Sure do. The distributed version of twm appears to ignore PSize >requests, opting for max_width and max_height instead. I am also having trouble with twm and xloadimage. It seems that twm refuses to load the colormap sometimes. But if I restart twm, the image will be displayed fine, with the correct colormap! This problem does not occur under uwm, gwm, or olwm. Unfortunately I'm not yet comfortable with my Xpertise so I haven't tried delving into the twm code yet. ENV: SS1, SunOS 4.0.3c X11R4, fix-2, -DXAW_BC /------------------------------------------------------------------------------\ Mark Horstman PHONE: (314) 235-3417 Information Systems - Southwestern Bell Telephone
salem@mandala.think.com (Jim Salem) (03/01/90)
In article <1192@swbatl.UUCP> mhorstm@swbatl.UUCP (3417) writes: >I am also having trouble with twm and xloadimage. It seems that twm refuses >to load the colormap sometimes. But if I restart twm, the image will be >displayed fine, with the correct colormap! Yes. This is due to an obscure bug in twm, I fixed and reported to x-bugs last week. Here is the bug report : X Window System Bug Report xbugs@expo.lcs.mit.edu VERSION: R4 CLIENT MACHINE and OPERATING SYSTEM: Sun 4/110 running SunOS 4.0.3 DISPLAY TYPE: any WINDOW MANAGER: twm AREA: twm SYNOPSIS: Pull right menus break colormap installation. DESCRIPTION: Once a "pull right" menu is displayed by twm, twm no longer installs the color maps of windows underneath the cursor. This is a serious problem. This happens because the pull-right code in UpdateMenu calls PopUpMenu which in turn calls InstallRootColormap. However, at the conclusion of the menu code UninstallRootColormap is called only once no matter how many times InstallRootColormap has been called. Thus, the InstallWindowColormaps code never installs the color map because Scr->cmapInfo.root_pushes is always positive. REPEAT BY: 1) Run twm as the window manager. 2) Map a window that has its own colormap. I used the xxim program to do this (contrib/clients/xim) as well as one of our own. 3) Select a pull-right TWM menu. The default TWM doesn't have one but this is easily created E.G. button = :root : f.menu "test" menu "test" { "Submenu" f.menu "test2"} menu "test2" {"You have now lost" f.beep} 4) Note that the colormaps are no longer being installed. There is no way for the user to fix this outside of restarting twm. SAMPLE FIX: salem@mandala% diff -cb menus.c.orig menus.c *** menus.c.orig Fri Feb 16 06:46:32 1990 --- menus.c Fri Feb 16 07:00:30 1990 *************** *** 548,553 **** --- 548,561 ---- PopUpMenu (ActiveItem->sub, (savex + (ActiveMenu->width >> 1)), (savey + ActiveItem->item_num * Scr->EntryHeight + (Scr->EntryHeight >> 1)), False); + /* PATCH: salem@think.com 2/16/90 + We have to make sure that the color map installs are + properly nested, which they weren't. Since PopUpMenu + calls InstallRootColormap every time but + UninstallRootColormap is called only once at the end, we + insert a UninstallRootColormap here to keep the nesting + the same. This was broken, now it's a kludge. */ + UninstallRootColormap(); } else if (!badItem) { XBell (dpy, 0); badItem = ActiveItem; ------------------------------------------------------------------------------ -- jim (salem@think.com) -- -- Jim Salem Thinking Machines Corporation, Cambridge, MA 617-876-1111 salem@think.com mit-eddie!think!salem, rutgers!think!salem, harvard!think!salem