mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
decorations: make has_ssd public
This commit is contained in:
parent
7761d11dae
commit
d5f39c2ea0
3 changed files with 33 additions and 31 deletions
|
|
@ -13,6 +13,38 @@
|
|||
#include "ssd-internal.h"
|
||||
#include "theme.h"
|
||||
#include "view.h"
|
||||
#include "window-rules.h"
|
||||
|
||||
bool
|
||||
has_ssd(struct view *view)
|
||||
{
|
||||
/* Window-rules take priority if they exist for this view */
|
||||
switch (window_rules_get_property(view, "serverDecoration")) {
|
||||
case LAB_PROP_TRUE:
|
||||
return true;
|
||||
case LAB_PROP_FALSE:
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* view->ssd_preference may be set by the decoration implementation
|
||||
* e.g. src/decorations/xdg-deco.c or src/decorations/kde-deco.c.
|
||||
*/
|
||||
switch (view->ssd_preference) {
|
||||
case LAB_SSD_PREF_SERVER:
|
||||
return true;
|
||||
case LAB_SSD_PREF_CLIENT:
|
||||
return false;
|
||||
default:
|
||||
/*
|
||||
* We don't know anything about the client preference
|
||||
* so fall back to core.decoration settings in rc.xml
|
||||
*/
|
||||
return rc.xdg_shell_server_side_deco;
|
||||
}
|
||||
}
|
||||
|
||||
struct border
|
||||
ssd_thickness(struct view *view)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue