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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Kargor <kargor>
Submitted on:  Tue 09 Dec 2008 09:28:47 AM UTC  
 
Category: BackendSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

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>
Project MemberIn charge of this item.
Fri 30 Jan 2009 10:17:20 PM UTC, comment #2:

Change the bug report state to testing.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jul 2009 11:05:07 AM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Fri 30 Jan 2009 10:17:20 PM UTCFredKieferStatusNeed Info=>Ready For Test
      Open/ClosedOpen=>In Test
    Tue 09 Dec 2008 09:25:04 PM UTCFredKieferCategoryNone=>Backend
      Item GroupNone=>Bug
      StatusNone=>Need Info
      Assigned toNone=>FredKiefer

    Back to the top


    Powered by Savane 3.1-cleanup1