The patch appears in fltk up until fltk-1.3.11.flwm builds without problem against fltk-1.3.11.
The patch will not apply to fltk-1.4.1 as the structure has changed, for example, FL/x.H is depreciated.
I'm assuming that as flwm only wants to use the x11 part of the fltk-1.4.1 x11/wayland libs there must be a higher level call to do this?
Note that I am speaking of the flwm source from here: http://git.tinycorelinux.net/flwm and yes, I am one of the tinycorelinux development team, but I am not familiar with c++ coding.
Thanks for the feedback on rotated text.
CPPFLAGS=-DHAVE_XFT CXXFLAGS=-flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti -I/path/to/fltk/1.3/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -Wall -ffunction-sections -fdata-sections -Wno-strict-aliasing LDFLAGS=-Wl,-O1 -L/path/to/fltk/1.3/lib -lfltk_images -ljpeg -lpng -lz -lfltk -lm -lX11 -lXext -lpthread -lXinerama -lXfixes -lXcursor -lXft -lXrender -lm -lfontconfig -ldl -Wl,-gc-sections Building flwm... Building flwm_topside...The log from building with 1.4 is similar, just using another "/path/to/fltk/1.4/".
I applied the attached patch to restore access to function fl_X_core_font() to fltk-1.4.1, rebuilt it and built flwm against the re-built fltk-1.4.1, but it fails with:
```Building flwm...
/usr/local/bin/ld: /tmp/ccueWJcu.ltrans0.ltrans.o: in function `draw_rotated(char const*, int, int, int, int)':
<artificial>:(.text._Z12draw_rotatedPKciiii+0x79): undefined reference to `fl_X_core_font()'
/usr/local/bin/ld: <artificial>:(.text._Z12draw_rotatedPKciiii+0xd2): undefined reference to `fl_X_core_font()'```
Note that I am speaking of the flwm source from here: http://git.tinycorelinux.net/flwm and yes, I am one of the tinycorelinux development team, but I am not familiar with c++ coding.
Thanks for the feedback on rotated text.
AFACT it depends on what you want or need. The included build script uses wildcards ('*.C') which obviously compiles "everything" to be able to use the rotated window labels. I didn't check if using Xft needs more or less of these files but my (so far unchanged) build file (`compileit`) looks like this for building 'flwm'.
However, when building 'flwm_topside' Rotated.C is not needed which I changed in my local version (using only 6 of 7 C files):echo Building flwm...g++ -o flwm *.C $CXXFLAGS $LDFLAGS $CPPFLAGSsstrip flwm
In my build Xft is used, but as you say, Ian, there may be other simplifications depending on having Xft or not ...echo Building flwm_topside...g++ -o flwm_topside -DTOPSIDE \Desktop.C Frame.C FrameWindow.C Hotkeys.C main.C Menu.C \$CXXFLAGS $LDFLAGS $CPPFLAGSsstrip flwm_topside
Thanks for all of the feedback - in fact flwm works with both the patched Rotated.C and with Rotated.C deleted.
If a window is enlarged sideways then border disappears on the new portion of the window.If I use the mouse wheel to scroll in the left hand side of a two pane window, the right hand side scrolls as well.
- For the "enlarged sideways" observation, I assume that is the portion of black (rather than grey) border seen on the foreground window (and the console window behind it)
Does this app behave in this fashion when run under a different WM? Is the behaviour peculiar to flwm environment?
Can you produce a minimal compile-able, stand-alone, example that exhibits this behaviour that we can take a look at?
Just to add to the above:The lack of window border redraw on enlargement only happens with x11/flwm and not with x11/jwm, wayand/weston or wayland/labwc
The scrolling in both LF and RH panes happens with all of the above.
The lack of window border redraw on enlargement only happens with x11/flwm and not with x11/jwm, wayand/weston or wayland/labwcOK - so that sounds like something in flwm then - it is responsible for border drawing, so there must be something it is "not doing", or "not doing correctly" that causes this.Does it work correctly if you build flwm with fltk-1.3.11 or fltk-1.3.10 or do they also exhibit this effect?In any case, I suspect it means *someone* will have to dive into the flwm sources and figure out how it handles border redraws... (And by *someone* I mainly mean "not me!" here...)
The scrolling in both LF and RH panes happens with all of the above.So the weird scrolling happens regardless of WM?That does sound an awful lot like a problem in the application code itself, then, as I had earlier thought it might be.Does (did) that application exhibit this misbehaviour when linked against fltk-1.3.10?Or is this a new app?Or new misbehaviour?
fltk-1.4.1 was built like this:cmake -LAH -DCMAKE_C_FLAGS_RELEASE="-flto -mtune=generic -Os -pipe -Wl,-T/usr/local/lib/ldscripts/elf_x86_64.xbn" -DCMAKE_CXX_FLAGS_RELEASE="-flto -mtune=generic -Os -pipe -fno-exceptions -fno-rtti -Wl,-T/usr/local/lib/ldscripts/elf_x86_64.xbn" -DCMAKE_INSTALL_PREFIX="/usr/local" -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE -DFLTK_BUILD_SHARED_LIBS=ON -DFLTK_BUILD_GL=OFF -DFLTK_BUILD_TEST=OFF -DFLTK_OPTION_PRINT_SUPPORT=OFF ../..which gave:-- Use Wayland Yes (can also run as X11 client)-- All drawing uses Cairo Yes-- Use Pango Yes-- Fl_Cairo_Window support No-- Use std:: No
I needed to use this:-DFLTK_BUILD_GL=OFF -DFLTK_BUILD_TEST=OFF -DFLTK_OPTION_PRINT_SUPPORT=OFF -DFLTK_BACKEND_WAYLAND=OFF -DFLTK_GRAPHICS_CAIRO=OFF -DFLTK_USE_PANGO=ONto get this:-- Use Wayland No (X11 is used)
-- All drawing uses Cairo No
-- Use Pango Yes..but then, yes, the window borders redraw properly.So the problem is with using cairo?
The intention is that the replacement of the X11 drawing API by Cairo is invisible for an FLTK client app.It should be good to look for why that's not so with flwm.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/CAGFM6dapQRZqJ5_%3DgJr5cpkNjpmOiWtNs%2BUF0W0cTL3XdPPYEA%40mail.gmail.com.
>> You may want to keep building FLTK with -DFLTK_BACKEND_WAYLAND=OFF -DFLTK_GRAPHICS_CAIRO=OFF -DFLTK_USE_PANGO=ON>> to build flwm.>> Then FLTK may be built with default options for FLTK-based client apps of the flwm manager.I tried the version of flwm compiled against the x11-only version of fltk with the full x11/wayland version of fltk, but the window border problem is still there.
Looks like Cairo is still clipping to the previous size of the window. Maybe there is some way to tell Cairo to update the drawing area.
..but it doesn't fix things properly - if I enlarge a window, the border redraws properly, but if this window overlaps another window and I switch the focus to that window its border is not drawn properly. Clicking on the second window or moving it redraws the border properly.
> Until that is done, it might be possible to build flwm with FLTK 1.4 statically linked (that's essential)> without Cairo and to use it to decorate Cairo- and Pango-using FLTK 1.4 client apps
I tried that and it works :)
The only problem is that the flwm executable is 10x bigger :(
Hmm, I must've missed something skim reading this thread, but
what's the reason for ensuring static linking?
Given Tinycorelinux's goal is to keep executable binaries
small by leveraging dynamic libs, curious what problem is avoided
by static linking flwm? I assume it's more than the usual runtime
"missing lib" issues, as I'm sure tinycorelinux can pre-package
the "correct" fltk libs for its flwm installation)
Is it because fltk tries to pre-load dynamic libs unless
statically built that is causing issues with flwm?
(That's all I could think of)
<flwm digression>
FWIW, I used to regularly use a hotrodded version of flwm as
my window manager for at least a decade or so, and loved it for
/just/ being a simple, clean window manager.
The hotrodding was to remove the rotated text and sideways
window borders (which I never liked, sorry Bill :D), and made the
window borders/colors/hotkeys more IRIX/SGI-like, and made some
changes to the right-click menu to make it easy to run common
applications I needed like Thunderbird, Firefox, Gvim, Folder
browsers, Terminals, Gimp, clocks, calculator, flruler etc.
I also had to make some tweaks to support the newer window
manager protocols because it caused problems for some
applications. I remember having to dive deep into the common linux
desktop design documents to figure that stuff out, I think it was
related to iconization or resizing, window titling, or some such.
(shrug)
But somewhere along the line about 6 or so years ago, I had
trouble getting flwm to build/run, and found that to assist my
software customers, it helped if I used the default window
managers instead of flwm.
I also noticed the newer window managers seem to have solved
the many pesky issues that made me move to flwm, specifically
default window manager background "support daemons" that would
randomly go bananas and use 100% cpu or swap out the machine
overnight due to memory leaks. That drove me crazy every time I'd
try a new linux distro/release, and pressured me to keep using
flwm.
But when using flwm, I did notice without those support
daemons, many large applications would whine and moan about the
support daemons not being present. Something about clipboards,
sound, and other weird things would cause the gnome folder
browsers and large word processors/spreadsheets to spew warnings
and misbehave in odd ways. Minor issues I was able to workaround,
but annoying. In some cases I figured out how to start those
daemons when needed, but then they'd go crazy and I'd have to kill
them to restore sanity.
It's possible one of the issues that caused me to move from
flwm back to default window managers was I couldn't get it to
build against fltk 1.4.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/39698c57-963a-4f06-9773-38d18a396769%40seriss.com.
On 2/21/25 07:07, gutmensch tinycorelinux wrote:
> Until that is done, it might be possible to build flwm with FLTK 1.4 statically linked (that's essential)> without Cairo and to use it to decorate Cairo- and Pango-using FLTK 1.4 client apps
I tried that and it works :)
The only problem is that the flwm executable is 10x bigger :(
Hmm, I must've missed something skim reading this thread, but what's the reason for ensuring static linking?
I think flwm was overriding resize() to avoid the redraw() call, possibly to avoid the display blinking (which is irrelevant for Cairo as it is double-buffered).
Hmm, I must've missed something skim reading this thread, but what's the reason for ensuring static linking?
> Until that is done, it might be possible to build flwm with FLTK 1.4 statically linked (that's essential)> without Cairo and to use it to decorate Cairo- and Pango-using FLTK 1.4 client appsI tried that and it works :)The only problem is that the flwm executable is 10x bigger :(
The staticly linked flwm is 553k, the dynamically linked flwm is 51kb, both sstripped
> More generally, FLTK 1.4 is guaranteed to be compatible with FLTK 1.3 for pure FLTK clients.> But flwm is not a pure FLTK client app. It's a window manager that uses extensively the X11 API> in addition to the FLTK API. Consequently, what it does is susceptible to be affected by the> internal differences between FLTK 1.4 and 1.3. The code needs to be reviewed by someone> who understands all its use of the X11 API. Few changes are probably necessary, but one> has to find them.
Would you have any pointers for finding the few changes necessary?
So here's my goal: I would like to update the window frame decoration to use the scaling factor implied by .Xdefaults Xft.dpi (as the ratio with 96.0) or the environment variable appropriately. As it is built now, FLWM when launched with FTLK_SCALING_FACTOR=1.0 (or Xft.dpi=96.0), the title bars look ok and the window management buttons to iconize, resize, and close the window are placed correctly. And when the scaling change is made by a user with the hotkeys, the window content and overall shape scales beautifully (well done, devs!), but the title bar stays the same thickness, which would be fine except for the following issue...
When FLWM is started with FTLK_SCALING_FACTOR > 1.0 (or Xft.dpi > 96.0), the title font scales up, but the bar thickness does not scale up. This causes the title characters to be clipped. Even worse, the window management buttons disappear, at least for most typical-sized windows.
Manolo: Thanks for taking the time to outline a good approach to making the WM more adaptive. Even before I saw this, I was doing several of these steps already, but you gave me a few more things to think about. I have fairly reasonable window frame appearance now, including button layout, but the window resizing and positioning functions are working very poorly right now because I'm not yet "unscaling" some key parameters passed into certain X Windows calls.
--Mike
OK, I can try that out. Maybe the TinyCore core team would be happy with a version that is more limited but predictable as you suggest for their base window manager, but can offer a high DPI version in the repo for users like me that want a bit more control & customization ability. Here's a screen shot of my WIP for the "more work" approach.
UPDATE: I seemed to solve the issue I noticed. In the "topside" builds of FLWM, the minimize-window button event intends to make the window appear as the horizontal titlebar only (a horizontal strip), but the classic FLWM code is intended to only minimize windows into a vertical titlebar strip, therefore the code that decides whether to unmap the frame's client window was only looking for "is this now a thin vertical strip?" criteria. After I made it sensitive to resizing into either a vertical or horizontal strip, it will unmap the app client window, so it works. I also check the values from computing what the overall new height/width should be in the minimized state, and reset them to a small positive value if any is negative. I'm not 100% certain I need to do this, but it prevents a warning from lower graphics libs and does not seem to harm anything as far as I've been able to see.
Example of classic FLWM style with a few minimized windows (Firefox, Geany, and a file manager named Fluff)