Fixing borderless windows for KDE Plasma
- Dominant language
- C
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Borderless windows currently doesn't work on KDE plasma. The following chunks of code, pulled from `feh` is how it implements borderless windows, and it works on KDE.
```
typedef struct _mwmhints {
unsigned long flags;
unsigned long functions;
unsigned long decorations;
long input_mode;
unsigned long status;
} MWMHints;
...
memset(&mwmhints, 0, sizeof(mwmhints));
if (opt.borderless || ret->full_screen) {
prop = XInternAtom(disp, "_MOTIF_WM_HINTS", True);
if (prop == None) {
weprintf
("Window Manager does not support MWM hints. "
"To get a borderless window I have to bypass your wm.");
attr.override_redirect = True;
mwmhints.flags = 0;
} else {
mwmhints.flags = MWM_HINTS_DECORATIONS;
mwmhints.decorations = 0;
}
}
...
// ret->win is the result from XCreateWindow - a Window
if (mwmhints.flags) {
XChangeProperty(disp, ret->win, prop, prop, 32,
PropModeReplace, (unsigned char *) &mwmhints, PROP_MWM_HINTS_ELEMENTS);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.