! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Check if minimal dialog is already running
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-settings
Component:
Display Settings

Comments

Description Simon Steinbeiss editbugs 2014-09-17 13:53:41 CEST
In some rare cases, it can happen that the minimal dialog is open twice. For instance, if a user opens it and then connects a new display, it is possible that he ends up with two dialogs, which is undesirable.

Instead, the xfsettingsd should check if the minimal dialog is already running and either just not open another one or give the existing instance focus.
Comment 1 Liv 2017-01-24 18:14:15 CET
This actually happens quite often here, and all you need to do is remove/reinsert the HDMI connector, or sometimes simply touch the cable if the connector is fragile...
Comment 2 Andre Miranda editbugs 2017-02-08 03:30:51 CET
Created attachment 6986 
patch

Does this patch accomplish the desired effect?
Comment 3 Liv 2017-03-01 22:32:14 CET
I would like to test this patch, but I'm unable to ./configure master: 


checking for exo-2 >= 0.11.0... not found
*** The required package exo-2 was not found on your system.
*** Please install exo-2 (atleast version 0.11.0) or adjust
*** the PKG_CONFIG_PATH environment variable if you
*** installed the package in a nonstandard prefix so that
*** pkg-config is able to find it.


Is it still possible to build against Gtk2, or does it work only with Gtk3 now?
Comment 4 Andre Miranda editbugs 2017-03-02 13:04:03 CET
xfce4-settings has been ported to Gtk3 only since September and this patch makes use of GtkApplication which is not available in Gtk2.
Comment 5 Matias De lellis 2017-03-02 14:03:18 CET
Hi,
You can do the same with glib Gapplication. (Gtk already use it) but it is newer than the dependencies of xfce4-settings, so it should be optional in compilation time..

https://developer.gnome.org/gio/stable/GApplication.html
Comment 6 Andre Miranda editbugs 2017-03-02 14:20:54 CET
Matias: I'm already using GApplication's functions, replacing GtkApplication/gtk_application_new by GApplication/g_application_new is possible, the current dependencies are compatible.
Comment 7 Matias De lellis 2017-03-02 15:35:42 CET
> Matias: I'm already using GApplication's functions, replacing GtkApplication/gtk_application_new by GApplication/g_application_new is possible,

Of course.. This is what I meant.. ;)

> the current dependencies are compatible.

In master yes, but if you want to apply it to the stable version like me, no.. =)
xfce4-settings stable deppend on glib 2.24.0, and GApplication was added on 2.28. Of course this in 99% of the time is not a problem.. Just a note .. In case you want to release a minor update of the stable .. ;)

Regards,
Matias
Comment 8 Liv 2017-03-07 12:05:23 CET
(In reply to André Miranda from comment #4)
> xfce4-settings has been ported to Gtk3 only since September and this patch
> makes use of GtkApplication which is not available in Gtk2.

Hmm, Xfce seems to have gone uncharacteristically aggressive with the Gtk3 requirements. I've tried to build xfce4-settings and it fails like this: 

*** The required package gtk+-3.0 was found on your system,
*** but the installed version (3.18.9) is too old.
*** Please upgrade gtk+-3.0 to atleast version 3.20.0, or adjust
*** the PKG_CONFIG_PATH environment variable if you installed
*** the new version of the package in a nonstandard prefix so
*** pkg-config is able to find it.

Not even Ubuntu Xenial ships 3.20... And that isn't exactly ancient, as it's the current LTS for Ubuntu.
Comment 9 Andre Miranda editbugs 2017-03-07 12:48:23 CET
@Liv, maybe we're all using Arch? :P
Try to set the GTK version to 3.18 in configure.ac.in, perhaps nothing breaks and for the purpose of testing the worse thing that can happen is a compilation error. If everything works fine you can try to convince the devs to downgrade the requirements.
Comment 10 Liv 2017-03-07 12:51:48 CET
(In reply to André Miranda from comment #9)
> @Liv, maybe we're all using Arch? :P
> Try to set the GTK version to 3.18 in configure.ac.in, perhaps nothing
> breaks and for the purpose of testing the worse thing that can happen is a
> compilation error. If everything works fine you can try to convince the devs
> to downgrade the requirements.

Thanks. For now I've simply managed to find Simon's Gtk3 package for Xenial, and am building packages in my PPA against that: 
https://launchpad.net/~landronimirc/+archive/ubuntu/xfce-gtk3

I'm now slowly collecting all packages required for Gtk3 Xfce. We'll see how that works out.
Comment 11 Simon Steinbeiss editbugs 2017-05-24 00:23:57 CEST
@Sean: mind to review? Looks simple enough.
Comment 12 haarp 2017-06-13 14:38:38 CEST
I can confirm that the patch works.
Comment 13 Git Bot editbugs 2017-06-14 03:14:10 CEST
Andre Miranda referenced this bugreport in commit 786c0dc49dd10b092d1bf6d91223d8e148800146

Make minimal dialog single instance (Bug #11169)

https://git.xfce.org/xfce/xfce4-settings/commit?id=786c0dc49dd10b092d1bf6d91223d8e148800146
Comment 14 Sean Davis editbugs 2017-06-14 03:15:14 CEST
Thanks for the patch! Fix applied in the above commit.

Bug #11169

Reported by:
Simon Steinbeiss
Reported on: 2014-09-17
Last modified on: 2017-06-14

People

Assignee:
Sean Davis
CC List:
7 users

Version

Version:
4.11.0

Attachments

patch (2.18 KB, patch)
2017-02-08 03:30 CET , Andre Miranda
no flags

Additional information