octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44776] [Qt] Restore window button does not tr


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44776] [Qt] Restore window button does not trigger a repaint event for its content
Date: Fri, 10 Apr 2015 17:57:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #10, bug #44776 (project octave):

I didn't look that closely at the code, but I looked close enough to get a
feel for things.  I've seen these sorts of window size and update issues a lot
with gnuplot development, for example, where there is the core routine and an
outboard driver through a pipe.  It can get sort of tangled, adding variables
here, conditional there.  Things like static methods or whatnot often seem to
complicate matters rather than add benefit.

I tend to take a broader view regarding the overall communication and flow
across threads.  As I see it, somewhere in the mix needs to be a Mutex to
prevent a clash of simultaneous data modification and/or redraw timing.  A C
callback on its own simply doesn't have that.

Personally, for elegance I would have attempted to derived Figure from, what
is it, QCanvas, QGraphicsScene?  Some Qt object that already has the window
modification and redraw signals as part of it.  There probably already is a
signal in those types of Qt objects emitted when the window is resized.  The
responding slot would either send a command to Octave core with the new size
(the command interface, by construction, has a Mutex), or the window size
would be copied to some shared memory with Octave core, which should have a
Mutex.

There's also the question of Octave core rendering while it is processing. 
It's not that important to me, but I'm sure there will be users saying "can't
change the figure size while a long processing job is running".  (In fact, I
think there is a related bug I've just noticed in attempting to resize when
octave is processing.  Changing the window size results in the figure not
being redrawn at all once the interpreter finishes processing.)  It might make
sense to have Octave gl-renderer be an independent hunk of code so that
resizing can be done when Octave is processing.  Also, not the easiest thing.

As I say, it's just a gut feeling that the sort of pieces to make plotting
work smoothly aren't there.  Probably have to settle for with some quirky
operation for the time being.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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