bugGNU Octave - Bugs: bug #53475, Resizing the window does not...


bug #53475: Resizing the window does not trigger a plot redraw/resize (Qt)

Submitted by:  None
Submitted on:  Mon 26 Mar 2018 01:00:18 PM UTC  
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: MayeulCOriginator Email: -unavailable-
Open/Closed: OpenRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Mon 16 Apr 2018 05:25:13 AM UTC, comment #7:

Clicking in the title bar should not be enough to cause a re-draw, but clicking on a menubar item (File, Edit, Help), or one of the toolbar widgets such as Autoscale, Grid, etc. is.

Simple code to demonstrate is

The actual sombrero will now take up only a small portion of the blank white canvas area.

I'm sure this is because we're not processing some of the events like Maximize Window. This thread looks relevant: http://www.qtcentre.org/threads/46548-Catch-maximize-and-restore-events.

The code to modify is going to be in libgui/graphics. Probably Canvas.cc, but maybe Figure.cc. In any case, this can't be fixed for the 4.4.0 release, but maybe for the 5.0 release.

Rik <rik5>
Project Administrator
Tue 27 Mar 2018 08:34:52 AM UTC, comment #6:

@sebald Clicking the title bar is not enough to trigger a refresh for me, but I noticed that opening a menu from the menu bar is.

Sorry for the category, I agree that it should be changed.
It was not immediately clear to me that "qt" was equivalent to "opengl", and only found about it later when browsing the wiki. Maybe this could be mentioned here? https://octave.org/doc/v4.0.0/Graphics-Toolkits.html

Mayeul Cantan <mayeulc>
Mon 26 Mar 2018 06:51:11 PM UTC, comment #5:

Confirmed that this is still in the development version in Linux as well. It seems that clicking in the title bar is enough to cause a redraw. This should be "Plotting with OpenGL" category, as both FLTK and gnuplot toolkits redraw upon clicking one of the resize buttons.

Dan Sebald <sebald>
Mon 26 Mar 2018 03:49:23 PM UTC, comment #4:

I see this in windows too.

Marshall <marsian>
Mon 26 Mar 2018 02:16:42 PM UTC, comment #3:

I actually just noticed that it seems to happen for any drawing, including initial draw of a figure's legend, or multiple superimposed plots with hold on. So it could very well be a buffering issue.

Mayeul Cantan <mayeulc>
Mon 26 Mar 2018 01:40:45 PM UTC, comment #2:

Sorry for spamming, I should be done with trying things. I just tried to set

however, it doesn't seem like this fixes anything.

Mayeul Cantan <mayeulc>
Mon 26 Mar 2018 01:34:23 PM UTC, comment #1:

I would like to add that the same happens when first plotting something with imagesc

Leads to an empty plot window, until this one has either:

  • been resized trough one of the corners
  • lost focus
  • been refreshed trough clicking on it with the drag tool

What's more, this is cumulative with the other bug, so that you can't plot an image, then maximize it, otherwise you end up with an image the original size in one corner of the window.

Now that I think about it (this is a wild guess, I never looked at the code), this could have to do with double buffering, as the behavior is consistent with it being always short of one flip.

Mayeul Cantan <mayeulc>
Mon 26 Mar 2018 01:00:18 PM UTC, original submission:

First of all, I would like to point out that I do not encounter this bug when drag-resizing windows, but only when:

  • Snap-resizing it to one of the sides of my screen
  • using the maximize/restore buttons
  • double clicking the title bar

My desktop environment is KDE (on Arch Linux 32 at the moment), though I seem to recall this happening in Unity and other DEs as well.

This has ben bugging me for quite some time, as this bug has been present on every computer that I recall using with Octave with, for the past four years or so, though this doesn't seem to be systematic.

When resizing a plot window trough one of the above actions, the plot inside it occasionally doesn't update, and leaves the windows with its new size, and correctly drawn, except for the contents of the plot, which keep the old size.

As a workaround, the drag button can be selected, and the graph clicked once, which seems to trigger a redraw. Losing the focus also seems to trigger a redraw, and so does taking a screenshot, so this could be compositor-related (kwin here, but definitely happen(ed?) with others), but makes it difficult to take screenshots.

I don't know if this is related or not, but when selecting save as , and saving as png with the window maximized, Octave generated a similar image, with a small graph in one of the corners of the resulting image.

I was able to reproduce this with qt, but not fltk (though I thing it used to happen with fltk as well in the past).



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

Attach File(s):

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 rik5 (Posted a comment)
  • -unavailable- added by sebald (Posted a comment)
  • -unavailable- added by marsian (Posted a comment)
  • -unavailable- added by mayeulc (Posted a comment)

    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 project members can vote.


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



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Apr 2018 05:25:13 AM UTCrik5CategoryPlotting=>Plotting with OpenGL
      Item GroupNone=>Incorrect Result
      SummaryResizing the window does not trigger a plot redraw/resize=>Resizing the window does not trigger a plot redraw/resize (Qt)

    Back to the top

    Powered by Savane 3.1-cleanup1