Xref: utzoo comp.os.vms:27218 comp.windows.x:23656 Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!mips!pacbell.com!decwrl!bacchus.pa.dec.com!shlump.nac.dec.com!shodha.dec.com!gsrc.dec.com!west From: west@gsrc.dec.com (Jim West (Stealth Contractor)) Newsgroups: comp.os.vms,comp.windows.x Subject: Re: DECW$WINMGR Weirdness Message-ID: <1376@shodha.dec.com> Date: 27 Jun 90 13:38:08 GMT Sender: news@shodha.dec.com Followup-To: comp.os.vms Organization: Digital Equipment Corporation Lines: 100 In article <9518@odin.corp.sgi.com>, mikey@eukanuba.wpd.sgi.com (Mike Yang) writes... -The problem is that the DEC window manager places a full-screen, -pseudo-root window over the real root window. This pseudo-root window -has background set to ParentRelative, but it doesn't automatically -change when xsetroot changes the real root window's background. - -The solution is to use xrefresh after using xsetroot. - There is another solution. You could check for the existence of the DEC window manager psuedo-root and then use it in your programs. What follows is an Ada procedure that will 'look' for this window. function get_wm_root ( display : in x.display_type) return x.window_id_type is screen : x.screen_id_type; root : x.window_id_type; wm_root : x.window_id_type; rootatt : x.window_attributes_type; childatt : x.window_attributes_type; children_addr : address; children : child_array_type; num_children : integer; begin x.default_screen ( result => screen, display => display); x.root_window ( result => root, display => display, screen_number => screen); x.get_window_attributes ( status => status, display => display, window_id => root, window_attributes_return => rootatt); x.query_tree ( status => status, display => display, window_id => root, children_return => children_addr, num_children_return => num_children); if num_children > 0 then children := addr_to_array (a => children_addr); x.free (buff_ptr => children_addr); for i in 0 .. num_children - 1 loop x.get_window_attributes ( status => status, display => display, window_id => children(i), window_attributes_return => childatt); if rootatt.wdat_width = childatt.wdat_width and rootatt.wdat_height = childatt.wdat_height then x.query_tree ( status => status, display => display, window_id => children(i), children_return => children_addr, num_children_return => num_children); if num_children > 0 then -- It had better be !! children := addr_to_array (a => children_addr); x.free (buff_ptr => children_addr); return children(0); end if; end if; end loop; return zero; -- No window manager (DEC's) end if; end get_wm_root; ---------------------------------------------------------------------- Jim West | The Schainker Converse west@gsrc.dec.com | to Hoare's Law : | These are my opinions. | Inside every small problem Digital has no idea | is a larger problem struggling what I'm saying. | to get out. ----------------------------------------------------------------------