native.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:hide-ff-title-bar 作者: GKFX 项目源码 文件源码
def hide_title_bar(proc_name, when_to_hide_title_bar, continuous=CONTINUOUS):
    """Conditionally hide title bar of the respective process."""

    result = None
    decoration = None

    if when_to_hide_title_bar == WhenToHideTitleBar.ALWAYS:
        decoration = Gdk.WMDecoration.BORDER
        result = True
    elif when_to_hide_title_bar == WhenToHideTitleBar.MAX_ONLY:
        result = False
    elif when_to_hide_title_bar == WhenToHideTitleBar.NEVER:
        decoration = Gdk.WMDecoration.ALL
        result = True

    if continuous:
        continuous_decoration(proc_name, decoration).join()
    else:
        decorate_windows(proc_name, decoration)

    return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号