-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Icons on the root window don't always refresh when damaged or displayed #818
Comments
I suspect this is related to #693 |
Merely Maximize and un-maximize doesn't cause any issues for me, and the problem in #693 sounds somewhat different in that my icons definitely don't get repainted either (or painted at all; where they should be is the root window background). But icon failure-to-repaint certainly does sound related. I just checked my configuration and my current configuration does 'Iconify off' to de-iconify things. Since this happens on deiconification but not when I just move the mouse off an icon with icon text that's extended to damage a neighboring icon, it feels like fvwm3 is losing track of some work it has to do (or not noticing it). |
It's the same underlying cause. I can't reproduce your scenario though in the way you've put it, but I can in #693 though -- so knowing this is related is important to me when I diagnose this further. |
Well, I managed to bisect this problem to this commit: 5c17c83 I wonder if the following fix is correct:
I think by setting |
I think that this change wouldn't work and in fact would be dangerous. |
The other oddity I see in FCheckPeekIfEvent() and what it calls is that if there are multiple events of the same type in the event queue, I think it returns the last such event, because |
A third oddity: the return value of My very rough guess is that |
Send a patch, @siebenmann. |
I don't know of @domivogt is about, but he will be able to help. If not, I'll have to look at this at the weekend. |
I will see if I can understand this code well enough to create a patch that won't subtly break everything, but I'm not certain I will be able to. The event handling here is deep waters in both fvwm and libX11 and I'm not familiar with either. The code doesn't look correct to me as it is but I don't know how to fix it so that it works, in part because every simple fix seems likely to have side effect consequences (eg, consuming only one Expose event in the code called by handle_all_expose(), which seems maybe bad). My guess is that FWeedAndHandleIfEvents() may need a major reconstruction so that it makes multiple passes over the events, each time retrieving one event to handle and calling the handler function. But that looks like a big infrastructure change and possibly a new API for the function instead of the FWeedIfEvents() one. That assumes that all Expose events have to be handled individually, instead of only doing one at the end. |
I'm currently running a fvwm3 built with this frankly terrifying hack patch and it hasn't exploded and doesn't seem to have any of the expose issues. Given the code duplication (eg
|
Some comments. First, I have to correct myself about FCheckPeekIfEvent(); it always returns the first matching event, skipping all the rest of them. This means you could use it to implement my 'repeatedly call handler' approach to FWeedAndHandleIfEvents(), but you'd have to invalidate the event after calling the handler function, probably with FEV_INVALIDATE_EVENT(), because otherwise that first event would just get returned over and over. I'm not sure which approach would be better, my direct calls to XCheckIfEvent() (which will pull the event out of the queue), or a version with calls to FCheckPeekIfEvent() and leaving invalidated events in the queue. |
|
I'm also experiencing the same/similar problems on the latest fvwm3, and other/previous fvwm3 and fvwm2 versions.
Unrelated: Thanks for fixing It is my belief that nothing in the following config file is required to demonstrate the problem. It was created to remove any potential side effects causes, to provide a clear visible demonstration, and for use in recreating the video demo if desired.
The attached "icon_redraw.ogv" should be self-explanatory, but in an effort to err on the side of too much information rather than too little: 0:00 Immediately after starting FVWM, first icon's pixmap is missing and label is blank. I have tested on three separate systems, each with different graphics hardware and drivers (
in I can do further testing and/or build new releases if desired. Unfortunately I don't have the time (nor likely the ability) to dive into the code and provide fixes/patches/pull-requests. I realize this is a fairly benign problem, but the visual distraction of the mis-drawn icons has me constantly moving the mouse and/or de-/re-iconifying windows to fix them. |
This annoying issue is also present in new fvwm3 1.0.8 version too, |
Appreciate the comments -- but this isn't helping me -- the information I have now isn't anything new. |
My patch from January (in the comment above) continues to work for me without problems. |
Indeed -- I need to properly review that. It's on my (rather lengthy) TODO list. |
Here is Debian 12 "xthread_fix.patch". With this patch applied,
mentioned by @thanks4opensource With this patch applied, FVWM stops crashing, but icons are starting to disappear on Restart
|
I'm not following you -- this has been applied to fvwm3 for a while. What is it you're trying to say? |
Yes, I'm pretty sure that this was applied to fvwm3 too, as this issue exist in Debian 12 fvwm3 package too. |
@111LUX This isn't the place to be discussing fvwm2. That has a separate issue tracker. Please stop polluting this issue. |
At the risk of this being considered redundant/spam, I'd like to report that I applied the patch to Looking forward to seeing it or something similar in the main branch when scheduling and priorities allow. Also curious to know, when the dust settles, if this was:
Reason: I'm hoping to avoid Wayland for the rest of my natural lifespan, but if X11 isn't being maintained (which I've read it isn't) and/or what little work it's getting is causing bugs and breaking applications, I'll have to rethink my position. Thanks again for the responses here and for FVWM and its active ongoing development. |
It's a change which was made to Xlib. |
To extend on @ThomasAdam 's answer, the trigger condition for this issue in fvwm3 was a change made in Xlib/libX11 1.8, where they decided to insist on thread safety even in single-threaded programs. Things promptly started crashing (for example) and code was updated to work around the problem, including in fvwm3. However, the fvwm3 code change had oversights of its own, such that sometimes it didn't properly recognize and react to all X events it got. This could leave you with, for example, un-refreshed icons under some circumstances, when fvwm3 received the 'refresh this' event but lost track of it internally. Had fvwm3 not have to rewrite and change code written under the previous implicit libX11 API, this problem wouldn't have arisen. |
Where it is located? As it is impossible to create an issue in fvwmorg/fvwm for now. From my perspective, something not very good and very inadequate is happening with whole FVWM project now, and it is very sad, as my main reasons, why I've chosen FVWM years ago and started to create my own config from scratch, were its stability and my confidence in its future, mostly because of its oldschool background. For now it's very difficult to say what kind of glitch will appear tomorrow, and also, who are the target fvwm3 audience, kids on drugs? When so many funny fvwm3 bugs appears in its latest releases. What is for sure and 100%, is that it is impossible to consider fvwm3 as a full value fvwm2 replacement for now, and at least, while it's not happened yet, fvwm2 should be actively supported and maintained. P.S: When manually applied xthread_fix.patch |
I think you're being rather melodramatic here, @111LUX -- and certainly this issue doesn't introduce anything near the same levels of instability I've seen in fvwm over the years -- and that's not just with the changes I've made to fvwm3. All software has bugs, and so far, aside from various visual glitches this particular bug refers to, I've not heard of any instabilities associated with it. You can either help by sending in additional bug reports here, for fvwm3, or if possible, PRs (Pull Requests) would be even more welcomed -- any other observations or concerns you're having with the stability of fvwm3 doesn't belong as additional comments here on this bug report. I chose to let fvwm2 sit as-is because trying to introduce breaking changes to it was unfair in that state. You are, of course, free to continue to use fvwm2, but since it's been formally deprecated, you can either fork it and backport any changes you like (something which some distribution packagers are doing), or continue to use fvwm2 as-is. But please don't tell me fvwm2 should be supported -- that's not your call, and it's not something that's going to happen either. |
Have been using fvwm3 since some time, and I can say, with @siebenmann's patch, it's working pretty well, including icons and stability. |
This was a fix in libxft, fvwm didn't really do anything to make that work.
Colorsets have been the preferred way of setting colors for a long time, and the old color methods have been removed. |
Unfortunately, this problem is still exist in 1.0.9 version. |
That's right. I've not fixed it yet. |
I am experiencing this issue as well with fvwm3 1.1.0. |
Upfront Information
Please provide the following information by running the command and providing
the output.
Fvwm3 version (run:
fvwm3 --version
)fvwm3 1.0.7 (1.0.6a-1-g8670b593)
with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, Bidi text,
XRandR, XRender, XCursor, XFT, NLS
Linux distribution or BSD name/version
Fedora 36 (but also on Fedora 37)
Platform (run:
uname -sp
)Linux x86_64
Expected Behaviour
I use icon-on-root iconified windows with 'IconBox none'. Some of the time when an icon is created or damaged, fvwm3 doesn't repaint the icon and/or the icon title. One of the things that will trigger this is de-iconifying an icon (via a mouse click on it in my setup) where the icon or the expanded icon title overlaps with another icon beside it. The section that the icon or icon title overlapped will not be repainted. Another reproduction appears to be creating iconified windows in a burst. I have a test Wish program for a libX11 related issue that opens two iconified windows in fixed position, and when I run it under fvwm3 the second icon isn't painted either for the icon or for the icon title.
(I use 'Style "*" Icon xlogo32', so xlogo32 is the icon used for both icons. This occurs for other programs with their own icons, such as Firefox.)
Here is that program:
Bringing the mouse cursor to such a non-repainted icon or title will repaint it properly, as will various things that cause large scale refreshes (switching to another virtual screen, putting a window over the area of the icons, etc).
Unfortunately nothing is reported in fvwm3's logging. This issue didn't happen in fvwm2.
The text was updated successfully, but these errors were encountered: