Changeset c8e2ac5 in mainline


Ignore:
Timestamp:
2012-11-25T07:00:04Z (11 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f698054
Parents:
563573b
Message:

Fixed inconsistencies in calculation of bounding rectangle, ghost frame and client damage request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/compositor/compositor.c

    r563573b rc8e2ac5  
    286286                sysarg_t y[4];
    287287                comp_coord_from_client(x_in, y_in, win_trans, &x[0], &y[0]);
    288                 comp_coord_from_client(x_in + w_in, y_in, win_trans, &x[1], &y[1]);
    289                 comp_coord_from_client(x_in + w_in, y_in + h_in, win_trans, &x[2], &y[2]);
    290                 comp_coord_from_client(x_in, y_in + h_in, win_trans, &x[3], &y[3]);
     288                comp_coord_from_client(x_in + w_in - 1, y_in, win_trans, &x[1], &y[1]);
     289                comp_coord_from_client(x_in + w_in - 1, y_in + h_in - 1, win_trans, &x[2], &y[2]);
     290                comp_coord_from_client(x_in, y_in + h_in - 1, win_trans, &x[3], &y[3]);
    291291                (*x_out) = x[0];
    292292                (*y_out) = y[0];
     
    555555        } else {
    556556                fibril_mutex_lock(&window_list_mtx);
    557                 comp_coord_bounding_rect(x, y, width, height,
     557                comp_coord_bounding_rect(x - 1, y - 1, width + 2, height + 2,
    558558                    win->transform, &x, &y, &width, &height);
    559559                fibril_mutex_unlock(&window_list_mtx);
     
    11501150
    11511151                if ((pointer->grab_flags & GF_SCALE_X) || (pointer->grab_flags & GF_RESIZE_X)) {
    1152                         double fx = 1.0 + (_dx / (width * win->fx));
     1152                        double fx = 1.0 + (_dx / ((width - 1) * win->fx));
    11531153                        if (fx > 0) {
    11541154                                win->fx *= fx;
     
    11581158
    11591159                if ((pointer->grab_flags & GF_SCALE_Y) || (pointer->grab_flags & GF_RESIZE_Y)) {
    1160                         double fy = 1.0 + (_dy / (height * win->fy));
     1160                        double fy = 1.0 + (_dy / ((height - 1) * win->fy));
    11611161                        if (fy > 0) {
    11621162                                win->fy *= fy;
     
    12281228
    12291229                if ((pointer->grab_flags & GF_SCALE_X) || (pointer->grab_flags & GF_RESIZE_X)) {
    1230                         double fx = 1.0 + (_dx / (width * pointer->ghost.fx));
     1230                        double fx = 1.0 + (_dx / ((width - 1) * pointer->ghost.fx));
    12311231                        pointer->ghost.fx *= fx;
    12321232                }
    12331233
    12341234                if ((pointer->grab_flags & GF_SCALE_Y) || (pointer->grab_flags & GF_RESIZE_Y)) {
    1235                         double fy = 1.0 + (_dy / (height * pointer->ghost.fy));
     1235                        double fy = 1.0 + (_dy / ((height - 1) * pointer->ghost.fy));
    12361236                        pointer->ghost.fy *= fy;
    12371237                }
Note: See TracChangeset for help on using the changeset viewer.