lxterminal icon indicating copy to clipboard operation
lxterminal copied to clipboard

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

Open m5w opened this issue 7 years ago • 1 comments

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 avatar Dec 29 '18 09:12 m5w

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.

m5w avatar Dec 29 '18 10:12 m5w