#18591 closed defect (fixed)


Reported by: dgud Owned by:
Priority: normal Milestone:
Component: wxGTK Version: 3.1.3
Keywords: regression Cc: dgud@…
Blocked By: Blocking:
Patch: no


wxRESIZE_BORDER no longer works for wxMiniFrame, works in 3.0.4.

diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp
index d54faab308..22ca35e22f 100644
--- a/samples/dialogs/dialogs.cpp
+++ b/samples/dialogs/dialogs.cpp
@@ -1879,7 +1879,7 @@ void MyFrame::MiniFrame(wxCommandEvent& WXUNUSED(event))
     wxFrame *frame = new wxMiniFrame(this, wxID_ANY, "Mini frame",
                                      wxDefaultPosition, wxSize(300, 100),
-                                     wxCAPTION | wxCLOSE_BOX);
+                                     wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER);
     new wxStaticText(frame,
                      "Mini frames have slightly different appearance",

Change History (8)

comment:1 Changed 12 months ago by pcor

Works for me with current master.

comment:2 Changed 12 months ago by dgud

  • Cc dgud@… added

Hmm, this is with a standard ubuntu 18.04 and gtk-3.0,
Version libgtk-3-0:amd64 3.22.30-1ubuntu4 if I do the lookup correct.

I can easily workaround it with wxFrame which works fine, so it's not
the biggest issue but irritating.

comment:3 Changed 12 months ago by vadz

  • Keywords regression added

There have been several non-trivial changes here since 3.0, I don't know which one of them broke this:

% git log --oneline 3.0.. src/gtk/minifram.cpp
8cdd20667f Initialize wxTopLevelWindow::DecorSize in wxGTK
b8789b9d6f Fix drag move of wxMiniFrame under Wayland
c0b0562533 Avoid many -Wparentheses warnings from gtk/gtk.h with gcc8
620b83109e Use gdk_seat_grab()/gdk_seat_ungrab() with GTK+4
c4acd5f9dd Fix drawing miniframe resize grip with GTK3, see #17918
6674ca57da implement wxDC::GetContentScaleFactor() for GTK3
e72133371e fix cursor unref for GTK2, broken by 3e75b23
3e75b231b0 fix GdkCursor memory leaks
9f8deb74a7 avoid gdk_cursor_new(), deprecated in GTK+ 3.16
48459e3cd2 avoid GtkAlignment and gtk_widget_reparent(), deprecated in GTK+ 3.14
8f8d58d193 Use wx-prefixed macros throughout the repository.
e702fd5043 fix for wxMiniFrame titlebar appearing blank
2dfa6e6aa8 Don't update position variables from window dragging code. Let "configure-event" handler do it so it can also generate proper move events. closes #15904
9f09241cd0 Fix cursor inheritance and busy cursor/global cursor, closes #15801

Could you please try reverting a couple of superficially suspicious ones (e.g. b8789b9d6f, c4acd5f9dd) to see if this fixes the problem?

comment:4 Changed 12 months ago by dgud

  • Cc dgud@… removed

Well that was easy, I started from the top and reverted 8cdd20667f and the rezise "corner" is back and I can resize the window.

I noticed something I can also only resize in 3.0.4 with the resize "corner" not by dragging window borders as I can with normal frames.

So 8cdd20667f removes the resize "corner" and I can't resize the window, but
it seems that I have not been able to resize miniframes by using the borders
for a long time. Though I have not noticed that, it is to natural to grab the
resize handle "corner".

Adding this lines also re-adds the resize-corner, and makes it resizeable.

    m_decorSize.left = 1;
    m_decorSize.right = 1;
    m_decorSize.top = 1;
    m_decorSize.bottom = 1;

But I have no idea what I'm doing, this guessing/testing things here.

Setting m_decorSize.* = 1 makes resize corner icon appear and make window resizeable.
Setting m_decorSize.* > 1 makes resize corner icon disappear but window is resizeable from lower right corner.
Not setting m_decorSize.* no resize icon and not resizeable

Hmm explicit setting m_decorSize.* = 0 makes makes resize corner icon appear and make window resizeable.

Doesn't the initializer work on my gcc (7.4.0) ?

     struct DecorSize
+        DecorSize()
+        {
+            left =
+            right =
+            top =
+            bottom = 0;
+        }
         int left, right, top, bottom;
     DecorSize m_decorSize;

I don't know C++ so didn't even know you could do the above :-)

And I can't resize window from window border in any variant nor in wxWidgets-3.0.4

comment:5 Changed 12 months ago by Paul Cornett <paulcor@…>

In 9c5ec2f9/git-wxWidgets:

Restore resetting of wxMiniFrame cached decor size

This was inadvertently lost in 8cdd20667f, apparently causing wxRESIZE_BORDER
functionality to stop working on some platforms. See #18591

comment:6 Changed 12 months ago by vadz

Thanks for fixing this! Are there any problems still remaining here? From comment:4 it looks like we might want to set the decoration sizes to 1 rather than 0?

comment:7 Changed 12 months ago by dgud

  • Cc dgud@… added

Sorry about the long confusing comment above, wrote it as I debugged.

Vadz, size 0 works when set inside wxMiniFrame::Create,
it doesn't when set in the initializer.

Thanks for the fix, I can now resize via the corner,
still not via borders don't know if that is intentional or not so
leave it up you guys to close this ticket.

comment:8 Changed 12 months ago by pcor

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.