Lines 2495-2510
get_control (MetaFrames *frames,
Link Here
|
2495 |
meta_frames_calc_geometry (frames, frame, &fgeom); |
2495 |
meta_frames_calc_geometry (frames, frame, &fgeom); |
2496 |
get_client_rect (&fgeom, fgeom.width, fgeom.height, &client); |
2496 |
get_client_rect (&fgeom, fgeom.width, fgeom.height, &client); |
2497 |
|
2497 |
|
2498 |
if (POINT_IN_RECT (x, y, client)) |
2498 |
if (META_POINT_IN_RECT (x, y, client)) |
2499 |
return META_FRAME_CONTROL_CLIENT_AREA; |
2499 |
return META_FRAME_CONTROL_CLIENT_AREA; |
2500 |
|
2500 |
|
2501 |
if (POINT_IN_RECT (x, y, fgeom.close_rect.clickable)) |
2501 |
if (META_POINT_IN_RECT (x, y, fgeom.close_rect.clickable)) |
2502 |
return META_FRAME_CONTROL_DELETE; |
2502 |
return META_FRAME_CONTROL_DELETE; |
2503 |
|
2503 |
|
2504 |
if (POINT_IN_RECT (x, y, fgeom.min_rect.clickable)) |
2504 |
if (META_POINT_IN_RECT (x, y, fgeom.min_rect.clickable)) |
2505 |
return META_FRAME_CONTROL_MINIMIZE; |
2505 |
return META_FRAME_CONTROL_MINIMIZE; |
2506 |
|
2506 |
|
2507 |
if (POINT_IN_RECT (x, y, fgeom.menu_rect.clickable)) |
2507 |
if (META_POINT_IN_RECT (x, y, fgeom.menu_rect.clickable)) |
2508 |
return META_FRAME_CONTROL_MENU; |
2508 |
return META_FRAME_CONTROL_MENU; |
2509 |
|
2509 |
|
2510 |
meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), |
2510 |
meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), |
Lines 2521-2527
get_control (MetaFrames *frames,
Link Here
|
2521 |
has_right = (flags & META_FRAME_ALLOWS_RIGHT_RESIZE) != 0; |
2521 |
has_right = (flags & META_FRAME_ALLOWS_RIGHT_RESIZE) != 0; |
2522 |
has_bottom = (flags & META_FRAME_ALLOWS_BOTTOM_RESIZE) != 0; |
2522 |
has_bottom = (flags & META_FRAME_ALLOWS_BOTTOM_RESIZE) != 0; |
2523 |
|
2523 |
|
2524 |
if (POINT_IN_RECT (x, y, fgeom.title_rect)) |
2524 |
if (META_POINT_IN_RECT (x, y, fgeom.title_rect)) |
2525 |
{ |
2525 |
{ |
2526 |
if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize) |
2526 |
if (has_vert && y <= TOP_RESIZE_HEIGHT && has_north_resize) |
2527 |
return META_FRAME_CONTROL_RESIZE_N; |
2527 |
return META_FRAME_CONTROL_RESIZE_N; |
Lines 2529-2535
get_control (MetaFrames *frames,
Link Here
|
2529 |
return META_FRAME_CONTROL_TITLE; |
2529 |
return META_FRAME_CONTROL_TITLE; |
2530 |
} |
2530 |
} |
2531 |
|
2531 |
|
2532 |
if (POINT_IN_RECT (x, y, fgeom.max_rect.clickable)) |
2532 |
if (META_POINT_IN_RECT (x, y, fgeom.max_rect.clickable)) |
2533 |
{ |
2533 |
{ |
2534 |
if (flags & META_FRAME_MAXIMIZED && |
2534 |
if (flags & META_FRAME_MAXIMIZED && |
2535 |
(META_WINDOW_TILED_TOP (window) || |
2535 |
(META_WINDOW_TILED_TOP (window) || |
Lines 2542-2573
get_control (MetaFrames *frames,
Link Here
|
2542 |
return META_FRAME_CONTROL_MAXIMIZE; |
2542 |
return META_FRAME_CONTROL_MAXIMIZE; |
2543 |
} |
2543 |
} |
2544 |
|
2544 |
|
2545 |
if (POINT_IN_RECT (x, y, fgeom.shade_rect.clickable)) |
2545 |
if (META_POINT_IN_RECT (x, y, fgeom.shade_rect.clickable)) |
2546 |
{ |
2546 |
{ |
2547 |
return META_FRAME_CONTROL_SHADE; |
2547 |
return META_FRAME_CONTROL_SHADE; |
2548 |
} |
2548 |
} |
2549 |
|
2549 |
|
2550 |
if (POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable)) |
2550 |
if (META_POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable)) |
2551 |
{ |
2551 |
{ |
2552 |
return META_FRAME_CONTROL_UNSHADE; |
2552 |
return META_FRAME_CONTROL_UNSHADE; |
2553 |
} |
2553 |
} |
2554 |
|
2554 |
|
2555 |
if (POINT_IN_RECT (x, y, fgeom.above_rect.clickable)) |
2555 |
if (META_POINT_IN_RECT (x, y, fgeom.above_rect.clickable)) |
2556 |
{ |
2556 |
{ |
2557 |
return META_FRAME_CONTROL_ABOVE; |
2557 |
return META_FRAME_CONTROL_ABOVE; |
2558 |
} |
2558 |
} |
2559 |
|
2559 |
|
2560 |
if (POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable)) |
2560 |
if (META_POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable)) |
2561 |
{ |
2561 |
{ |
2562 |
return META_FRAME_CONTROL_UNABOVE; |
2562 |
return META_FRAME_CONTROL_UNABOVE; |
2563 |
} |
2563 |
} |
2564 |
|
2564 |
|
2565 |
if (POINT_IN_RECT (x, y, fgeom.stick_rect.clickable)) |
2565 |
if (META_POINT_IN_RECT (x, y, fgeom.stick_rect.clickable)) |
2566 |
{ |
2566 |
{ |
2567 |
return META_FRAME_CONTROL_STICK; |
2567 |
return META_FRAME_CONTROL_STICK; |
2568 |
} |
2568 |
} |
2569 |
|
2569 |
|
2570 |
if (POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable)) |
2570 |
if (META_POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable)) |
2571 |
{ |
2571 |
{ |
2572 |
return META_FRAME_CONTROL_UNSTICK; |
2572 |
return META_FRAME_CONTROL_UNSTICK; |
2573 |
} |
2573 |
} |