Date: Fri, 25 Feb 2022 12:18:03 GMT From: Renato Botelho <garga@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: edcb5d3860b7 - main - x11/gmrun: Fix position on multihead Message-ID: <202202251218.21PCI3if010611@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by garga: URL: https://cgit.FreeBSD.org/ports/commit/?id=edcb5d3860b77b8df6995a17cbdcee75bca5ae70 commit edcb5d3860b77b8df6995a17cbdcee75bca5ae70 Author: fgorter <fgorter@gmail.com> AuthorDate: 2022-02-25 11:52:56 +0000 Commit: Renato Botelho <garga@FreeBSD.org> CommitDate: 2022-02-25 11:52:56 +0000 x11/gmrun: Fix position on multihead Add a patch to make gmrun to show on current desktop instead of a static place to help people using it on multihead environment. PR: 259115 Obtained from: https://aur.archlinux.org/cgit/aur.git/tree/center-and-multihead.patch?h=gmrun-multihead Sponsored by: Rubicon Communications, LLC ("Netgate") --- x11/gmrun/Makefile | 2 +- x11/gmrun/files/patch-config_gmrunrc | 12 ++++++++++++ x11/gmrun/files/patch-src_main.cc | 22 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/x11/gmrun/Makefile b/x11/gmrun/Makefile index 1f4fc7d2422b..e0573f4c466a 100644 --- a/x11/gmrun/Makefile +++ b/x11/gmrun/Makefile @@ -2,7 +2,7 @@ PORTNAME= gmrun PORTVERSION= 0.9.2 -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= x11 MASTER_SITES= SF diff --git a/x11/gmrun/files/patch-config_gmrunrc b/x11/gmrun/files/patch-config_gmrunrc new file mode 100644 index 000000000000..fce12f75759a --- /dev/null +++ b/x11/gmrun/files/patch-config_gmrunrc @@ -0,0 +1,12 @@ +--- config/gmrunrc.orig 2003-11-16 10:43:41 UTC ++++ config/gmrunrc +@@ -7,7 +7,8 @@ Terminal = gnome-terminal --start-factory-server --use + TermExec = ${Terminal} -e + AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man + +-# Set window geometry (except height) ++# Set window geometry (except height). ++# Top / Left = -1: Center dialog box in the current screen. + Width = 400 + Top = 100 + Left = 200 diff --git a/x11/gmrun/files/patch-src_main.cc b/x11/gmrun/files/patch-src_main.cc new file mode 100644 index 000000000000..822c0d6061c3 --- /dev/null +++ b/x11/gmrun/files/patch-src_main.cc @@ -0,0 +1,22 @@ +--- src/main.cc.orig 2003-11-16 10:55:07 UTC ++++ src/main.cc +@@ -541,7 +541,6 @@ int main(int argc, char **argv) + gtk_widget_set_name(win, "Msh_Run_Window"); + gtk_window_set_title(GTK_WINDOW(win), "Execute program feat. completion"); + gtk_window_set_policy(GTK_WINDOW(win), FALSE, FALSE, TRUE); +- // gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER); + gtk_container_set_border_width(GTK_CONTAINER(win), 4); + gtk_signal_connect(GTK_OBJECT(win), "destroy", + GTK_SIGNAL_FUNC(gtk_main_quit), NULL); +@@ -653,7 +652,10 @@ int main(int argc, char **argv) + } + else + { +- gtk_widget_set_uposition(win, prefs_left, prefs_top); ++ if ((prefs_top == -1) && (prefs_left == -1)) ++ gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER); ++ else ++ gtk_widget_set_uposition(win, prefs_left, prefs_top); + } + + gtk_widget_show(win);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202251218.21PCI3if010611>