Skip to content

Option for disabling window shadows #1301

Closed

Description

@VonbatenBach

Hi, I've been wondering if it would be possible to add an option in Preferences tab to additionally tweak appearance of the macvim windows. We already have options for transparent titlebars and removing them. It would be nice to have an option to disable default macOS shadows around edges of an active window. I don't know whether it is even possible, but these shadows are often irritating when we place a macvim window near a pdf viewer for instance. Sometimes it would be much better to have a "cleaner", more minimalistic appearance.

Activity

  1. eirnym commented on Oct 2, 2022

    @eirnym
    Contributor

    StackOverflow recommends WinBuddy macforge plugin for removing shadows from windows

    Also, it's notable to cite a comment under the answer I found

    BTW some tools like iTerm2 tries to disable this, " /*! Disables shadows on all windows. */ kCGSDebugOptionNoShadows = 0x4000, " but apple decided at some point, no, everyone likes shadows. All the tools seem to try the same approach and hence they are all bust

  2. VonbatenBach commented on Oct 2, 2022

    @VonbatenBach
    Author

    Yeah, the problem is that these projects (basically relying on MacForge) seem to be not developed anymore and they rely on changing parameters "externally". I've been wondering whether it is possible to change such properties of windows from the level of source code of a given app.

  3. eirnym commented on Oct 2, 2022

    @eirnym
    Contributor

    The mentioned comment shows, that it set in iTerm2, but doesn't work

  4. eirnym commented on Oct 2, 2022

    @eirnym
    Contributor

    Tested the latest iTerm2 on Monterey (12.6) and I see shadows having any option set.

  5. eirnym commented on Oct 2, 2022

    @eirnym
    Contributor

    I'm not against the option, just I prefer not to have this option if it won't work.

  6. added this to the Release 175 milestone on Oct 2, 2022
  7. added
    UIIssues related to UI elements, tabs, scrollbars, window resizing, etc.
    on Oct 2, 2022
  8. ychin commented on Oct 2, 2022

    @ychin
    Member

    Wow I have to say eventually for every single flag on an NSWindow there will be someone filing an issue requesting for it to be configurable haha.

    Tested the latest iTerm2 on Monterey (12.6) and I see shadows having any option set.
    I'm not against the option, just I prefer not to have this option if it won't work.

    There is clearly a supported option to do this (https://developer.apple.com/documentation/appkit/nswindow/1419234-hasshadow?language=objc).

    Those threads talking about using MacForge etc are talking about how to do this globally and disabling other apps' shadows. If the app voluntarily do this there shouldn't be an issue.

    Let me think more about this but I don't see any reason why I wouldn't add it, as its impact is small. If nothing goes wrong this will probably go into the next release.

  9. VonbatenBach commented on Oct 2, 2022

    @VonbatenBach
    Author

    This would be great! :)

  10. added a commit that references this issue on Oct 2, 2022
    87fbab9
  11. eirnym commented on Oct 3, 2022

    @eirnym
    Contributor

    @ychin Nevertheless, I was unable do disable shadows on my macOS instance

  12. added a commit that references this issue on Oct 3, 2022
    66949a2
  13. ychin commented on Oct 3, 2022

    @ychin
    Member

    Nevertheless, I was unable do disable shadows on my macOS instance

    Sure, but I think that's because you are trying to change another app's shadows, not an app voluntarily doing so. The OS is blocking the ability to modify another app's behavior, for bitter or worse. In this case we are voluntarily saying we don't want drop shadows which is fine and supported by the API. I just committed the option to do this, feel free to try it out.

  14. added a commit that references this issue on Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIIssues related to UI elements, tabs, scrollbars, window resizing, etc.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions