xwayland: Replace need_rotate boolean with simple check on xdg-output
The need_rotate variable is only used once anymore and had semantics which lead to errors in the past. In particular when negated we are dealing with a double negation. The variable gets replaced with a simple check on the xdg-output directly. Signed-off-by: Roman Gilg <subdiff@gmail.com>
This commit is contained in:
parent
da791ed9fd
commit
727df0a74e
|
@ -503,17 +503,16 @@ apply_output_change(struct xwl_output *xwl_output)
|
||||||
int mode_width, mode_height, count;
|
int mode_width, mode_height, count;
|
||||||
int width = 0, height = 0, has_this_output = 0;
|
int width = 0, height = 0, has_this_output = 0;
|
||||||
RRModePtr *randr_modes;
|
RRModePtr *randr_modes;
|
||||||
Bool need_rotate;
|
|
||||||
|
|
||||||
/* Clear out the "done" received flags */
|
/* Clear out the "done" received flags */
|
||||||
xwl_output->wl_output_done = FALSE;
|
xwl_output->wl_output_done = FALSE;
|
||||||
xwl_output->xdg_output_done = FALSE;
|
xwl_output->xdg_output_done = FALSE;
|
||||||
|
|
||||||
/* xdg-output sends output size in compositor space. so already rotated */
|
/* When we have received an xdg-output for the mode size we might need to
|
||||||
need_rotate = (xwl_output->xdg_output == NULL);
|
* rotate back the stored logical size it provided.
|
||||||
|
*/
|
||||||
/* We need to rotate back the logical size for the mode */
|
if (xwl_output->xdg_output == NULL
|
||||||
if (need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) {
|
|| xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) {
|
||||||
mode_width = xwl_output->width;
|
mode_width = xwl_output->width;
|
||||||
mode_height = xwl_output->height;
|
mode_height = xwl_output->height;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue