lxde / lxterminal

VTE terminal emulator written in GTK
GNU General Public License v2.0
161 stars 57 forks source link

LXTerminal ignores XOFF and YOFF parts of argument to --geometry #63

Open m5w opened 5 years ago

m5w commented 5 years ago

See the "Geometry Specifications" section of man 7 x for more information. In particular:

Although the layout of windows on a display is controlled by the window manager that the user is running (described below), most X programs accept a command line argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and location for this application's main window.

While LXTerminal determines the number of rows from the HEIGHT part and the number of columns from the WIDTH part, including XOFF and YOFF parts of different values has no effect on the terminal window's position. For example, lxterminal --geometry=80x24+0+0 should position a terminal window at the top left of the desktop, while lxterminal --geometry=80x24-0-0 should position a terminal window at the bottom right of the desktop.

m5w commented 5 years ago

I took a look through the Xfce Terminal codebase:

https://github.com/xfce-mirror/xfce4-terminal/blob/5de7789b2303b93f02dbfb59aa6a3e38c02ee760/terminal/terminal-app.c#L835

https://github.com/xfce-mirror/xfce4-terminal/blob/5de7789b2303b93f02dbfb59aa6a3e38c02ee760/terminal/terminal-app.c#L895

It looks like this is a fairly simple problem to solve with XParseGeometry and gtk_window_move.