Changeset 03f0b02 in mainline
 Timestamp:
 20121119T20:22:56Z (12 years ago)
 Branches:
 lfn, master, serial, ticket/834toolchainupdate, topic/msimupgrade, topic/simplifydevexport
 Children:
 8e6ec6e
 Parents:
 a7f7ed12
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

uspace/srv/hid/compositor/compositor.c
ra7f7ed12 r03f0b02 267 267 sysarg_t *x_out, sysarg_t *y_out, sysarg_t *w_out, sysarg_t *h_out) 268 268 { 269 sysarg_t x[4]; 270 sysarg_t y[4]; 271 comp_coord_from_client(x_in, y_in, win_trans, &x[0], &y[0]); 272 comp_coord_from_client(x_in + w_in, y_in, win_trans, &x[1], &y[1]); 273 comp_coord_from_client(x_in + w_in, y_in + h_in, win_trans, &x[2], &y[2]); 274 comp_coord_from_client(x_in, y_in + h_in, win_trans, &x[3], &y[3]); 275 (*x_out) = x[0]; 276 (*y_out) = y[0]; 277 (*w_out) = x[0]; 278 (*h_out) = y[0]; 279 for (int i = 1; i < 4; ++i) { 280 (*x_out) = (x[i] < (*x_out)) ? x[i] : (*x_out); 281 (*y_out) = (y[i] < (*y_out)) ? y[i] : (*y_out); 282 (*w_out) = (x[i] > (*w_out)) ? x[i] : (*w_out); 283 (*h_out) = (y[i] > (*h_out)) ? y[i] : (*h_out); 284 } 285 (*w_out) = (*x_out); 286 (*h_out) = (*y_out); 269 if (w_in > 0 && h_in > 0) { 270 sysarg_t x[4]; 271 sysarg_t y[4]; 272 comp_coord_from_client(x_in, y_in, win_trans, &x[0], &y[0]); 273 comp_coord_from_client(x_in + w_in  1, y_in, win_trans, &x[1], &y[1]); 274 comp_coord_from_client(x_in + w_in  1, y_in + h_in  1, win_trans, &x[2], &y[2]); 275 comp_coord_from_client(x_in, y_in + h_in  1, win_trans, &x[3], &y[3]); 276 (*x_out) = x[0]; 277 (*y_out) = y[0]; 278 (*w_out) = x[0]; 279 (*h_out) = y[0]; 280 for (int i = 1; i < 4; ++i) { 281 (*x_out) = (x[i] < (*x_out)) ? x[i] : (*x_out); 282 (*y_out) = (y[i] < (*y_out)) ? y[i] : (*y_out); 283 (*w_out) = (x[i] > (*w_out)) ? x[i] : (*w_out); 284 (*h_out) = (y[i] > (*h_out)) ? y[i] : (*h_out); 285 } 286 (*w_out) = (*w_out)  (*x_out) + 1; 287 (*h_out) = (*h_out)  (*y_out) + 1; 288 } else { 289 (*w_out) = 0; 290 (*h_out) = 0; 291 } 287 292 } 288 293
Note:
See TracChangeset
for help on using the changeset viewer.