Skip to content

Remove unavailable zenity options - #845

Open
City-busz wants to merge 1 commit into
mate-desktop:masterfrom
City-busz:fix-zenity3.90
Open

City-busz wants to merge 1 commit into
mate-desktop:masterfrom
City-busz:fix-zenity3.90

Conversation

@City-busz

Copy link
Copy Markdown
Contributor

The --display and --class options were removed from recent versions of zenity, and refuses to run if these options are specified.

Closes: #755

@vkareh vkareh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incomplete. There's another instance of these flags:

~/P/m/marco (⎇ master) $ git grep "\-\-(class|display)"
src/core/util.c:556:  argvl[i++] = "--display";
src/core/util.c:558:  argvl[i++] = "--class";
src/core/util.c:654:  argvl[i++] = "--display"; <-------- here
src/core/util.c:656:  argvl[i++] = "--class"; <------ and here

Also the function signature still takes const char *display which is no longer used. This also means that the malloc should probably be adjusted.

@City-busz

Copy link
Copy Markdown
Contributor Author

Okay, now I removed these parameters also from meta_show_entry_dialog, adjusted the malloc, and removed the unused const char *display variable.

@vkareh vkareh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better but there's still inside meta_window_present_delete_dialog a condition for

w->res_class &&
g_ascii_strcasecmp (w->res_class, "marco-dialog") == 0)

but nothing sets the "marco-dialog" class any more.

~/P/m/marco (⎇ master) $ git grep '"marco-dialog"'
src/core/delete.c:228:              g_ascii_strcasecmp (w->res_class, "marco-dialog") == 0)

@City-busz

Copy link
Copy Markdown
Contributor Author

I made a few further changes. Recent versions of zenity no longer support the WINDOWID environment variable, so the dialog cannot be made transient for the specified window. Therefore, I removed the transient_for parameter.

To ensure that an already-open dialog is focused immediately when the user attempts to close a frozen window again, compare net_wm_pid with dialog_pid and present the existing dialog using a fresh timestamp without waiting for another 5-second ping timeout.

@City-busz
City-busz force-pushed the fix-zenity3.90 branch 2 times, most recently from 4b58d50 to f9ede9e Compare November 18, 2026 23:06
Comment thread src/core/delete.c
meta_window_delete (MetaWindow *window,
guint32 timestamp)
{
if (window->dialog_pid >= 0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If g_spawn_async fails in the meta_show_dialog function, this will be a garbage value. You might want to initialize it as -1 or something in that function to avoid a bogus return.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I added an initialization for child_pid = -1.

Comment thread src/core/delete.c
g_ascii_strcasecmp (w->res_class, "marco-dialog") == 0)
if (w->net_wm_pid == window->dialog_pid)
{
meta_window_activate (w, timestamp);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're no longer using timestamp in this function, you can drop the parameter from the function signature (or keep using timestamp since this new function adds a possibly unnecessary X roundtrip)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I removed the timestamp parameter. I experienced focusing issues with using the existing timestamp, this is why I replaced it.

The --display and --class options were removed from recent versions of
zenity, and refuses to run if these options are specified.

Closes: mate-desktop#755
@City-busz

Copy link
Copy Markdown
Contributor Author

I submitted #851 as an alternative for this, which replaces zenity with its fork, xenity.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

With zenity >= 3.90.0 xxx is not responding window no longer shows

2 participants