hi all, one of the things we need for the plasma netbook shell is to have windows fullscreen most of the time, so be maximized and without borders (title and controls to unmaximize and close are directly into the panel) but keeping the possibility to have not maximized windows with normal borders as usual. a while ago talking with martin we had the idea to use decoration, directly in kdecoration, so here it is..
anoter idea could be modifying window rules to match also geometry, maximized state etc.. another thing we need is to start windows always maximized, for that using a rule could be a good idea, however a problem is that we should maximize only windows with a decoration, because plasma popups are of window type (not dialog, yeah, bad, but kinda needed for drag and drop of extenders) so it could work better to put it in kdecoration too, maybe to be packed with the option of this patch under the name SmallScreenBehaviour config option or something like that? Cheers, Marco Martin
Index: lib/kdecoration.cpp =================================================================== --- lib/kdecoration.cpp (revision 1023932) +++ lib/kdecoration.cpp (working copy) @@ -496,6 +496,11 @@ return d->move_resize_maximized_windows; } +bool KDecorationOptions::noTitleMaximizedWindows() const + { + return d->no_title_maximized_windows; + } + KDecorationDefines::WindowOperation KDecorationOptions::operationMaxButtonClick( Qt::MouseButtons button ) const { return button == Qt::RightButton? d->opMaxButtonRightClick : Index: lib/kdecoration.h =================================================================== --- lib/kdecoration.h (revision 1023932) +++ lib/kdecoration.h (working copy) @@ -323,6 +323,8 @@ */ bool moveResizeMaximizedWindows() const; + bool noTitleMaximizedWindows() const; + /** * @internal */ Index: lib/kcommondecoration.cpp =================================================================== --- lib/kcommondecoration.cpp (revision 1023932) +++ lib/kcommondecoration.cpp (working copy) @@ -169,9 +169,13 @@ left = layoutMetric(LM_BorderLeft); right = layoutMetric(LM_BorderRight); bottom = layoutMetric(LM_BorderBottom); - top = layoutMetric(LM_TitleHeight) + - layoutMetric(LM_TitleEdgeTop) + - layoutMetric(LM_TitleEdgeBottom); + if (options()->noTitleMaximizedWindows() && maximizeMode() == MaximizeFull) { + top = 0; + } else { + top = layoutMetric(LM_TitleHeight) + + layoutMetric(LM_TitleEdgeTop) + + layoutMetric(LM_TitleEdgeBottom); + } updateLayout(); // TODO!! don't call every time we are in ::borders } Index: lib/kdecoration_p.cpp =================================================================== --- lib/kdecoration_p.cpp (revision 1023932) +++ lib/kdecoration_p.cpp (working copy) @@ -200,6 +200,8 @@ changed |= SettingBorder; cached_border_size = BordersCount; // invalid + no_title_maximized_windows = styleConfig.readEntry( "NoBorderMaximizedWindows", false ); + KConfigGroup windowsConfig(config, "Windows"); bool old_move_resize_maximized_windows = move_resize_maximized_windows; move_resize_maximized_windows = windowsConfig.readEntry( "MoveResizeMaximizedWindows", false); Index: lib/kdecoration_p.h =================================================================== --- lib/kdecoration_p.h (revision 1023932) +++ lib/kdecoration_p.h (working copy) @@ -51,6 +51,7 @@ bool show_tooltips; BorderSize border_size, cached_border_size; bool move_resize_maximized_windows; + bool no_title_maximized_windows; WindowOperation opMaxButtonRightClick; WindowOperation opMaxButtonMiddleClick; WindowOperation opMaxButtonLeftClick;
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel