mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
device-manager-xi2: Fix scaling of coordinates
Do not CLAMP to width/height before applying the scale factor we will lose all information we need to scale properly. https://bugzilla.gnome.org/show_bug.cgi?id=730815
This commit is contained in:
parent
1227f7c489
commit
9660b001f7
@ -660,8 +660,8 @@ translate_coords (ClutterStageX11 *stage_x11,
|
||||
|
||||
clutter_actor_get_size (stage, &stage_width, &stage_height);
|
||||
|
||||
*x_out = CLAMP (event_x, 0, stage_width) / stage_x11->scale_factor;
|
||||
*y_out = CLAMP (event_y, 0, stage_height) / stage_x11->scale_factor;
|
||||
*x_out = CLAMP (event_x / stage_x11->scale_factor, 0, stage_width);
|
||||
*y_out = CLAMP (event_y / stage_x11->scale_factor, 0, stage_height);
|
||||
}
|
||||
|
||||
static gdouble
|
||||
|
Loading…
Reference in New Issue
Block a user