Comments (7)
Are you using the mode-line and getting the additive inverse of your mode-line height? (e.g. My mode line is 20 pixels high, so I was getting -20.) The frame height doesn't include the mode line, so I was getting crashes until I changed it to (stumpwm::frame-display-height (window-group win) frame)
instead. Not sure why it's less consistent for you, but that might fix it.
from stumpwm-contrib.
I'd like to make a follow up, the fix listed by @jakecoble DOES WORK. However, (I'm not sure if this is related with changing a font in emacs, that may also cause it despite the supposed fix), when launching Emacs specifically, it will still crash. It seems Emacs for me is managing its size in some way, and emacs used to do this on other distributions and window managers, leaving blank space even if fullscreen in the bottom and right corners. I added a message to debug the output of the height variable once its subtracted the modeline height. As seen here:
The output of ANY WINDOW that is not Emacs is shown consistently as follows:
However, Emacs :
Once it is opened and not fully loaded, it gives the correct height.
Fully opened and the height changes by 5 pixels for some reason.
This change is I believe why Emacs is returning a negative height value.
I'm no lisp hacker, so I'm not sure how to deal with this without a hacky approach to check specifically for Emacs or something. I still have yet to check it with other windows that may change its geometry on itself. I'm curious if there are any mitigations against this, perhaps atleast putting a request on the main stumpwm repo to atleast get "(set-window-geometry win :x wx :y wy :width width :height height :border-width 0)" to exit gracefully if receives a negative value if not done already. Window Managers like AwesomeWM and such which i've tried has handled this, despite retaining the broken geometry. I'd like to repeat again that this was not a one time Emacs error with my system, I have had this issue persist across various linux distributions, and emacs distributions ranging from doom emacs, spacemacs and my own handrolled configuration.
If anyone has this problem, I hope this at least serves as useful.
from stumpwm-contrib.
The fix by @jakecoble works and tested in my fork of stumpwm-contrib.
As for @Spacur 's problem, I have encountered this bug in Emacs where setting certain font sizes in Emacs can cause crashes. Setting (setq frame-resize-pixelwise t)
fixes all problems (including the border that appears with Emacs's window) for me, as well as trying out fractional font sizes, as I think Emacs and StumpWM is calculating font sizes incorrectly (ex. 10 -> 10.5).
from stumpwm-contrib.
Sorry I didn't follow up here (haven't used Stump in a while). I also had I think the same problem with Emacs (crashing with some fonts or font sizes). Perhaps I should come back to Stump, but unfortunately stumpwm/stumpwm#763 was a blocker (I rarely need multiple monitors, but certainly don't want it crashing when I do).
from stumpwm-contrib.
why did no one submit a PR to fix this issue ?
from stumpwm-contrib.
Happy to help debug/test, just came back to StumpWM. I haven't experienced this crash again though, but I'll be on the look out. Do we have a current reproducer?
from stumpwm-contrib.
I don't really recall what was the issue in the first place, but I remember that this is how I fixed it.
Here's the diff from the link:
- (>= height (- (frame-height frame) oh)))
+ (>= height (- (stumpwm::frame-display-height (window-group win) frame) oh)))
from stumpwm-contrib.
Related Issues (20)
- Suggestion: add tests to stumpwm-contrib using FiveAM or otherwise HOT 1
- swm-gaps can crash stumpwm with negative size windows HOT 6
- [winner-mode] Winner mode seems broken on stumpwm master HOT 1
- stumptray can't load in my environment HOT 1
- ttf-fonts can't be loaded due to broken dependency. HOT 2
- Stumptray issues - icons visibility and desappearance HOT 1
- CPU - modeline/cpu display '%c' instead of it's value HOT 2
- Variable for module titles in modeline? HOT 2
- stumpwm-backlight breaks with clx-20200715-git with "odd number of &KEY arguments" HOT 1
- Document simple example usage sequence
- winner-mode shows message "Group dumped" on every window switch. HOT 1
- Productivity module issues leading to extreme unproductivity HOT 4
- module variables not getting set HOT 6
- stumpwm-dmenu stops loading with error (xEMBED) HOT 1
- cpu module broken by a commit HOT 1
- mem-modeline-fmt should be external HOT 2
- clim-modeline: redisp fails with error.
- SWM-Gaps crashes Stumpwm on resize.
- Move commands for spatial-groups HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stumpwm-contrib.