bugGNUstep - Bugs: bug #25046, back-X11-context.m or related bug

Group
 
 

bug #25046: back-X11-context.m or related bug

Submitter:  Kargor <kargor>
Submitted:  Tue 09 Dec 2008 09:28:47 AM UTC
   
 
Category:  Backend Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 20 Jul 2009 11:05:07 AM UTC, comment #3: 

Closed as there wasn't any feedback for the original author.

Fred Kiefer <FredKiefer>
Group Member
Fri 30 Jan 2009 10:17:20 PM UTC, comment #2: 

Change the bug report state to testing.

Fred Kiefer <FredKiefer>
Group Member
Tue 09 Dec 2008 09:25:04 PM UTC, comment #1: 

What your change does is just to disable the call to bestContext(). Now this function tries to find the best available context from X11, meaning the one with the deepest drawing depth. (For some reason the 32 bit visuals are normally not the defaults even on systems that support that depth) This looking for the best depth is normally the right thing to do and I will need to understand why it is doing some harm in your case.

There was a bug in some other place of GNUstep back (in the art graphics backend) that could cause GNUstep to use 16 bit visuals later on, and these did not work well with the context. But this bug has been fixed for over a month now.

Could you please retry with current GNUstep code and if the problem prevails we need to come up with another solution.

Fred Kiefer <FredKiefer>
Group Member
Tue 09 Dec 2008 09:28:47 AM UTC, original submission:  

It's hard to tell whether the bug is there or somewhere else, I just fixed it there. This is based on startup 0.20.0.

The problem: on screens that only have 16 bit depth, applications get X11 errors, and empty windows. This happens on some systems only.

Apparent reason: context.m looks for a 24/32 bit visual, and uses that. In other places, it uses bitmaps based on the screen depth, which is 16 bit. On systems that offer 32 bit visuals on 16 bit screens, this causes X11 to f*ck up.
Side note: I don't remember whether SuSE 11 or Ubutntu 8.04 was the one exhibiting the problem, or maybe even both.

I fixed this by adding a simple patch:

--- Source/x11/context-old.c    2008-11-03 11:30:31.000000000 +0100
+++ Source/x11/context.c        2008-11-03 11:34:27.000000000 +0100
@@ -698,8 +698,11 @@

     /* use default */
     if (!context->visual) {
+#if 0
        if ((context->attribs->flags & RC_DefaultVisual)
-           || !bestContext(dpy, screen_number, context)) {
+           || !bestContext(dpy, screen_number, context))
+#endif
+       {
            context->visual = DefaultVisual(dpy, screen_number);
            context->depth = DefaultDepth(dpy, screen_number);
            context->cmap = DefaultColormap(dpy, screen_number);

Basically disabling the "best context" thing here. Using
the default seems to work better. I have no way of knowing
whether it might break other things, but it hasn't failed
me so far.

Kargor <kargor>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by kargor (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-07-20 FredKiefer StatusReady For Test Fixed
        Open/ClosedIn Test Closed
    2009-01-30 FredKiefer StatusNeed Info Ready For Test
        Open/ClosedOpen In Test
    2008-12-09 FredKiefer CategoryNone Backend
        Item GroupNone Bug
        StatusNone Need Info
        Assigned toNone FredKiefer

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code