Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!daemon From: daemon@rutgers.UUCP Newsgroups: comp.sys.amiga Subject: Window movement between screens Message-ID: <1273@rutgers.RUTGERS.EDU> Date: Wed, 25-Mar-87 07:15:18 EST Article-I.D.: rutgers.1273 Posted: Wed Mar 25 07:15:18 1987 Date-Received: Fri, 27-Mar-87 00:49:24 EST Sender: daemon@rutgers.RUTGERS.EDU Lines: 45 From: Richard Conner Hey all you screen/window experts out there: Here's a puzzle for you- I want to move a window from one screen to another. So I unlink the window from the source screen's linked list starting off SourceScreen->FirstWindow. I then proceed to link it into the destination screen's linked list of windows. I also point the window's back pointer to its Screen at the destination screen. All this sorounded by Forbid()/Permit(). Unfortunately the window doesn't move to the destination screen (Although parts of it does...really strange...). It appears as though I'm not re-arranging enough information somewhere, but I sure can't think or see what I'm missing. Code looks something like the following: Setup: p_prevFromWindow <---- pointer: Previous Window in from Screen p_fromWindow <---- pointer: Window in from Screen p_fromScreen <---- pointer: From Screen p_toScreen <---- pointer: Destination Screen Code (Basically): Forbid(); p_fromScreen->FirstWindow = p_fromScreen->FirstWindow->NextWindow; p_prevFromWindow->NextWindow = p_fromWindow->NextWindow; p_fromWindow->NextWindow = p_toScreen->FirstWindow; p_toScreen->FirstWindow = p_fromWindow; p_fromWindow->WScreen = p_toScreen; Permit(); Any and all suggestions/solutions welcome! Thanx, Richard Conner Locus Computing Corporation lcc.richard@LOCUS.UCLA.EDU lcc.richard@UCLA-CS {ihnp4,trwrb}!lcc!richard {randvax,sdcrdcf,ucbvax,trwspp}!ucla-cs!lcc!richard