nanogui: nanox+flnx problem


Previous by date: 17 Jul 2002 09:38:00 -0000 Re: drag the window!, Alex Holden
Next by date: 17 Jul 2002 09:38:00 -0000 Re: nanox+flnx problem, Jordan Crouse
Previous in thread: 17 Jul 2002 09:38:00 -0000 Re: nanox+flnx problem, Florian Berger
Next in thread: 17 Jul 2002 09:38:00 -0000 Re: nanox+flnx problem, Jordan Crouse

Subject: Re: [nanogui] nanox+flnx problem
From: Florian Berger ####@####.####
Date: 17 Jul 2002 09:38:00 -0000
Message-Id: <20020717112416.5760a3a0.harpin_floh@yahoo.de>

ok i think ive fixed it. i implemented x() and y() in Fl_Window.cxx,
which was previously inherited by Fl_Widget.
i hope this wont break anything.
actually its still not perfect:
theres still a constant offset to the correct position when using nanowm
maybe the titlebar/border is summed up twice, or such?
where exactly is taken care of the titlebar?
i also didnt fix correct placing at startup (initial x,y values in
constructor of Fl_Window)

here my x() fix for Fl_Window - i can send you the whole patch, if you
wish (there has to be an include of "FL/x.H" in Fl_Windows.cxx and the
definitions in the calss header for x() and y()):

int Fl_Window::x() const {
        if( this->window() ){
            return Fl_Widget::x();
        } else {
#ifdef NANO_X
            GR_WINDOW_INFO info;
            GR_WINDOW_ID   id;
            int xtot=0;
            if(i!=0){
                id=i->xid;
                do{
                    GrGetWindowInfo( id, &info );
                    xtot += info.x;
                    id = info.parent;
                } while ( id!=0 );
                return xtot;
            } else {
                return Fl_Widget::x();
            }
#else
            return Fl_Widget::x();
#endif
        }
}


regards,
  floh

Previous by date: 17 Jul 2002 09:38:00 -0000 Re: drag the window!, Alex Holden
Next by date: 17 Jul 2002 09:38:00 -0000 Re: nanox+flnx problem, Jordan Crouse
Previous in thread: 17 Jul 2002 09:38:00 -0000 Re: nanox+flnx problem, Florian Berger
Next in thread: 17 Jul 2002 09:38:00 -0000 Re: nanox+flnx problem, Jordan Crouse


Powered by ezmlm-browse 0.20.