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

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

[Octave-bug-tracker] [bug #56110] Setting figure position is ignored whe


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #56110] Setting figure position is ignored when set before the figure is drawn
Date: Thu, 11 Apr 2019 04:50:22 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #12, bug #56110 (project octave):

I am able to reproduce and the root cause is that the Qt Figure object (which
lives in the GUI thread) uses the graphics event queue to communicate position
changes to the interpreter thread. This means, after the figure is
constructed, there is a new event in the queue that will tell the interpreter
to fix the position to an eventually new value.

The following simple diff fixes the issue for me


diff -r ca0230d3efbf libgui/graphics/Backend.cc
--- a/libgui/graphics/Backend.cc        Mon Apr 08 09:22:39 2019 -0700
+++ b/libgui/graphics/Backend.cc        Thu Apr 11 10:42:30 2019 +0200
@@ -113,6 +113,10 @@
 
         emit createObject (go.get_handle ().value ());
 
+        // We need to process graphics events that have been pushed while
+        // initializing the GUI objects
+        gh_manager::process_events ();
+
         return true;
       }



What I don't understand is why this behavior is not deterministic. IOW I don't
see how the graphics event can be executed before drawnow on some systems.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56110>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

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