Tiny Core Extensions > TCE News

Resizer extension submitted

<< < (2/3) > >>

Rich:
Hi jazzbiker
I wasn't certain whether it would be appropriate to include window manager tags since this isn't a window manager in
the traditional sense. I'd be interested in hearing other opinions on this.

Since I only tested this under flwm_topside, testing by anyone running other window managers would be welcome.
Since window managers don't like to load applications on top of each other, a simple test would be to use the same
command to load an application twice, something like this:

--- Code: ---tce-load -wi Resizer
Resizer -p "editor" -x 200 -y 100 -w 800 -h 600
Resizer -p "editor" -x 200 -y 100 -w 800 -h 600
--- End code ---
You should get 2 identically sized copies of editor, one exactly on top of the other.

Rich:
I realized I left out 2 important options:
1. The original issue vinnie was interested in was forcing a program to start fullscreen.  -f  option added.
2. Since Resizer takes position/size arguments, retrieving that data from windows would be useful.  -D  option added.

The  -D  option displays its data on a single line that is continuously updated.
As you move the mouse across the desktop, it displays and updates the the XY coordinates of the pointer:

--- Code: --- Mouse:X=1073  Y=705   
--- End code ---
When the pointer is over a window, that windows ID and geometry are also displayed:

--- Code: --- Mouse:X=1414  Y=727   Window: ID=0040000c  X=1254  Y=631   W=667   H=420   
--- End code ---
Ctrl-C exits display mode.

The built in usage message has been re-factored to better fit on one screen in a terminal:

--- Code: ---Resizer version 0.20 Jul 11 2021 00:52:22
Copyright Richard A. Rost July 2,2021

Resizer starts a program and then resizes and moves its
window based on the options passed in.

Usage:

  Resizer -p "program args" [-x N] [-y N] [-w N] [-h N] [-f] [-d N] [-b] [-D]

        -p program plus arguments in quotes
        -x X position  -y Y position  -w Width  -h Height
        -f Fullscreen
        -d Delay N seconds, then move/resize window
        -b No window manager present
        -D Display ID and geometry of window under mouse, ^C exits

        Use -d when a program:
                Puts up a splash dialog before its window
                Displays its window and later moves it

        Your screen size is 1920 x 1080

tc@E310:~/C_Programs/Resizer$
--- End code ---

TC12 x86 and x86_64 repos updated with version 0.20 of Resizer.

jazzbiker:
Hi Rich,

Didn't You tried to build Resizer with "-fno-asynchronous-unwind-tables"?

Rich:
Hi jazzbiker
Neither  -fno-asynchronous-unwind-tables  and/or  -fno-unwind-tables  make any difference.

That is probably because I wrote my program in C and this note from the GCC site:

--- Quote ----fexceptions
    Enable exception handling. Generates extra code needed to propagate exceptions. For some targets, this implies GCC will generate frame unwind information for all functions, which can produce significant data size overhead, although it does not affect execution. If you do not specify this option, GCC will enable it by default for languages like C++ which normally require exception handling, and disable it for languages like C that do not normally require it. However, you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in C++. You may also wish to disable this option if you are compiling older C++ programs that don't use exception handling.
--- End quote ---

Although the  .info  file does not show it,  CXXFLAGS  also gets set in my compile scripts:

--- Quote ---CXXFLAGS=-flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -g -pipe -Wall -Wextra -fno-exceptions -fno-rtti
--- End quote ---

jazzbiker:
Hi Rich,

Today when I found that new incredible TC12 rootfs crafted by Juanito is working well on my ancient laptop, I compiled some pure C programs on it. And found them grown compared to themselves under TC10. Then I recompiled them with "-fno-asynchronous-unwind-tables" and they shrank obviously, one of them from 19K to 16K. Now I tried "-fno-exceptions" instead of "-fno-asynchronous-unwind-tables" but programs grew back. If You remember when You proposed this option I was testing vis editor, which is pure C too. Maybe gcc linker (I guess it is linker who implants this unwind tables?) behavior is influenced by dependencies? Both vis and my little program has ncursesw as the dependency. Maybe ncurses are written in C++?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version