bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #29705] Windows: OpenGL subwindow positioning error


From: Eric Wasylishen
Subject: [bug #29705] Windows: OpenGL subwindow positioning error
Date: Wed, 28 Apr 2010 21:07:18 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1059 Safari/532.5

URL:
  <http://savannah.gnu.org/bugs/?29705>

                 Summary: Windows: OpenGL subwindow positioning error 
                 Project: GNUstep
            Submitted by: ericw
            Submitted on: Wed 28 Apr 2010 09:07:17 PM GMT
                Category: Backend
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

You can test this on Windows by setting GSBackHandlesWindowDecorations to
YES, and running usr-apps/examples/gui/MyGL. When moving the splitter
vertically, the position of the NSOpenGLViews will be incorrect (vertically
flipped from where they should be.)


I have a proposed fix for this:

In w32_GLcontext.m there's this chunk of code:

  if ([server handlesWindowDecorations] == YES)
    {
      /* The window manager handles window decorations, so the
       * the parent X window is equal to the content view and
       * we must therefore use content view coordinates.
       */
      rect = [view convertRect: [view bounds] toView: [[attached window]
contentView]];
    }

However this doesn't take in to account whether [[attached window]
contentView] is flipped or not - later on it is assumed that rect is
unflipped.

I have attached a patch which ensures rect is in unflipped coordinates.

I believe this change also needs to be made in the X11 backend - XGGLContext
has the same chunk of code. Perhaps we could a private method somewhere which
handles this conversion.. -[NSView _convertRectToBackendCoordinates:] or
something like that?



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 28 Apr 2010 09:07:17 PM GMT  Name: w32_GLContext.patch  Size: 873B 
 By: ericw

<http://savannah.gnu.org/bugs/download.php?file_id=20361>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29705>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]