Skip to content
Snippets Groups Projects
Commit edcb5d38 authored by fgorter's avatar fgorter Committed by Renato Botelho
Browse files

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")
parent b1818b56
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
PORTNAME= gmrun
PORTVERSION= 0.9.2
PORTREVISION= 13
PORTREVISION= 14
CATEGORIES= x11
MASTER_SITES= SF
......
--- 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
--- 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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment