… | |
… | |
1458 | break; |
1458 | break; |
1459 | } |
1459 | } |
1460 | break; |
1460 | break; |
1461 | |
1461 | |
1462 | case FocusIn: |
1462 | case FocusIn: |
1463 | if (ev.xfocus.detail != NotifyInferior && ev.xfocus.detail != NotifyPointer) |
1463 | if (ev.xfocus.detail != NotifyInferior |
|
|
1464 | && ev.xfocus.detail != NotifyPointer |
|
|
1465 | && ev.xfocus.mode != NotifyGrab) |
1464 | focus_in (); |
1466 | focus_in (); |
1465 | break; |
1467 | break; |
1466 | |
1468 | |
1467 | case FocusOut: |
1469 | case FocusOut: |
1468 | if (ev.xfocus.detail != NotifyInferior && ev.xfocus.detail != NotifyPointer) |
1470 | if (ev.xfocus.detail != NotifyInferior |
|
|
1471 | && ev.xfocus.detail != NotifyPointer |
|
|
1472 | && ev.xfocus.mode != NotifyGrab) |
1469 | focus_out (); |
1473 | focus_out (); |
1470 | break; |
1474 | break; |
1471 | |
1475 | |
1472 | case ConfigureNotify: |
1476 | case ConfigureNotify: |
1473 | if (ev.xconfigure.window == parent[0]) |
1477 | if (ev.xconfigure.window == parent[0]) |
… | |
… | |
1481 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1485 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1482 | } |
1486 | } |
1483 | |
1487 | |
1484 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1488 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1485 | |
1489 | |
1486 | #ifdef TRANSPARENT /* XXX: maybe not needed - leave in for now */ |
1490 | #ifdef TRANSPARENT |
1487 | if (OPTION (Opt_transparent)) |
1491 | if (OPTION (Opt_transparent)) |
1488 | check_our_parents (); |
1492 | check_our_parents (); |
1489 | #endif |
1493 | #endif |
1490 | } |
1494 | } |
1491 | break; |
1495 | break; |
… | |
… | |
2156 | selection_make (ev.time); |
2160 | selection_make (ev.time); |
2157 | break; |
2161 | break; |
2158 | |
2162 | |
2159 | case Button2: |
2163 | case Button2: |
2160 | if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? |
2164 | if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? |
2161 | selection_request (ev.time, ev.state & ModMetaMask ? Sel_Primary : Sel_Primary); |
2165 | selection_request (ev.time, ev.state & ModMetaMask ? Sel_Clipboard : Sel_Primary); |
2162 | break; |
2166 | break; |
2163 | |
2167 | |
2164 | #ifdef MOUSE_WHEEL |
2168 | #ifdef MOUSE_WHEEL |
2165 | case Button4: |
2169 | case Button4: |
2166 | case Button5: |
2170 | case Button5: |