[Bug 2398] OpenGL is only used only on top level windows so child windows get overdrawn

Wine Bugs wine-bugs at winehq.org
Sun Apr 16 23:27:26 CDT 2006


http://bugs.winehq.org/show_bug.cgi?id=2398





------- Additional Comments From philip at digitalinfinity.biz  2006-16-04 23:27 -------
I'd like to recomend and observer pattern that may solve your problem here in
getting this stuff to work. This way you can have the child window update when
the parent window updates. You can have as many windows update as you want. And
you can have an individual child update by creating a separate update window for
it. Hope this helps. 

class Subject; 


class Observer {
public: 
     virtual ~Observer(); 
     virtual void update(Subject* theChangedParent) = 0; 

protected: 
      Observer(); 
} 


class Subject {
public: 
    virtual ~subject(); 
    virtual void attach(Observer*); 
    virtual void detatch(Observer*);

    virtual void notify();

protected: 
    Subject();
 
private: 

    List<Observer*>  _observers; 
}; 

void Subject::attach(Observer* obj) {
      _observers.Append(obj); 
}

void Subject::detach(Observer* obj) {
      _observer.Remove(obj); 
}


void Subject::notify() {
      ListIterator<Observer*> i(&_observers);

      for(i.First(); !i.IsDone(); i.Next()) {
          i.CurrentItem() -> update(this); 
      }
}

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the wine-bugs mailing list