forked from mirror/dwl
configure monitor rotation/reflection
This commit is contained in:
parent
47bbdc6034
commit
ee2b3af1ca
3 changed files with 5 additions and 4 deletions
|
@ -88,7 +88,6 @@ number of ways:
|
||||||
- XWayland
|
- XWayland
|
||||||
- HiDPI works, but multi-DPI is not as nice as sway, depending on the scale
|
- HiDPI works, but multi-DPI is not as nice as sway, depending on the scale
|
||||||
factors involved. Perhaps scaling filters are needed?
|
factors involved. Perhaps scaling filters are needed?
|
||||||
- Monitor rotation/transform is not set up yet
|
|
||||||
|
|
||||||
|
|
||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
|
|
|
@ -15,12 +15,12 @@ static const Layout layouts[] = {
|
||||||
|
|
||||||
/* monitors */
|
/* monitors */
|
||||||
static const MonitorRule monrules[] = {
|
static const MonitorRule monrules[] = {
|
||||||
/* name mfact nmaster scale layout */
|
/* name mfact nmaster scale layout rotate/reflect */
|
||||||
/* example of a HiDPI laptop monitor:
|
/* example of a HiDPI laptop monitor:
|
||||||
{ "eDP-1", 0.5, 1, 2, &layouts[0] },
|
{ "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL },
|
||||||
*/
|
*/
|
||||||
/* defaults */
|
/* defaults */
|
||||||
{ NULL, 0.55, 1, 1, &layouts[0] },
|
{ NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* keyboard */
|
/* keyboard */
|
||||||
|
|
2
dwl.c
2
dwl.c
|
@ -112,6 +112,7 @@ typedef struct {
|
||||||
int nmaster;
|
int nmaster;
|
||||||
float scale;
|
float scale;
|
||||||
const Layout *lt;
|
const Layout *lt;
|
||||||
|
enum wl_output_transform rr;
|
||||||
} MonitorRule;
|
} MonitorRule;
|
||||||
|
|
||||||
/* Used to move all of the data necessary to render a surface from the top-level
|
/* Used to move all of the data necessary to render a surface from the top-level
|
||||||
|
@ -339,6 +340,7 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
wlr_output_set_scale(wlr_output, monrules[i].scale);
|
wlr_output_set_scale(wlr_output, monrules[i].scale);
|
||||||
wlr_xcursor_manager_load(cursor_mgr, monrules[i].scale);
|
wlr_xcursor_manager_load(cursor_mgr, monrules[i].scale);
|
||||||
m->lt[0] = m->lt[1] = monrules[i].lt;
|
m->lt[0] = m->lt[1] = monrules[i].lt;
|
||||||
|
wlr_output_set_transform(wlr_output, monrules[i].rr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Sets up a listener for the frame notify event. */
|
/* Sets up a listener for the frame notify event. */
|
||||||
|
|
Loading…
Reference in a new issue