Closed johnthacker closed 1 month ago
This is on a Fedora 40 system, using the official Fedora wireshark package wireshark-4.2.4-2.fc40.x86_64
It's impossible to resize the dialog.
Interesting, I don't think decorations can have any impact on dialog size, it's basically just implemented painted operation. I tried with kate
and didn't reproduce, not sure how I can invoke this dialog in wireshark
without trying to capture something.
Opening an existing file, adding a comment (e.g., Edit->Packet Comments->Add New Comment), and trying to close without saving:
Opening Wireshark with a Lua script with a syntax error. (Garbage can be placed in a plugin directory, but wireshark -X lua_script:not_a_lua_script.txt
will work):
wireshark -X lua_script:WiresharkConfigVersion.cmake
QT_WAYLAND_DECORATION=bradient wireshark -X lua_script:WiresharkConfigVersion.cmake
:
You can see that the buttons are smaller as well. The titlebar is taller, and there's space for the drop shadows. Perhaps the auto calculations for how much space to leave for the text is not taking the changed decorations into account.
Open a file, right click on a protocol name in the protocol tree and select "Wiki Protocol Page":
With QT_WAYLAND_DECORATION=bradient
:
I still cannot reproduce it, at least when I try this under Weston. I will try later in GNOME.
My test workflow:
1) Run weston
2) Open the terminal there and run export XDG_CURRENT_DESKTOP=GNOME
3) Run wireshark
This bug could be triggered in nested mutter:
I can reproduce now with nested Mutter. I didn't know it can be run this way. I will look into this.
It's a bug in Qt. I will try to fix it there.
Closing it here.
Proposed upstream fix: https://codereview.qt-project.org/c/qt/qtwayland/+/560854
It turns out the issue is not in Qt, but it's a combination of Wireshark setting all windows as maximized initially and QAdwaitaDecorations reporting wrong margins, since the window has maximized
state, even though it's not maximized as it's just a QMessageBox or whatever, but I don't know how to fix it or workaround it.
The QMessageBox has maximized state? That seems unlikely since it's happening in cases where a default QMessageBox is being created on the stack or the QMessageBox static functions are being called, but I'm happy to change the Wireshark code if the problem is somehow there.
Certainly if I call
qWarning() << "maximized" << msg_dialog.isMaximized() << msg_dialog.isFullScreen();
immediately before
msg_dialog.exec();
it prints false to the console for both.
The Wiki page example that is cut off is from calling the static function:
int ret = QMessageBox::question(this, mainApp->windowTitleString(tr("Wiki Page for %1").arg(proto_abbrev)),
tr("<p>The Wireshark Wiki is maintained by the community.</p>"
"<p>The page you are about to load might be wonderful, "
"incomplete, wrong, or nonexistent.</p>"
"<p>Proceed to the wiki?</p>"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
Which seems unlikely to set any of the visibility or flags.
You are right, I didn't realize the maximized state is for the main window and not for the QMessageBox. Ignore what I wrote and I might actually be right with the Qt issue. I reopened the Qt change.
Fixed in Mutter: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3755
Just wanted to confirm that the fix in Mutter works for me.
With QT_WAYLAND_DECORATION set to adwaita, QMessageBox text is cut off. Example from running
wireshark
:With
QT_WAYLAND_DECORATION=bradient wireshark
: