Giter Club home page Giter Club logo

Comments (7)

jakecoble avatar jakecoble commented on August 18, 2024

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.

Spacur avatar Spacur commented on August 18, 2024

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:
2021-03-27-200248_750x203_scrot

The output of ANY WINDOW that is not Emacs is shown consistently as follows:
pcman

However, Emacs :

Once it is opened and not fully loaded, it gives the correct height.
emacscorrect

Fully opened and the height changes by 5 pixels for some reason.
emacsloaded

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.

haoxiangliew avatar haoxiangliew commented on August 18, 2024

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.

podiki avatar podiki commented on August 18, 2024

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.

heiwiper avatar heiwiper commented on August 18, 2024

why did no one submit a PR to fix this issue ?

from stumpwm-contrib.

podiki avatar podiki commented on August 18, 2024

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.

heiwiper avatar heiwiper commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.