Re: Packages requiring Xorg BackingStore true

2013-09-12 Thread Adam Jackson
On Wed, 2013-09-11 at 23:27 +0200, Sandro Mani wrote:
  Well, yes, but it ought to work regardless of the xorg.conf setting,
  because that setting has been effectively hardwired to true for about
  six years now.  I rewrote the backing store implementation to use
  Composite internally, which is always available, so we just blindly
  ignore the config setting and give you backing store if you ask for it.
  There may be bugs, I freely admit, but it's definitely meant to work.
  If it doesn't it's probably a bug in X and I'll fix it, so hook me up
  with test packages and I'll take a look.
 I've uploaded an x86_64 rpm here [1], the srpm is here [2]. To reproduce 
 the problem, first download the foil gometry [3], then run xfoil from a 
 terminal, and type
 
 load Naca63412.dat
 
 and at the following Enter airfoil name prompt, type
 
 naca63412
 
 Upon pressing enter, the Xplot11 window should open, showing the 
 cross-section of the foil.
 
 The Xlib code for the plotting window is in plotlib/Xwin.c in the xfoil 
 source tarball.

Oh my, this is embarassing.  If only I'd deleted more code you'd never
have hit this.  Definitely a bug in xserver.  I'll send a patch upstream
and fix Fedora once that lands.  Thanks for the testcase!

- ajax

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-12 Thread Przemek Klosowski

On 09/11/2013 05:27 PM, Sandro Mani wrote:



Well, yes, but it ought to work regardless of the xorg.conf setting,
because that setting has been effectively hardwired to true for about
six years now.  I rewrote the backing store implementation to use
Composite internally, which is always available, so we just blindly
ignore the config setting and give you backing store if you ask for it.
There may be bugs, I freely admit, but it's definitely meant to work.
If it doesn't it's probably a bug in X and I'll fix it, so hook me up
with test packages and I'll take a look.

I've uploaded an x86_64 rpm here [1], the srpm is here [2].

...

[1] http://smani.fedorapeople.org/xfoil-6.97-1.fc21.x86_64.rpm
[2] http://smani.fedorapeople.org/xfoil-6.97-1.fc21.src.rpm
[3] http://smani.fedorapeople.org/Naca63412.dat
I compiled the RPM from your source on F19/x86_64 with an Xeon E3-1200 
v2/3rd Gen using the intel driver (Ivybridge GT2). As ajax was saying, 
the window exposes work just fine: I can raise other windows on top of 
xfoil and when I re-expose xfoil it redraws properly.


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-12 Thread Sandro Mani


On 12.09.2013 21:30, Przemek Klosowski wrote:

On 09/11/2013 05:27 PM, Sandro Mani wrote:



Well, yes, but it ought to work regardless of the xorg.conf setting,
because that setting has been effectively hardwired to true for about
six years now.  I rewrote the backing store implementation to use
Composite internally, which is always available, so we just blindly
ignore the config setting and give you backing store if you ask for it.
There may be bugs, I freely admit, but it's definitely meant to work.
If it doesn't it's probably a bug in X and I'll fix it, so hook me up
with test packages and I'll take a look.

I've uploaded an x86_64 rpm here [1], the srpm is here [2].

...

[1] http://smani.fedorapeople.org/xfoil-6.97-1.fc21.x86_64.rpm
[2] http://smani.fedorapeople.org/xfoil-6.97-1.fc21.src.rpm
[3] http://smani.fedorapeople.org/Naca63412.dat
I compiled the RPM from your source on F19/x86_64 with an Xeon E3-1200 
v2/3rd Gen using the intel driver (Ivybridge GT2). As ajax was saying, 
the window exposes work just fine: I can raise other windows on top of 
xfoil and when I re-expose xfoil it redraws properly.



You likely have a compositing window manager running? Cause it 
definitely did not work with kwin with compositing turned off. Anyway, 
ajax has posted patches for this to the xorg-devel list [1]. And btw, 
I've now posted a review request for xfoil [2] with a polished srpm, in 
case you are interested.


Sandro

[1] http://lists.x.org/archives/xorg-devel/2013-September/037773.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1007539
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-12 Thread Sandro Mani


On 12.09.2013 16:41, Adam Jackson wrote:

On Wed, 2013-09-11 at 23:27 +0200, Sandro Mani wrote:

Well, yes, but it ought to work regardless of the xorg.conf setting,
because that setting has been effectively hardwired to true for about
six years now.  I rewrote the backing store implementation to use
Composite internally, which is always available, so we just blindly
ignore the config setting and give you backing store if you ask for it.
There may be bugs, I freely admit, but it's definitely meant to work.
If it doesn't it's probably a bug in X and I'll fix it, so hook me up
with test packages and I'll take a look.

I've uploaded an x86_64 rpm here [1], the srpm is here [2]. To reproduce
the problem, first download the foil gometry [3], then run xfoil from a
terminal, and type

load Naca63412.dat

and at the following Enter airfoil name prompt, type

naca63412

Upon pressing enter, the Xplot11 window should open, showing the
cross-section of the foil.

The Xlib code for the plotting window is in plotlib/Xwin.c in the xfoil
source tarball.

Oh my, this is embarassing.  If only I'd deleted more code you'd never
have hit this.  Definitely a bug in xserver.  I'll send a patch upstream
and fix Fedora once that lands.  Thanks for the testcase!


Awesome, thanks!

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Packages requiring Xorg BackingStore true

2013-09-11 Thread Sandro Mani

Hello,

Some time ago I've packaged Xfoil, Avl and Xrotor (which are popular 
codes for foil/fluid-dynamics related computations), but I never ended 
up posting a package review for one reason: the plot window of those 
programs needs BackingStore true set in xorg.conf, or otherwise the 
contents of the plot windows will disappear as soon as something else 
covers the window. Now, this is not a terribly huge blocker, in the 
sense that the package basically also works without the setting, but 
still, it is not pretty. Hence I wonder on possible approaches to pursue:
- There are reports of BackingStore causing instabilities with certain 
configurations, so I guess shipping a file in xorg.conf.d is not really 
the way to go.
- A README file telling the user that sHe should enable the setting for 
the optimal experience but warning of potential instability is probably 
the best way to proceed, though the user needs to think of looking in 
/usr/share/doc/Xfoil or in the read the package description to gather 
this information.
- Question for anyone with Xorg knowledge: how feasible is it to patch 
out of the plot window code the need for BackingStore? I.e. does it only 
require some minor changes to the Xlib calls? For reference, the code is 
here: [1]



Thanks!
Sandro


[1] http://smani.fedorapeople.org/Xwin.c


--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Florian Weimer

On 09/11/2013 12:16 PM, Sandro Mani wrote:


- Question for anyone with Xorg knowledge: how feasible is it to patch
out of the plot window code the need for BackingStore? I.e. does it only
require some minor changes to the Xlib calls? For reference, the code is
here: [1]

 [1] http://smani.fedorapeople.org/Xwin.c

   case Expose:
  if(last_event != Expose)

  { /* replot_(idev); */
 XSetInputFocus(display,window,RevertToNone,CurrentTime);  }
  break;

As a first step, I would comment-in that replot_ call and see what happens.

--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Alexander Larsson
On ons, 2013-09-11 at 12:16 +0200, Sandro Mani wrote:
 Hello,
 
 Some time ago I've packaged Xfoil, Avl and Xrotor (which are popular 
 codes for foil/fluid-dynamics related computations), but I never ended 
 up posting a package review for one reason: the plot window of those 
 programs needs BackingStore true set in xorg.conf, or otherwise the 
 contents of the plot windows will disappear as soon as something else 
 covers the window. Now, this is not a terribly huge blocker, in the 
 sense that the package basically also works without the setting, but 
 still, it is not pretty. Hence I wonder on possible approaches to pursue:

It probably works without backingstore on most modern desktops anyway
since they use compositing managers which doesn't throw away non-visible
window content.


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Sandro Mani



On 11.09.2013 12:21, Florian Weimer wrote:

On 09/11/2013 12:16 PM, Sandro Mani wrote:


- Question for anyone with Xorg knowledge: how feasible is it to patch
out of the plot window code the need for BackingStore? I.e. does it only
require some minor changes to the Xlib calls? For reference, the code is
here: [1]

 [1] http://smani.fedorapeople.org/Xwin.c

   case Expose:
  if(last_event != Expose)

  { /* replot_(idev); */
 XSetInputFocus(display,window,RevertToNone,CurrentTime); }
  break;

As a first step, I would comment-in that replot_ call and see what
happens.



Thanks for you quick reply, unfortunately the replot function is defined
nowhere. Possibly the author had started to look at the issue but never
finished, since I guess that the comment if Expose events are to regen
the display, comment out these references to backing store above assume
the replot function is used. (My blind attempt at commenting the
references to backing store as hinted did not magically fix the problem,
as probably was to be expected).

Adding here to what Alexander answered: this is a good point, I hadn't
thought of that since I was running the program on an Xfce desktop
without compositing...

Sandro



--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Florian Weimer

On 09/11/2013 01:07 PM, Sandro Mani wrote:


Thanks for you quick reply, unfortunately the replot function is defined
nowhere.


Oooh.  Perhaps try calling GWXFLUSH(), then?  That should restore the 
window contents from the stored pixmap.  It won't work if client code 
ever calls GWXDRAWTOWINDOW(), though.


Can you provide more context?

--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Sandro Mani


On 11.09.2013 13:22, Florian Weimer wrote:

On 09/11/2013 01:07 PM, Sandro Mani wrote:


Thanks for you quick reply, unfortunately the replot function is defined
nowhere.


Oooh.  Perhaps try calling GWXFLUSH(), then?  That should restore the 
window contents from the stored pixmap.  It won't work if client code 
ever calls GWXDRAWTOWINDOW(), though.


Can you provide more context?

The xfoil code is here [1].  The relevant code for the plot window is 
what is in the plotlib subfolder. I've just checked whether that Expose 
case is ever reached, and it does not seem the case, since GWXCURS is 
apparently only called occasionally based on user input on the xfoil 
command line. I guess there would need to be a permanently active while 
loop which looks at X events, the question is how to do it without 
blocking the rest of the program - I fear that it is not so easy to do 
without major changes at the program logic.


But thanks for your suggestions, now I have a good idea of where to 
fiddle around;)


Sandro

[1] http://smani.fedorapeople.org/xfoil6.97.tar.gz

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Adam Jackson
On Wed, 2013-09-11 at 12:32 +0200, Alexander Larsson wrote:
 On ons, 2013-09-11 at 12:16 +0200, Sandro Mani wrote:
  Hello,
  
  Some time ago I've packaged Xfoil, Avl and Xrotor (which are popular 
  codes for foil/fluid-dynamics related computations), but I never ended 
  up posting a package review for one reason: the plot window of those 
  programs needs BackingStore true set in xorg.conf, or otherwise the 
  contents of the plot windows will disappear as soon as something else 
  covers the window. Now, this is not a terribly huge blocker, in the 
  sense that the package basically also works without the setting, but 
  still, it is not pretty. Hence I wonder on possible approaches to pursue:
 
 It probably works without backingstore on most modern desktops anyway
 since they use compositing managers which doesn't throw away non-visible
 window content.

Well, yes, but it ought to work regardless of the xorg.conf setting,
because that setting has been effectively hardwired to true for about
six years now.  I rewrote the backing store implementation to use
Composite internally, which is always available, so we just blindly
ignore the config setting and give you backing store if you ask for it.
There may be bugs, I freely admit, but it's definitely meant to work.
If it doesn't it's probably a bug in X and I'll fix it, so hook me up
with test packages and I'll take a look.

- ajax

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Packages requiring Xorg BackingStore true

2013-09-11 Thread Sandro Mani



Well, yes, but it ought to work regardless of the xorg.conf setting,
because that setting has been effectively hardwired to true for about
six years now.  I rewrote the backing store implementation to use
Composite internally, which is always available, so we just blindly
ignore the config setting and give you backing store if you ask for it.
There may be bugs, I freely admit, but it's definitely meant to work.
If it doesn't it's probably a bug in X and I'll fix it, so hook me up
with test packages and I'll take a look.
I've uploaded an x86_64 rpm here [1], the srpm is here [2]. To reproduce 
the problem, first download the foil gometry [3], then run xfoil from a 
terminal, and type


load Naca63412.dat

and at the following Enter airfoil name prompt, type

naca63412

Upon pressing enter, the Xplot11 window should open, showing the 
cross-section of the foil.


The Xlib code for the plotting window is in plotlib/Xwin.c in the xfoil 
source tarball.


Thanks!

Sandro

[1] http://smani.fedorapeople.org/xfoil-6.97-1.fc21.x86_64.rpm
[2] http://smani.fedorapeople.org/xfoil-6.97-1.fc21.src.rpm
[3] http://smani.fedorapeople.org/Naca63412.dat
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct