diff options
author | Kristian Lyngstol <kristian@linpro.no> | 2008-11-30 21:27:29 +0100 |
---|---|---|
committer | Kristian Lyngstol <kristian@linpro.no> | 2008-11-30 21:27:29 +0100 |
commit | 168bb4dfe679eeedad8502e15c822f05b199cfcd (patch) | |
tree | 41e3e9a5bf1be13bec6930df3e311a97811cb06e | |
parent | 8eef8aafdcaee74b76f78e794ed2e1055a6060ac (diff) | |
download | Documentation-168bb4dfe679eeedad8502e15c822f05b199cfcd.tar.gz Documentation-168bb4dfe679eeedad8502e15c822f05b199cfcd.tar.bz2 |
Cleanup
-rw-r--r-- | Core-CacheAnnotate | 14973 | ||||
-rw-r--r-- | callgraph.png | bin | 284987 -> 0 bytes |
2 files changed, 0 insertions, 14973 deletions
diff --git a/Core-CacheAnnotate b/Core-CacheAnnotate deleted file mode 100644 index 62e9be6..0000000 --- a/Core-CacheAnnotate +++ /dev/null @@ -1,14973 +0,0 @@ --------------------------------------------------------------------------------- -I1 cache: 32768 B, 64 B, 8-way associative -D1 cache: 32768 B, 64 B, 8-way associative -L2 cache: 2097152 B, 64 B, 8-way associative -Command: beryl -Data file: cachegrind.out.24477 -Events recorded: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw -Events shown: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw -Event sort order: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw -Thresholds: 99 0 0 0 0 0 0 0 0 -Include dirs: -User annotated: display_options.c - activation.c - screen_options.c - plugin.c - action.c - main.c - display.c - ipcs.c - settings-dump.c - window.c - event.c - session.c - paint.c - type_mask.c - privates.c - texture.c - option.c - screen.c -Auto-annotation: off - --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw --------------------------------------------------------------------------------- -1,262,389,353 676,420 19,052 292,552,419 4,800,217 522,895 121,364,450 1,368,842 794,412 PROGRAM TOTALS - --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw file:function --------------------------------------------------------------------------------- -515,559,348 199,286 6,093 98,882,374 1,248,544 58,820 27,109,639 127,252 26,053 ???:??? -123,256,516 18 12 20,545,296 0 0 4,113,332 174 0 png.c:premultiplyData -106,448,359 84 84 26,894,515 212,257 2 15,957,850 9,315 235 ???:inflate_fast - 52,894,371 62 37 16,435,215 0 0 0 0 0 ???:adler32 - 38,287,322 373 15 4,007,184 111,864 1,311 0 0 0 ???:strlen - 33,183,121 630 4 10,948,381 94,208 824 0 0 0 ???:strcmp - 33,179,159 2,230 7 12,307,226 286,207 241,968 12,011,776 790,442 503,356 ???:memcpy - 24,606,810 5 1 2,994,380 8,601 1 0 0 0 gstring.c:g_str_hash - 16,894,490 1,486 19 4,827,357 17,492 113 1,448,382 10 2 ???:free - 16,484,832 44 34 16,443,188 256,067 208,828 16,410,608 256,423 249,753 texture.c:imageToTexture - 16,271,777 1,385 19 5,277,192 3,721 21 1,759,064 358 3 ???:malloc - 15,650,373 396 5 1,332,914 0 0 1,827,186 199 0 ???:stpcpy - 13,340,419 560 1 3,149,001 10,732 0 1,099,204 0 0 gkeyfile.c:g_key_file_lookup_group_node - 13,328,418 434 298 3,050,171 10,673 22 1,479,107 3,323 56 ???:inflate - 12,484,865 640 7 1,241,814 0 0 2,379,108 0 0 gkeyfile.c:g_key_file_parse_string_as_value - 11,837,682 418 5 2,633,253 12,431 0 34,698 83 0 gkeyfile.c:g_key_file_parse_data - 11,624,392 32,162 228 3,564,484 3,043 30 2,854,036 3,317 109 ???:vfprintf - 11,109,042 0 0 4,937,352 0 0 3,703,014 229 2 gstring.h:g_key_file_parse_data - 10,249,261 270 16 1,951,956 159 2 1,645,744 1,099 51 ???:_IO_default_xsputn - 10,232,045 2,868 5 1,671,703 0 0 2,900,532 130 0 gstrfuncs.c:g_strconcat - 7,916,789 312 10 1,294,389 4 2 1,255,514 557 91 ???:strncpy - 6,931,442 130 5 1,732,860 154 3 1,039,717 23 1 gmem.c:g_malloc - 6,175,981 82 44 2,038,316 38,527 708 462 0 0 ???:crc32 - 6,120,399 616 9 2,005,638 6,411 22 242,089 14 2 ???:getenv - 5,312,388 354 4 767,511 0 0 142,170 0 0 gstrfuncs.c:g_strrstr - 5,175,137 58 3 1,411,401 163 0 470,467 0 0 gmem.c:g_free - 5,077,983 141 15 807,644 88 18 56,832 0 0 ???:strstr - 4,984,071 1,109 17 1,231,070 1,478 3 495,757 76 0 gslice.c:g_slice_free1 - 4,499,750 3,295 84 862,101 4,065 65 300,563 0 0 ???:sin - 4,163,087 15,811 30 1,042,010 899 0 525,105 838 8 ???:calloc - 4,146,788 3,353 8 2,166,986 747,603 0 210,405 1,159 0 paint.c:paintTransformedScreen - 4,098,867 1,287 16 1,047,759 1,841 14 652,914 83 0 gkeyfile.c:g_key_file_flush_parse_buffer - 4,093,780 2,237 0 1,085,855 138,079 173 934,412 103 0 ini.c:write_setting - 3,686,614 7,556 10 1,986,614 628,344 86 313,418 712 0 screen.c:moveScreenViewport - 3,584,678 1,537 24 1,201,167 36,281 26 547,829 789 0 gslice.c:g_slice_alloc - 3,352,062 41 4 582,972 0 0 874,449 6 0 gstrfuncs.c:g_strdup - 3,339,258 63 9 1,054,502 7,373 10 175,752 0 0 ???:pthread_getspecific - 3,198,302 941 21 729,474 375 1 808,488 200 0 ???:vasprintf - 2,957,006 168 2 1,142,269 34,535 0 433,934 0 0 ghash.c:g_hash_table_lookup - 2,904,354 202 132 575,587 337 16 361,891 1,405 212 ???:inflate_table - 2,522,681 628 19 127,981 13 2 0 0 0 ???:index - 2,114,833 41 1 0 0 0 0 0 0 gstrfuncs.c:g_stpcpy - 2,105,460 20 6 350,910 0 0 350,910 1,957 1 ???:__glXGetCurrentContext - 2,037,726 490 0 407,798 688 0 218,356 0 0 ini.c:mods_to_string - 1,806,204 3,843 10 1,019,350 10,960 121 958,774 16,561 375 ???:mempcpy - 1,747,965 414 6 511,797 153 0 262,707 0 0 ghash.c:g_hash_table_replace - 1,688,969 4,045 74 764,119 1,856 11 336,940 2,764 31 splash.c:splashPaintScreen - 1,661,310 744 13 414,585 1 0 304,885 333 9 gstring.c:g_string_insert_len - 1,473,005 479 9 208,172 0 0 300,605 0 0 gkeyfile.c:g_key_file_remove_key - 1,380,076 713 2 483,026 0 0 69,004 0 0 ???:pthread_rwlock_unlock - 1,351,296 176 2 235,008 0 0 352,512 68 0 gstrfuncs.c:g_strndup - 1,290,123 166 3 334,053 11,880 0 272,913 0 0 ghash.c:g_hash_nodes_destroy - 1,279,600 204 6 575,820 70 2 383,880 0 0 ???:glTexCoord2f - 1,247,532 336 8 283,530 191 0 453,648 0 0 gkeyfile.c:g_key_file_add_key - 1,213,168 13,197 7 193,004 6,221 0 275,720 0 0 gkeyfile.c:g_key_file_set_value - 1,201,326 655 4 286,030 70 0 171,618 0 0 gmem.c:g_malloc0 - 1,198,720 137 3 539,424 67 1 359,616 0 0 ???:glVertex2f - 1,173,034 195 2 414,012 510 2 0 0 0 ???:pthread_rwlock_rdlock - 1,077,131 6,228 16 314,274 0 0 269,297 11 6 ???:_IO_setb - 954,466 605 6 247,376 53 9 0 0 0 ???:strncmp - 935,649 166 3 283,530 18,717 0 255,177 0 0 gkeyfile.c:g_key_file_remove_key_value_pair_node - 914,851 167 2 130,693 0 0 130,693 0 0 gstring.c:g_str_equal - 903,567 213 4 172,108 0 0 215,135 0 0 gprintf.c:g_vasprintf - 899,221 38 14 112,520 174 71 35,724 0 0 ???:memchr - 857,879 1,446 28 191,956 681 9 116,997 17 0 ???:realloc - 829,376 2,984 7 255,192 1,112 2 127,600 1 0 gdataset.c:g_quark_from_static_string - 828,902 173 16 259,865 1,722 138 3,164 0 0 ???:XKeysymToKeycode - 807,308 8,204 77 215,674 2,088 3 110,838 2,695 0 ???:__printf_fp - 804,784 1,818 18 419,176 128,427 634 41,861 162 0 paint.c:paintScreen - 796,355 319 6 91,012 0 0 136,518 0 0 gkeyfile.c:g_key_file_set_string - 789,906 167 2 151,905 47 0 121,524 57 0 gstring.c:g_string_erase - 753,714 11,608 49 376,433 2,576 2 130,346 3,324 29 paint.c:addWindowGeometry - 737,178 168 4 198,471 82 0 198,471 0 0 gutf8.c:g_utf8_strchr - 733,454 208 5 212,682 29,889 245 111,712 11 0 gslist.c:g_slist_foreach - 716,480 68 21 230,292 1,015 0 102,352 2 0 ???:fread - 703,148 27 10 351,550 2,353 7 16 0 0 ???:pthread_once - 641,556 2,855 21 10,234 0 0 200,206 8,170 4,035 ???:memset - 622,398 257 6 29,638 0 0 266,742 0 0 gstring.c:g_string_append_printf - 619,320 2,687 8 254,588 13,002 175 0 0 0 ???:strcasecmp - 617,762 2,578 6 64,771 1 0 101,544 0 0 gerror.c:g_set_error - 612,728 155 19 266,941 81 6 127,391 21 2 event.c:handleWindowDamageRect - 603,936 167 2 120,072 49 0 211,467 0 0 glist.c:g_list_prepend - 587,094 1,224 23 144,038 4 0 134,789 42 1 ???:_XRead - 583,789 6,347 72 155,370 510 51 91,699 57 0 ???:_XReply - 552,016 621 2 172,505 231 2 103,503 0 0 ???:tfind - 540,060 84 1 113,781 0 0 60,897 0 0 gkeyfile.c:g_key_file_lookup_group - 538,707 252 3 85,059 0 0 85,059 0 0 gstrfuncs.c:g_strstr_len - 533,273 976 4 302,406 222,308 5 76,739 40,014 221 fade.c:fadePreparePaintScreen - 516,117 164 2 121,860 0 0 89,607 20,433 0 glist.c:g_list_remove_link - 502,968 1,236 2 251,484 10,358 11 0 0 0 main.c:check_type - 491,881 1,515 169 257,102 583 28 64,370 394 7 event.c:handleEvent - 491,658 1,175 46 266,970 949 4 115,246 2,329 0 animation.c:animAddWindowGeometry - 457,650 380 4 178,524 7,073 0 57,834 0 0 ghash.c:g_hash_table_resize - 440,562 166 2 208,113 4,062 0 85,776 0 0 ghash.c:g_hash_table_remove_all - 414,932 46 2 118,552 0 0 118,552 0 0 gstring.c:g_string_append_printf_internal - 408,111 380 19 148,814 532 8 65,824 80 0 decoration.c:decorHandleEvent - 408,045 245 4 147,244 6,614 231 57,885 1 0 main.c:find_setting - 405,357 15 5 111,619 1 0 58,744 0 0 ???:fgets - 396,956 84 1 85,062 0 0 170,124 0 0 ghash.c:g_hash_node_new - 396,942 168 2 28,353 0 0 28,353 0 0 gutf8.c:g_unichar_to_utf8 - 392,850 1,755 4 226,980 0 0 104,760 3,020 0 wobbly.c:wobblyAddWindowGeometry - 388,261 11,274 47 150,410 0 0 68,851 963 0 cube.c:paintReversed - 378,568 4,661 0 47,321 80 0 0 0 0 main.c:write_setting - 377,464 404 9 123,442 17,525 0 32,173 0 0 gkeyfile.c:g_key_file_to_data - 365,849 474 5 94,405 4,427 20 40,132 0 0 ???:XKeysymToString - 361,511 26 12 82,790 0 0 70,955 5 2 ???:_IO_getline_info - 352,066 5 1 133,872 34 1 0 0 0 ???:strncasecmp - 344,260 224 18 89,997 679 7 27,789 218 201 ???:_XrmInternalStringToQuark - 339,318 1,518 46 66,103 3,915 12 69,041 2,030 13 ???:_XSend - 326,117 169 4 29,647 0 0 29,647 0 0 gstring.c:g_string_append_len - 322,533 90 60 107,546 11,275 0 66,069 357 0 ???:png_read_row - 318,987 2,560 2 63,796 205 1 31,901 0 0 gutils.c:_glib_gettext - 316,674 688 19 112,661 311 0 72,293 129 0 scale.c:scaleHandleEvent - 315,208 9,370 68 162,245 5,451 18 75,975 1,766 5 display.c:eventLoop - 311,883 80 0 85,059 1 0 85,059 0 0 gkeyfile.c:g_key_file_key_value_pair_free - 306,221 3,041 10 135,627 12,816 18 63,625 3,378 1 decoration.c:decorDrawWindow - 295,839 413 8 58,425 2,996 0 53,613 0 0 gkeyfile.c:g_key_file_remove_group_node - 289,932 492 44 106,158 475 19 72,295 219 1 animation.c:animHandleEvent - 289,772 11,692 1 82,792 4 0 0 0 0 main.c:check_s_type - 284,606 578 29 93,863 521 12 59,239 231 0 wobbly.c:wobblyHandleEvent - 273,369 142 16 180,782 12,291 0 31,520 33 0 screen.c:insertWindowIntoScreen - 272,910 59 2 12,405 0 0 124,050 0 0 gstrfuncs.c:g_strdup_printf - 270,073 72 8 128,898 166 0 55,242 10 1 scale.c:scaleDamageWindowRect - 268,636 26 13 70,250 37 15 17,422 2 0 ???:XGetVisualInfo - 264,779 224 4 123,775 0 0 32,173 0 0 gstring.c:g_string_maybe_expand - 263,952 87 12 141,184 206 4 49,106 17 1 wobbly.c:wobblyDamageWindowRect - 259,584 249 2 123,708 0 0 32,448 0 0 ghash.c:g_hash_table_unref - 257,443 221 10 96,102 42 0 24,823 0 0 ???:XUnionRegion - 251,680 79 9 128,907 56 1 61,381 1 0 animation.c:animDamageWindowRect - 246,480 1,172 3 113,760 1,213 0 85,320 551 0 ???:glTranslatef - 245,631 105 20 135,082 145 6 67,525 38 2 place.c:placeDamageWindowRect - 245,523 71 7 135,037 147 3 49,104 20 1 neg.c:NEGDamageWindowRect - 241,211 630 14 70,602 3,038 157 65,630 3,156 741 ???:_XEnq - 238,999 582 18 92,639 316 8 65,840 136 0 resize.c:resizeHandleEvent - 233,244 57 7 122,760 100 2 49,104 23 1 switcher.c:switchDamageWindowRect - 232,905 18 8 60 13 4 98,343 6,073 2,976 cube.c:cubeUpdateSkyDomeTexture - 228,619 696 18 87,923 229 1 66,122 120 0 rotate.c:rotateHandleEvent - 227,109 60 6 116,623 70 1 49,105 0 0 decoration.c:decorDamageWindowRect - 224,226 228 4 73,924 1,014 25 36,929 0 0 main.c:find_plugin - 220,801 878 52 78,237 2,032 45 102,114 1,642 11 event.c:handleActionEvent - 208,279 303 50 71,926 36 0 58,580 50 1 ???:XGetWindowProperty - 206,980 237 2 41,396 0 0 51,745 0 0 main.c:beryl_setting_get_can_set_edgemask - 206,980 157 1 41,396 0 0 51,745 64 0 main.c:beryl_setting_get_can_set_key - 206,980 79 1 41,396 0 0 51,745 0 0 main.c:beryl_setting_get_can_set_button - 206,980 79 1 41,396 0 0 51,745 0 0 main.c:beryl_setting_get_can_set_bell - 203,541 324 5 72,280 200 1 52,592 107 0 water.c:waterHandleEvent - 197,454 20 10 33,464 2 0 20,507 0 0 gkeyfile.c:g_key_file_parse_value_as_string - 195,119 818 21 95,255 2,387 383 26,898 1,441 0 ipcs.c:IPCS_GetAtom - 194,038 489 12 80,275 530 9 59,300 161 0 move.c:moveHandleEvent - 190,240 311 6 52,480 0 0 32,800 0 0 ???:XNextEvent - 189,760 904 4 88,950 0 0 71,160 0 0 ???:glRotatef - 183,646 112 23 65,769 3,397 6 38,823 2,587 4 ???:__glXFlushRenderBuffer - 182,997 13,598 89 51,545 7,643 6 23,467 1,114 2 cube.c:cubePaintTransformedScreen - 181,747 378 7 47,979 5 0 5,527 0 0 ???:read - 180,594 1,343 1 40,132 0 0 40,132 0 0 main.c:beryl_setting_value_get_keysym - 180,594 553 1 40,132 0 0 40,132 0 0 main.c:beryl_setting_value_get_keymods - 180,594 214 1 40,132 2,449 2 40,132 0 0 main.c:beryl_setting_value_get_key_enabled - 178,271 165 8 64,518 148 0 32,399 938 805 gslice.c:slab_allocator_alloc_chunk - 177,750 341 1 39,500 158 0 39,500 0 0 main.c:beryl_setting_value_get_button_enabled - --------------------------------------------------------------------------------- --- User-annotated source: activation.c --------------------------------------------------------------------------------- - No information has been collected for activation.c - --------------------------------------------------------------------------------- --- User-annotated source: display_options.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 162 ---------------------------------------- - . . . . . . . . . free(display->opt[COMP_DISPLAY_OPTION_SCREENSHOT].value.s); - . . . . . . . . . free(display->opt[COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT].value.s); - . . . . . . . . . #if 0 - . . . . . . . . . free(display->opt[COMP_DISPLAY_OPTION_FOCUS_STEALING_LEVEL].value.s); - . . . . . . . . . #endif - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void compDisplayInitOptions(CompDisplay * display, char **plugin, int nPlugin) - 18 4 2 0 0 0 12 0 0 { - . . . . . . . . . CompOption *o; - . . . . . . . . . int i; - . . . . . . . . . char *str; - . . . . . . . . . - 6 0 0 3 0 0 0 0 0 if (nPlugin == 0) - . . . . . . . . . { - 6 0 0 3 2 1 3 0 0 nPlugin = nDefPlugin; - 3 0 0 0 0 0 3 0 0 plugin = def_plugin; - . . . . . . . . . } - . . . . . . . . . - 6 0 0 3 0 0 3 3 3 display->dirtyPluginList = TRUE; - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TEXTURE_FILTER]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 3 3 o->name = "texture_filter"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_(""); - 6 2 1 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Texture Filter"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Texture filtering"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeString; - 15 0 0 3 0 0 6 0 0 o->value.s = strdup("Good"); - 6 2 1 3 0 0 3 0 0 o->rest.s.string = textureFilter; - 6 0 0 3 0 0 3 0 0 o->rest.s.nString = NUM_TEXTURE_FILTER; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_CLICK_TO_FOCUS]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 2 1 3 0 0 3 0 0 o->name = "click_to_focus"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Click To Focus"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Click on window moves input focus to it"); - 6 3 1 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 0 0 o->value.b = CLICK_TO_FOCUS_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_AUTORAISE]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 2 1 3 0 0 3 1 1 o->name = "autoraise"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Auto-Raise"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Raise selected windows after interval"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 0 0 o->value.b = AUTORAISE_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_AUTORAISE_DELAY]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 2 1 3 0 0 3 0 0 o->name = "autoraise_delay"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Auto-Raise Delay"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Interval before raising selected windows"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeInt; - 6 0 0 3 0 0 3 1 1 o->value.i = AUTORAISE_DELAY_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->rest.i.min = AUTORAISE_DELAY_MIN; - 6 0 0 3 0 0 3 0 0 o->rest.i.max = AUTORAISE_DELAY_MAX; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_CLOSE_WINDOW]; - 6 3 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "close_window"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Close Window"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 2 1 3 0 0 3 0 0 o->shortDesc = N_("Close Window"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Close active window"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = CLOSE_WINDOW_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(CLOSE_WINDOW_KEY_DEFAULT); - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAIN_MENU]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "main_menu"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Show Main Menu"); - 6 2 1 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Show Main Menu"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Show the main menu"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 2 1 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = MAIN_MENU_MODIFIERS_DEFAULT; - 15 2 1 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(MAIN_MENU_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RUN_DIALOG]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "run"; - 6 3 1 3 0 0 3 0 0 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Run Dialog"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Run Dialog"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Show Run Application dialog"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 3 1 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 2 1 3 0 0 3 0 0 o->value.action.key.modifiers = RUN_DIALOG_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(RUN_DIALOG_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 2 1 3 0 0 3 3 3 o->name = "unmaximize_window"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Unmaximize Window"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Unmaximize Window"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Unmaximize active window"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeNone; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MINIMIZE_WINDOW]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "minimize_window"; - 6 2 1 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Minimize Window"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Minimize Window"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Minimize active window"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 3 1 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 3 0 3 0 0 3 0 0 o->value.action.key.modifiers = MINIMIZE_WINDOW_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(MINIMIZE_WINDOW_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW]; - 6 2 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "maximize_window"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Maximize Window"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Maximize Window"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Maximize active window"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = MAXIMIZE_WINDOW_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(MAXIMIZE_WINDOW_KEY_DEFAULT); - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "maximize_window_horizontally"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Maximize Window Horizontally"); - 6 2 1 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Maximize Window Horizontally"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Maximize active window horizontally"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 2 1 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeNone; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT]; - 6 2 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "maximize_window_vertically"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Maximize Window Vertically"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 2 1 3 0 0 3 0 0 o->shortDesc = N_("Maximize Window Vertically"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Maximize active window vertically"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeNone; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SHOW_DESKTOP]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 3 1 3 0 0 3 3 3 o->name = "show_desktop"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Hide all windows and focus desktop"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Hide all windows and focus desktop"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Hide all windows and focus desktop"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitEdge; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = SHOW_DESKTOP_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(SHOW_DESKTOP_KEY_DEFAULT); - . . . . . . . . . - . . . . . . . . . #define COMMAND_OPTION_SHORT N_("Command line %d") - . . . . . . . . . #define COMMAND_OPTION_LONG N_("Command line to be executed in shell when " \ - . . . . . . . . . "run_command%d is invoked") - . . . . . . . . . #define RUN_OPTION_SHORT N_("Run command %d") - . . . . . . . . . #define RUN_OPTION_LONG N_("A keybinding that when invoked, will run " \ - . . . . . . . . . "the shell command identified by command%d") - . . . . . . . . . --- line 385 ---------------------------------------- --- line 413 ---------------------------------------- - . . . . . . . . . o->longDesc = str; \ - . . . . . . . . . o->type = CompOptionTypeAction; \ - . . . . . . . . . o->value.action.bell = FALSE; \ - . . . . . . . . . o->value.action.edgeMask = 0; \ - . . . . . . . . . o->value.action.state = CompActionStateInitKey; \ - . . . . . . . . . o->value.action.state |= CompActionStateInitButton; \ - . . . . . . . . . o->value.action.type = CompBindingTypeNone - . . . . . . . . . -297 18 8 102 0 0 99 16 15 COMMAND_OPTION(0, "command0", "run_command0"); -297 16 8 102 0 0 99 13 13 COMMAND_OPTION(1, "command1", "run_command1"); -297 14 7 102 0 0 99 12 12 COMMAND_OPTION(2, "command2", "run_command2"); -297 16 8 102 0 0 99 14 14 COMMAND_OPTION(3, "command3", "run_command3"); -297 16 7 102 0 0 99 12 12 COMMAND_OPTION(4, "command4", "run_command4"); -297 18 8 102 0 0 99 13 13 COMMAND_OPTION(5, "command5", "run_command5"); -297 15 7 102 0 0 99 12 12 COMMAND_OPTION(6, "command6", "run_command6"); -297 16 8 102 0 0 99 14 14 COMMAND_OPTION(7, "command7", "run_command7"); -297 16 7 102 0 0 99 12 12 COMMAND_OPTION(8, "command8", "run_command8"); -297 17 8 102 0 0 99 13 13 COMMAND_OPTION(9, "command9", "run_command9"); -297 14 7 102 0 0 99 12 12 COMMAND_OPTION(10, "command10", "run_command10"); -297 16 8 102 0 0 99 11 11 COMMAND_OPTION(11, "command11", "run_command11"); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SLOW_ANIMATIONS]; - 6 2 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "slow_animations"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Slow Animations"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Slow Animations"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Toggle use of slow animations"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = SLOW_ANIMATIONS_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(SLOW_ANIMATIONS_KEY_DEFAULT); - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_LOWER_WINDOW]; - 6 0 0 3 0 0 3 0 0 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "lower_window"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Lower Window"); - 6 3 1 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Lower Window"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Lower window beneath other windows"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 2 1 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = LOWER_WINDOW_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = LOWER_WINDOW_BUTTON_DEFAULT; - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RAISE_WINDOW]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 3 3 o->name = "raise_window"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Raise Window"); - 6 2 1 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Raise Window"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Raise window above other windows"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 2 1 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = RAISE_WINDOW_MODIFIERS_DEFAULT; - 6 3 1 3 0 0 3 0 0 o->value.action.button.button = RAISE_WINDOW_BUTTON_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_OPACITY_INCREASE]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "opacity_increase"; - 6 0 0 3 0 0 3 0 0 o->group = N_("Bindings"); - 6 2 1 3 0 0 3 1 1 o->subGroup = N_("Increase Opacity"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Increase Opacity"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Increase window opacity"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 2 1 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = OPACITY_INCREASE_MODIFIERS_DEFAULT; - 6 2 1 3 0 0 3 0 0 o->value.action.button.button = OPACITY_INCREASE_BUTTON_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_OPACITY_DECREASE]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "opacity_decrease"; - 6 2 1 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Decrease Opacity"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Decrease Opacity"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Decrease window opacity"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 2 1 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 2 1 3 0 0 3 0 0 o->value.action.button.modifiers = OPACITY_DECREASE_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = OPACITY_DECREASE_BUTTON_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SATURATION_INCREASE]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 3 1 3 0 0 3 0 0 o->name = "saturation_increase"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Increase Saturation"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Increase Saturation"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Increase Saturation"); - 6 3 1 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 2 1 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = SATURATION_INCREASE_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = SATURATION_INCREASE_BUTTON_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SATURATION_DECREASE]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 2 1 3 0 0 3 0 0 o->name = "saturation_decrease"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Decrease Saturation"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Decrease Saturation"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Decrease Saturation"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = SATURATION_DECREASE_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = SATURATION_DECREASE_BUTTON_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_BRIGHTNESS_INCREASE]; - 6 2 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "brightness_increase"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Increase Brightness"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 2 1 3 0 0 3 0 0 o->shortDesc = N_("Increase Brightness"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Increase Brightness"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 3 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = BRIGHTNESS_INCREASE_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = BRIGHTNESS_INCREASE_BUTTON_DEFAULT; - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_BRIGHTNESS_DECREASE]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "brightness_decrease"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Decrease Brightness"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 2 1 3 0 0 3 0 0 o->shortDesc = N_("Decrease Brightness"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Decrease Brightness"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 2 1 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = BRIGHTNESS_DECREASE_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = BRIGHTNESS_DECREASE_BUTTON_DEFAULT; - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RUN_SCREENSHOT]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 3 3 o->name = "run_command_screenshot"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Take a screenshot"); - 6 2 1 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Take a screenshot"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Take a screenshot"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 2 1 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = RUN_SCREENSHOT_MODIFIERS_DEFAULT; - 15 2 1 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(RUN_SCREENSHOT_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SCREENSHOT]; - 6 0 0 3 0 0 3 0 0 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "command_screenshot"; - 6 2 1 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = "command;"; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Screenshot command line"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Screenshot command line"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeString; - 15 2 1 3 0 0 6 0 0 o->value.s = strdup(SCREENSHOT_DEFAULT); - 6 0 0 3 0 0 3 1 1 o->rest.s.string = NULL; - 6 0 0 3 0 0 3 0 0 o->rest.s.nString = 0; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT]; - 6 3 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 3 3 o->name = "run_command_window_screenshot"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Take a screenshot of a window"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 2 1 3 0 0 3 0 0 o->shortDesc = N_("Take a screenshot of a window"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Take a screenshot of a window"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = RUN_WINDOW_SCREENSHOT_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = - . . . . . . . . . XStringToKeysym(RUN_WINDOW_SCREENSHOT_KEY_DEFAULT); - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT]; - 6 0 0 3 0 0 3 0 0 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "command_window_screenshot"; - 6 0 0 3 0 0 3 0 0 o->group = N_("Main"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_(""); - 6 2 1 3 0 0 3 0 0 o->displayHints = "command;"; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Window screenshot command line"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Window screenshot command line"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeString; - 15 3 1 3 0 0 6 0 0 o->value.s = strdup(WINDOW_SCREENSHOT_DEFAULT); - 6 0 0 3 0 0 3 1 1 o->rest.s.string = NULL; - 6 0 0 3 0 0 3 0 0 o->rest.s.nString = 0; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_WINDOW_MENU]; - 6 0 0 3 0 0 3 0 0 o->advanced = False; - 6 2 1 3 0 0 3 0 0 o->name = "window_menu"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Window Menu"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Window Menu"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Open window menu"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 3 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeButton; - 6 0 0 3 0 0 3 0 0 o->value.action.button.modifiers = WINDOW_MENU_MODIFIERS_DEFAULT; - 6 0 0 3 0 0 3 0 0 o->value.action.button.button = WINDOW_MENU_BUTTON_DEFAULT; - 18 0 0 9 0 0 3 0 0 o->value.action.type |= CompBindingTypeKey; - 6 2 1 3 0 0 3 0 0 o->value.action.key.modifiers = WINDOW_MENU_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = XStringToKeysym(WINDOW_MENU_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RAISE_ON_CLICK]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 2 1 3 0 0 3 2 1 o->name = "raise_on_click"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Raise On Click"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Raise windows when clicked"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 0 0 o->value.b = RAISE_ON_CLICK_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_AUDIBLE_BELL]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "audible_bell"; - 6 2 1 3 0 0 3 2 2 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Audible Bell"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Audible system beep"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 1 1 o->value.b = AUDIBLE_BELL_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "toggle_window_maximized"; - 6 2 1 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Toggle Window Maximized"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Toggle Window Maximized"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Toggle active window maximized"); - 6 2 1 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 2 1 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = TOGGLE_WINDOW_MAXIMIZED_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = - . . . . . . . . . XStringToKeysym(TOGGLE_WINDOW_MAXIMIZED_KEY_DEFAULT); - . . . . . . . . . - 9 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_FULLSCREEN]; - 6 0 0 3 0 0 3 1 0 o->advanced = False; - 6 2 1 3 0 0 3 3 3 o->name = "toggle_window_fullscreen"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Toggle Window Fullscreen"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Toggle Window Fullscreen"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Toggle active window fullscreen, kiosk mode"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 2 1 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = - . . . . . . . . . TOGGLE_WINDOW_FULLSCREEN_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = - . . . . . . . . . XStringToKeysym(TOGGLE_WINDOW_FULLSCREEN_KEY_DEFAULT); - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "toggle_window_maximized_horizontally"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_("Toggle Window Maximized Horizontally"); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 2 1 3 0 0 3 0 0 o->shortDesc = N_("Toggle Window Maximized Horizontally"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Toggle active window maximized horizontally"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 2 1 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = - . . . . . . . . . TOGGLE_WINDOW_MAXIMIZED_HORZ_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = - . . . . . . . . . XStringToKeysym(TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY_DEFAULT); - . . . . . . . . . - 12 2 1 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "toggle_window_maximized_vertically"; - 6 0 0 3 0 0 3 0 0 o->group = N_("Bindings"); - 6 2 1 3 0 0 3 1 1 o->subGroup = N_("Toggle Window Maximized Vertically"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Toggle Window Maximized Vertically"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Toggle active window maximized vertically"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 1 1 o->value.action.bell = FALSE; - 6 2 1 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 0 0 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = - . . . . . . . . . TOGGLE_WINDOW_MAXIMIZED_VERT_MODIFIERS_DEFAULT; - 15 2 1 3 0 0 6 0 0 o->value.action.key.keysym = - . . . . . . . . . XStringToKeysym(TOGGLE_WINDOW_MAXIMIZED_VERT_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS]; - 6 0 0 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "hide_skip_taskbar_windows"; - 6 2 1 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 1 1 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Hide Skip Taskbar Windows"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Hide windows not in taskbar when entering show " - . . . . . . . . . "desktop mode"); - 6 2 1 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 1 1 o->value.b = HIDE_SKIP_TASKBAR_WINDOWS_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED]; - 6 0 0 3 0 0 3 0 0 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "toggle_window_shaded"; - 6 2 1 3 0 0 3 1 1 o->group = N_("Bindings"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_("Toggle Window Shaded"); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Toggle Window Shaded"); - 6 0 0 3 0 0 3 0 0 o->longDesc = N_("Toggle active window shaded"); - 6 2 1 3 0 0 3 1 1 o->type = CompOptionTypeAction; - 6 0 0 3 0 0 3 0 0 o->value.action.bell = FALSE; - 6 0 0 3 0 0 3 0 0 o->value.action.edgeMask = 0; - 6 0 0 3 0 0 3 0 0 o->value.action.state = CompActionStateInitKey; - 18 0 0 9 0 0 3 0 0 o->value.action.state |= CompActionStateInitButton; - 6 2 1 3 0 0 3 0 0 o->value.action.type = CompBindingTypeKey; - 6 0 0 3 0 0 3 0 0 o->value.action.key.modifiers = TOGGLE_WINDOW_SHADING_MODIFIERS_DEFAULT; - 15 0 0 3 0 0 6 0 0 o->value.action.key.keysym = - . . . . . . . . . XStringToKeysym(TOGGLE_WINDOW_SHADING_KEY_DEFAULT); - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_DIM_DEAD]; - 6 2 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 1 1 o->name = "dim_dead"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 1 1 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Dim Unresponsive Windows"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Desaturate and dim windows that are unresponsive"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 0 0 o->value.b = DIM_DEAD_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED]; - 6 3 1 3 0 0 3 3 3 o->advanced = False; - 6 0 0 3 0 0 3 0 0 o->name = "ignore_hints_when_maximized"; - 6 0 0 3 0 0 3 2 2 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Ignore Hints When Maximized"); - 6 2 1 3 0 0 3 0 0 o->longDesc = - . . . . . . . . . N_("Ignore size increment and aspect hints when window is " - . . . . . . . . . "maximized"); - 6 0 0 3 0 0 3 0 0 o->type = CompOptionTypeBool; - 6 0 0 3 0 0 3 1 1 o->value.b = IGNORE_HINTS_WHEN_MAXIMIZED_DEFAULT; - . . . . . . . . . - 12 0 0 3 0 0 3 0 0 o = &display->opt[COMP_DISPLAY_OPTION_EDGE_TRIGGERING_DELAY]; - 6 0 0 3 0 0 3 3 2 o->advanced = False; - 6 2 1 3 0 0 3 1 1 o->name = "edge_triggering_delay"; - 6 0 0 3 0 0 3 1 1 o->group = N_("Main"); - 6 0 0 3 0 0 3 0 0 o->subGroup = N_(""); - 6 0 0 3 0 0 3 0 0 o->displayHints = ""; - 6 0 0 3 0 0 3 0 0 o->shortDesc = N_("Edge Triggering Delay"); - 6 2 1 3 0 0 3 0 0 o->longDesc = N_("Interval before triggering actions on edges"); - 6 0 0 3 0 0 3 1 1 o->type = CompOptionTypeInt; - 6 0 0 3 0 0 3 0 0 o->value.i = EDGE_TRIGGERING_DELAY_DEFAULT; - 6 0 0 3 0 0 3 1 1 o->rest.i.min = EDGE_TRIGGERING_DELAY_MIN; - 6 0 0 3 0 0 3 0 0 o->rest.i.max = EDGE_TRIGGERING_DELAY_MAX; - . . . . . . . . . - . . . . . . . . . #if 0 - . . . . . . . . . o = &display->opt[COMP_DISPLAY_OPTION_FOCUS_STEALING_LEVEL]; - . . . . . . . . . o->advanced = False; - . . . . . . . . . o->name = "focus_stealing_prevention_level"; - . . . . . . . . . o->group = N_("Main"); - . . . . . . . . . o->subGroup = N_(""); - . . . . . . . . . o->displayHints = ""; --- line 838 ---------------------------------------- --- line 839 ---------------------------------------- - . . . . . . . . . o->shortDesc = N_("Level of FSP"); - . . . . . . . . . o->longDesc = - . . . . . . . . . N_("How aggressive the focus-stealing-prevention should be"); - . . . . . . . . . o->type = CompOptionTypeString; - . . . . . . . . . o->value.s = strdup(DEFAULT_FSP); - . . . . . . . . . o->rest.s.string = fspTypes; - . . . . . . . . . o->rest.s.nString = FSP_COUNT; - . . . . . . . . . #endif - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompOption *compGetDisplayOptions(CompDisplay * display, int *count) -365 73 5 0 0 0 219 0 0 { -146 0 0 73 0 0 0 0 0 if (display) - . . . . . . . . . { -144 0 0 72 0 0 72 0 0 *count = NUM_OPTIONS(display); -288 0 0 72 0 0 72 17 1 return display->opt; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 3 0 0 0 0 0 2 0 0 CompDisplay *d = malloc(sizeof(CompDisplay)); - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 compDisplayInitOptions(d, NULL, 0); - 2 0 0 1 0 0 1 0 0 *count = NUM_OPTIONS(d); - 76 36 2 74 0 0 1 0 0 return d->opt; - . . . . . . . . . } -146 0 0 146 0 0 0 0 0 } - --------------------------------------------------------------------------------- --- User-annotated source: screen_options.c --------------------------------------------------------------------------------- -Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 49 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . void compScreenInitOptions(CompScreen * screen); - . . . . . . . . . - . . . . . . . . . void compFreeScreenOptions(CompScreen * screen) - . . . . . . . . . { - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void compScreenInitOptions(CompScreen * screen) - 8 2 2 0 0 0 4 0 0 { - . . . . . . . . . CompOption *o; - . . . . . . . . . - 6 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_DETECT_REFRESH_RATE]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 2 1 o->name = "detect_refresh_rate"; - 4 2 2 2 0 0 2 1 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 1 1 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Detect Refresh Rate"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Automatic detection of refresh rate"); - 4 2 2 2 0 0 2 0 0 o->type = CompOptionTypeBool; - 4 2 0 2 0 0 2 0 0 o->value.b = DETECT_REFRESH_RATE_DEFAULT; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_LEGACY_MAXIMIZE_FIX]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 2 1 o->name = "legacy_maximize_fix"; - 4 2 2 2 0 0 2 1 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Enable workarounds for certain Wine and legacy" - . . . . . . . . . " windows"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("This will mask certain windows as maximized based " - . . . . . . . . . "on their inital size settings. This helps on certain" - . . . . . . . . . " Wine and legacy windows, but can create unwanted " - . . . . . . . . . "behavior in other things, such as OpenOffice and " - . . . . . . . . . "similar. "); - 4 2 2 2 0 0 2 1 1 o->type = CompOptionTypeBool; - 4 0 0 2 0 0 2 0 0 o->advanced = True; - 4 0 0 2 0 0 2 0 0 o->value.b = LEGACY_MAXIMIZE_DEFAULT; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_LIGHTING]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 2 2 2 0 0 2 1 0 o->name = "lighting"; - 4 0 0 2 0 0 2 0 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 1 1 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Lighting"); - 4 2 2 2 0 0 2 0 0 o->longDesc = N_("Use diffuse light when screen is transformed"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeBool; - 4 0 0 2 0 0 2 0 0 o->value.b = LIGHTING_DEFAULT; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_REFRESH_RATE]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 2 2 2 0 0 2 0 0 o->name = "refresh_rate"; - 4 0 0 2 0 0 2 1 1 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Refresh Rate"); - 4 2 2 2 0 0 2 0 0 o->longDesc = - . . . . . . . . . N_("The rate at which the screen is redrawn (times/second)"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 0 0 2 0 0 2 1 0 o->value.i = DEFAULT_REFRESH_RATE; - 4 0 0 2 0 0 2 0 0 o->rest.i.min = 1; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = 200; - . . . . . . . . . - 8 2 2 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_SIZE]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 0 0 o->name = "size"; - 4 0 0 2 0 0 2 1 1 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 2 2 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Horizontal Virtual Size"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Screen size multiplier for virtual size"); - 4 0 0 2 0 0 2 1 0 o->type = CompOptionTypeInt; - 4 0 0 2 0 0 2 0 0 o->value.i = SCREEN_SIZE_DEFAULT; - 4 0 0 2 0 0 2 0 0 o->rest.i.min = SCREEN_SIZE_MIN; - 4 2 2 2 0 0 2 0 0 o->rest.i.max = SCREEN_SIZE_MAX; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &(screen->opt[COMP_SCREEN_OPTION_VSIZE]); - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 2 1 o->name = "vsize"; - 4 0 0 2 0 0 2 1 1 o->group = N_("Main"); - 4 2 2 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Vertical Virtual Size"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Screen size multiplier for vertical virtual size"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 2 2 2 0 0 2 1 0 o->value.i = SCREEN_VSIZE_DEFAULT; - 4 0 0 2 0 0 2 0 0 o->rest.i.min = SCREEN_VSIZE_MIN; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = SCREEN_VSIZE_MAX; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_OPACITY_STEP]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 2 2 2 0 0 2 0 0 o->name = "opacity_step"; - 4 0 0 2 0 0 2 1 1 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 1 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Opacity Step"); - 4 2 2 2 0 0 2 0 0 o->longDesc = N_("Opacity change step"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 0 0 2 0 0 2 0 0 o->value.i = OPACITY_STEP_DEFAULT; - 4 0 0 2 0 0 2 0 0 o->rest.i.min = OPACITY_STEP_MIN; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = OPACITY_STEP_MAX; - . . . . . . . . . - 8 2 2 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_SATURATION_STEP]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 1 1 o->name = "saturation_step"; - 4 0 0 2 0 0 2 0 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 1 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 2 2 2 0 0 2 0 0 o->shortDesc = N_("Saturation Step"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Saturation change step"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 0 0 2 0 0 2 0 0 o->value.i = SATURATION_STEP_DEFAULT; - 4 0 0 2 0 0 2 1 1 o->rest.i.min = SATURATION_STEP_MIN; - 4 2 2 2 0 0 2 0 0 o->rest.i.max = SATURATION_STEP_MAX; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_BRIGHTNESS_STEP]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 0 0 o->name = "brightness_step"; - 4 0 0 2 0 0 2 1 0 o->group = N_("Main"); - 4 2 2 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Brightness Step"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Brightness change step"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 2 2 2 0 0 2 1 1 o->value.i = BRIGHTNESS_STEP_DEFAULT; - 4 0 0 2 0 0 2 0 0 o->rest.i.min = BRIGHTNESS_STEP_MIN; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = BRIGHTNESS_STEP_MAX; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_UNREDIRECT_FS]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 2 2 2 0 0 2 0 0 o->name = "unredirect_fullscreen_windows"; - 4 0 0 2 0 0 2 1 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Unredirect Fullscreen Windows"); - 4 2 2 2 0 0 2 0 0 o->longDesc = - . . . . . . . . . N_("Allow drawing of fullscreen windows to not be redirected " - . . . . . . . . . "to offscreen pixmaps"); - 4 0 0 2 0 0 2 1 1 o->type = CompOptionTypeBool; - 4 0 0 2 0 0 2 0 0 o->value.b = UNREDIRECT_FS_DEFAULT; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_DEFAULT_ICON]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 2 2 2 0 0 2 0 0 o->name = "default_icon"; - 4 0 0 2 0 0 2 1 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 1 1 o->displayHints = "file;image;"; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Default Icon"); - 4 2 2 2 0 0 2 0 0 o->longDesc = N_("Default window icon image"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeString; -10 0 0 2 0 0 4 0 0 o->value.s = strdup(DEFAULT_ICON_DEFAULT); - 4 0 0 2 0 0 2 0 0 o->rest.s.string = 0; - 4 0 0 2 0 0 2 0 0 o->rest.s.nString = 0; - . . . . . . . . . - . . . . . . . . . /* o = &screen->opt[COMP_SCREEN_OPTION_SLOWNESS_FIX]; - . . . . . . . . . o->advanced=False; - . . . . . . . . . o->name = "slowness_fix"; - . . . . . . . . . o->group=N_(""); - . . . . . . . . . o->subGroup=N_(""); - . . . . . . . . . o->displayHints=""; - . . . . . . . . . o->shortDesc = N_("Slowness Fix"); - . . . . . . . . . o->longDesc = N_("Toggle this option if beryl is slow or choppy. " - . . . . . . . . . "On some cards, enabling it makes beryl smoother, and on " - . . . . . . . . . "others, disabling makes beryl smoother."); - . . . . . . . . . o->type = CompOptionTypeBool; - . . . . . . . . . o->value.b = TRUE;*/ - . . . . . . . . . - 8 2 2 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_SYNC_TO_VBLANK]; - 4 0 0 2 0 0 2 0 0 o->advanced = False; - 4 0 0 2 0 0 2 1 0 o->name = "sync_to_vblank"; - 4 0 0 2 0 0 2 0 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 1 1 o->subGroup = N_(""); - 4 2 2 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Sync To VBlank"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Only perform screen updates during vertical " - . . . . . . . . . "blanking period"); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeBool; - 4 0 0 2 0 0 2 0 0 o->value.b = SYNC_TO_VBLANK_DEFAULT; - . . . . . . . . . - 8 2 2 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_NUMBER_OF_DESKTOPS]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 0 0 o->name = "number_of_desktops"; - 4 0 0 2 0 0 2 1 1 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 2 2 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Number of Desktops"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Number of virtual desktops"); - 4 0 0 2 0 0 2 1 0 o->type = CompOptionTypeInt; - 4 0 0 2 0 0 2 0 0 o->value.i = SCREEN_NUMBER_OF_DESKTOPS_DEFAULT; - 4 2 2 2 0 0 2 0 0 o->rest.i.min = SCREEN_NUMBER_OF_DESKTOPS_MIN; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = SCREEN_NUMBER_OF_DESKTOPS_MAX; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_CUSTOM_OUTPUT_GRID]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 0 0 o->name = "custom_output_grid"; - 4 2 2 2 0 0 2 1 1 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 1 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Custom Output Grid"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Use custom output grid instead of Xinerama info."); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeBool; - 4 2 2 2 0 0 2 0 0 o->value.b = FALSE; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_OUTPUT_GRID_ROWS]; - 4 0 0 2 0 0 2 2 1 o->advanced = False; - 4 0 0 2 0 0 2 1 1 o->name = "output_grid_rows"; - 4 2 2 2 0 0 2 0 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 1 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Output grid rows"); - 4 0 0 2 0 0 2 0 0 o->longDesc = N_("Number of rows in the custom output grid."); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 2 2 2 0 0 2 0 0 o->value.i = 1; - 4 0 0 2 0 0 2 1 1 o->rest.i.min = 1; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = 99; - . . . . . . . . . - 8 0 0 2 0 0 2 0 0 o = &screen->opt[COMP_SCREEN_OPTION_OUTPUT_GRID_COLS]; - 4 2 2 2 0 0 2 0 0 o->advanced = False; - 4 0 0 2 0 0 2 0 0 o->name = "output_grid_cols"; - 4 0 0 2 0 0 2 1 0 o->group = N_("Main"); - 4 0 0 2 0 0 2 0 0 o->subGroup = N_(""); - 4 0 0 2 0 0 2 0 0 o->displayHints = ""; - 4 0 0 2 0 0 2 0 0 o->shortDesc = N_("Output grid columns"); - 4 2 2 2 0 0 2 0 0 o->longDesc = N_("Number of columns in the custom output grid."); - 4 0 0 2 0 0 2 0 0 o->type = CompOptionTypeInt; - 4 0 0 2 0 0 2 1 1 o->value.i = 2; - 4 0 0 2 0 0 2 0 0 o->rest.i.min = 1; - 4 0 0 2 0 0 2 0 0 o->rest.i.max = 99; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompOption *compGetScreenOptions(CompScreen * screen, int *count) - 8 2 1 0 0 0 6 0 0 { - 4 0 0 2 0 0 2 1 0 *count = NUM_OPTIONS(screen); - 4 0 0 2 0 0 0 0 0 return screen->opt; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompOption *compGetOptions(int *count) - 4 1 1 0 0 0 2 0 0 { - . . . . . . . . . static CompScreen screen; - . . . . . . . . . - 2 0 0 0 0 0 1 0 0 compScreenInitOptions(&screen); - 3 0 0 1 0 0 1 0 0 return compGetScreenOptions(&screen, count); - 2 0 0 2 0 0 0 0 0 } - --------------------------------------------------------------------------------- --- User-annotated source: action.c --------------------------------------------------------------------------------- - No information has been collected for action.c - --------------------------------------------------------------------------------- --- User-annotated source: plugin.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 44 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . #if 0 - . . . . . . . . . #define pr_debug_verbose(a, b...) do { fprintf(stderr, a, ##b); } while(0) - . . . . . . . . . #else - . . . . . . . . . #define pr_debug_verbose(a, b...) do { } while(0) - . . . . . . . . . #endif - . . . . . . . . . - . . . . . . . . . static Bool dlloaderLoadPlugin(CompPlugin * p, char *path, char *name) - 204 2 1 0 0 0 136 0 0 { - . . . . . . . . . char *file; - . . . . . . . . . void *dlhand; - . . . . . . . . . - 1,909 23 2 1,229 18 0 170 0 0 file = malloc((path ? strlen(path) : 0) + strlen(name) + 8); - 68 0 0 34 0 0 0 0 0 if (!file) - . . . . . . . . . return FALSE; - . . . . . . . . . - 68 17 1 34 0 0 0 0 0 if (path) - 238 0 0 102 0 0 34 0 0 sprintf(file, "%s/lib%s.so", path, name); - . . . . . . . . . else - . . . . . . . . . sprintf(file, "lib%s.so", name); - . . . . . . . . . - 136 35 1 34 0 0 68 32 0 dlhand = dlopen(file, RTLD_LAZY); - 68 0 0 34 0 0 0 0 0 if (dlhand) - . . . . . . . . . { - . . . . . . . . . PluginGetInfoProc getInfo; - . . . . . . . . . char *error; - . . . . . . . . . - 17 0 0 0 0 0 17 0 0 dlerror(); - . . . . . . . . . - 68 0 0 17 0 0 34 0 0 getInfo = (PluginGetInfoProc) dlsym(dlhand, "getCompPluginInfo"); - . . . . . . . . . - 34 0 0 0 0 0 34 0 0 error = dlerror(); - 34 0 0 17 0 0 0 0 0 if (error) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, "%s: dlsym: %s\n", programName, error); - . . . . . . . . . - . . . . . . . . . getInfo = 0; - . . . . . . . . . } - . . . . . . . . . - 34 1 1 17 0 0 0 0 0 if (getInfo) - . . . . . . . . . { - 85 0 0 34 17 0 34 17 0 p->vTable = (*getInfo) (); - 68 17 1 34 0 0 0 0 0 if (!p->vTable) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: Couldn't get vtable from '%s' plugin\n"), - . . . . . . . . . programName, file); - . . . . . . . . . - . . . . . . . . . dlclose(dlhand); - . . . . . . . . . free(file); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - 595 51 3 357 16 0 0 0 0 if (p->vTable->version != BERYL_VERSION || - . . . . . . . . . p->vTable->struct_plugin_size != - . . . . . . . . . sizeof(CompPlugin) - . . . . . . . . . || p->vTable->struct_display_size != - . . . . . . . . . sizeof(CompDisplay) - . . . . . . . . . || p->vTable->struct_screen_size != - . . . . . . . . . sizeof(CompScreen) - . . . . . . . . . || p->vTable->struct_window_size != - . . . . . . . . . sizeof(CompWindow) --- line 106 ---------------------------------------- --- line 145 ---------------------------------------- - . . . . . . . . . dlclose(dlhand); - . . . . . . . . . free(file); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 34 1 1 17 0 0 17 0 0 free(file); - . . . . . . . . . - 51 4 1 34 0 0 17 16 0 return FALSE; - . . . . . . . . . } - . . . . . . . . . - 34 3 1 17 0 0 17 0 0 free(file); - . . . . . . . . . - 51 0 0 34 0 0 17 5 0 p->devPrivate.ptr = dlhand; - 34 0 0 17 0 0 17 0 0 p->devType = "dlloader"; - . . . . . . . . . - 34 0 0 0 0 0 17 0 0 return TRUE; - 68 0 0 68 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void dlloaderUnloadPlugin(CompPlugin * p) - . . . . . . . . . { - . . . . . . . . . dlclose(p->devPrivate.ptr); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . LoadPluginProc loaderLoadPlugin = dlloaderLoadPlugin; - . . . . . . . . . UnloadPluginProc loaderUnloadPlugin = dlloaderUnloadPlugin; - . . . . . . . . . - . . . . . . . . . Bool initPluginForDisplay(CompPlugin * p, CompDisplay * d) - 85 7 1 0 0 0 51 0 0 { - 51 0 0 34 3 0 17 0 0 CompScreen *s, *failedScreen = d->screens; - 17 6 2 0 0 0 17 0 0 Bool status = TRUE; - . . . . . . . . . - 136 2 0 85 10 2 17 0 0 if (!(*p->vTable->initDisplay) (p, d)) - . . . . . . . . . return FALSE; - . . . . . . . . . - 187 7 2 102 24 1 34 7 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . { - 119 8 2 68 16 2 17 0 0 if (!(*s->initPluginForScreen) (p, s)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Plugin '%s':initScreen failed\n"), - . . . . . . . . . programName, p->vTable->name); - . . . . . . . . . failedScreen = s; - . . . . . . . . . status = FALSE; - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 119 9 2 68 19 1 17 0 0 for (s = d->screens; s != failedScreen; s = s->next) - . . . . . . . . . (*s->finiPluginForScreen) (p, s); - . . . . . . . . . - 85 0 0 51 1 0 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - . . . . . . . . . CompOption *option; - . . . . . . . . . CompOptionValue value; - . . . . . . . . . int nOption; - . . . . . . . . . - 84 9 2 48 0 0 24 0 0 option=(*p->vTable->getDisplayOptions) (d, &nOption); - 720 18 4 236 0 0 118 0 0 while (nOption--) - . . . . . . . . . { - 1,802 8 2 848 139 6 742 0 0 memcpy(&value,&option->value,sizeof(CompOptionValue)); - 1,378 0 0 742 41 2 106 0 0 if (beryl_settings_context_comp_get_option_value(d->context,p->vTable->name,option->name,FALSE,&value)) - . . . . . . . . . { - 530 0 0 318 0 0 0 0 0 if (p->vTable->setDisplayOption) - 848 0 0 636 0 0 106 0 0 p->vTable->setDisplayOption(d,option->name,&value); - . . . . . . . . . } - 106 0 0 106 1 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . } - 51 3 0 34 0 0 17 0 0 return status; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void finiPluginForDisplay(CompPlugin * p, CompDisplay * d) - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . - . . . . . . . . . for (s = d->screens; s; s = s->next) - . . . . . . . . . (*s->finiPluginForScreen) (p, s); - . . . . . . . . . - . . . . . . . . . (*p->vTable->finiDisplay) (p, d); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . Bool initPluginForScreen(CompPlugin * p, CompScreen * s) - 85 9 2 0 0 0 51 0 0 { - 17 5 1 0 0 0 17 0 0 Bool status = TRUE; - 51 0 0 34 0 0 17 0 0 CompDisplay *d = s->display; - 85 0 0 51 17 0 0 0 0 if (p->vTable->initScreen) - . . . . . . . . . { - 120 4 1 75 0 0 15 0 0 if (!(*p->vTable->initScreen) (p, s)) - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 85 8 2 51 22 2 0 0 0 if (p->vTable->initWindow) - . . . . . . . . . { - 18 0 0 12 3 0 6 6 0 CompWindow *w, *failedWindow = s->windows; - . . . . . . . . . - 6,636 4 2 3,978 1 0 1,326 0 0 for (w = s->windows; w; w = w->next) - . . . . . . . . . { -10,560 4 2 6,600 0 0 1,320 0 0 if (!(*p->vTable->initWindow) (p, w)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Plugin '%s':initWindow " - . . . . . . . . . "failed\n"), programName, p->vTable->name); - . . . . . . . . . failedWindow = w; - . . . . . . . . . status = FALSE; - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 30 0 0 18 0 0 0 0 0 if (p->vTable->finiWindow) - . . . . . . . . . { - 42 2 1 24 0 0 6 0 0 for (w = s->windows; w != failedWindow; w = w->next) - . . . . . . . . . (*p->vTable->finiWindow) (p, w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 85 4 1 51 10 0 0 0 0 if (p->vTable->getScreenOptions) - . . . . . . . . . { - . . . . . . . . . CompOption *option; - . . . . . . . . . CompOptionValue value; - . . . . . . . . . int nOption; - 10 8 2 0 0 0 10 1 1 nOption=0; - 70 0 0 40 0 0 20 0 0 option=(*p->vTable->getScreenOptions) (s, &nOption); - 1,132 3 1 374 0 0 187 0 0 while (nOption--) - . . . . . . . . . { - 3,009 14 2 1,416 259 46 1,239 10 1 memcpy(&value,&option->value,sizeof(CompOptionValue)); - 2,301 12 2 1,239 62 11 177 0 0 if (beryl_settings_context_comp_get_option_value(d->context,p->vTable->name,option->name,TRUE,&value)) - . . . . . . . . . { - 885 0 0 531 25 0 0 0 0 if (p->vTable->setScreenOption) - 1,416 0 0 1,062 2 0 177 0 0 p->vTable->setScreenOption(s,option->name,&value); - . . . . . . . . . } - 177 4 0 177 4 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 51 6 1 34 1 0 17 0 0 return status; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void finiPluginForScreen(CompPlugin * p, CompScreen * s) - . . . . . . . . . { - . . . . . . . . . if (p->vTable->finiWindow) - . . . . . . . . . { - . . . . . . . . . CompWindow *w = s->windows; - . . . . . . . . . - . . . . . . . . . for (w = s->windows; w; w = w->next) --- line 291 ---------------------------------------- --- line 292 ---------------------------------------- - . . . . . . . . . (*p->vTable->finiWindow) (p, w); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . if (p->vTable->finiScreen) - . . . . . . . . . (*p->vTable->finiScreen) (p, s); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static Bool initPlugin(CompPlugin * p) - 68 15 4 0 0 0 34 0 0 { - 34 0 0 17 1 0 17 0 0 CompDisplay *d = compDisplays; - . . . . . . . . . - 119 0 0 68 11 1 17 0 0 if (!(*p->vTable->init) (p)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: InitPlugin '%s' failed\n"), - . . . . . . . . . programName, p->vTable->name); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 34 1 1 17 0 0 0 0 0 if (d) - . . . . . . . . . { - 119 7 1 68 16 1 17 0 0 if (!(*d->initPluginForDisplay) (p, d)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Plugin '%s':initDisplay failed\n"), - . . . . . . . . . programName, p->vTable->name); - . . . . . . . . . - . . . . . . . . . (*p->vTable->fini) (p); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 34 11 2 17 0 0 17 15 1 return TRUE; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void finiPlugin(CompPlugin * p) - . . . . . . . . . { - . . . . . . . . . CompDisplay *d = compDisplays; - . . . . . . . . . - . . . . . . . . . if (d) - . . . . . . . . . (*d->finiPluginForDisplay) (p, d); - . . . . . . . . . - . . . . . . . . . (*p->vTable->fini) (p); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void screenInitPlugins(CompScreen * s) - 4 1 1 0 0 0 2 0 0 { - . . . . . . . . . CompPlugin *p; - 1 0 0 0 0 0 1 0 0 int i, j = 0; - . . . . . . . . . - 5 1 1 2 1 1 1 0 0 for (p = plugins; p; p = p->next) - . . . . . . . . . j++; - . . . . . . . . . - 4 1 1 2 0 0 0 0 0 while (j--) - . . . . . . . . . { - . . . . . . . . . i = 0; - . . . . . . . . . for (p = plugins; i < j; p = p->next) - . . . . . . . . . i++; - . . . . . . . . . - . . . . . . . . . if (p->vTable->initScreen) - . . . . . . . . . (*s->initPluginForScreen) (p, s); - . . . . . . . . . } - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void screenFiniPlugins(CompScreen * s) - . . . . . . . . . { - . . . . . . . . . CompPlugin *p; - . . . . . . . . . - . . . . . . . . . for (p = plugins; p; p = p->next) - . . . . . . . . . { - . . . . . . . . . if (p->vTable->finiScreen) - . . . . . . . . . (*s->finiPluginForScreen) (p, s); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void windowInitPlugins(CompWindow * w) - 948 223 6 0 0 0 474 0 0 { - . . . . . . . . . CompPlugin *p; - . . . . . . . . . - 2,630 229 3 1,341 184 3 526 0 0 for (p = plugins; p; p = p->next) - . . . . . . . . . { - 1,445 0 0 867 481 27 0 0 0 if (p->vTable->initWindow) - 612 0 0 510 0 0 102 0 0 (*p->vTable->initWindow) (p, w); - . . . . . . . . . } - 474 0 0 474 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void windowFiniPlugins(CompWindow * w) - 16 2 0 0 0 0 8 0 0 { - . . . . . . . . . CompPlugin *p; - . . . . . . . . . - 360 2 0 212 23 0 72 0 0 for (p = plugins; p; p = p->next) - . . . . . . . . . { - 340 0 0 204 134 0 0 0 0 if (p->vTable->finiWindow) - 144 0 0 120 0 0 24 0 0 (*p->vTable->finiWindow) (p, w); - . . . . . . . . . } - 8 0 0 8 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int findActivePluginIndex(char *name) - 20 5 1 0 0 0 10 0 0 { - . . . . . . . . . CompPlugin *p; - 5 0 0 0 0 0 5 0 0 int i = 0; - . . . . . . . . . - 25 5 1 10 2 0 5 0 0 for (p = plugins; p; p = p->next) - . . . . . . . . . { - 35 5 1 20 7 1 5 0 0 if (!strcmp(p->vTable->name, name)) - 50 0 0 20 0 0 10 0 0 return (p->state == BerylPluginReady) ? i : -1; - . . . . . . . . . i++; - . . . . . . . . . } - 5 0 0 5 0 0 0 0 0 return -1; - 10 0 0 10 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompPlugin *findActivePlugin(char *name) - 8 2 2 0 0 0 4 0 0 { - . . . . . . . . . CompPlugin *p; - . . . . . . . . . - 30 2 2 16 4 0 6 0 0 for (p = plugins; p; p = p->next) - 42 0 0 24 9 0 6 0 0 if (!strcmp(p->vTable->name, name)) - 18 0 0 7 2 0 4 0 0 return (p->state == BerylPluginReady) ? p : 0; - . . . . . . . . . - 2 0 0 2 0 0 0 0 0 return 0; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static CompPlugin *findActivePluginWithFeature(char *name, - . . . . . . . . . CompPluginFeature ** feature) - 60 8 2 0 0 0 36 0 0 { - . . . . . . . . . CompPlugin *p; - . . . . . . . . . int i; - . . . . . . . . . - 940 12 2 552 13 1 188 0 0 for (p = plugins; p; p = p->next) - . . . . . . . . . { - 708 0 0 354 67 0 0 0 0 if (p->state != BerylPluginReady) - . . . . . . . . . continue; - . . . . . . . . . - 876 6 2 565 53 1 90 0 0 for (i = 0; i < p->vTable->nFeatures; i++) - . . . . . . . . . { - 504 0 0 252 17 1 42 0 0 if (!strcmp(p->vTable->features[i].name, name)) - . . . . . . . . . { - 2 0 0 1 0 0 0 0 0 if (feature) - 9 0 0 5 0 0 1 0 0 *feature = &p->vTable->features[i]; - . . . . . . . . . - 3 0 0 1 0 0 1 0 0 return p; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 23 0 0 12 0 0 11 0 0 return 0; - 24 0 0 24 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompPluginFeature *findActiveFeature(char *name) - 8 2 2 0 0 0 4 0 0 { - . . . . . . . . . CompPluginFeature *feature; - . . . . . . . . . - 10 0 0 2 0 0 2 0 0 if (findActivePluginWithFeature(name, &feature)) - 3 1 1 1 0 0 1 0 0 return feature; - 3 1 1 2 0 0 1 0 0 return 0; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void unloadPlugin(CompPlugin * p, CompDisplay * d) - . . . . . . . . . { - . . . . . . . . . int i, index = -1; - . . . . . . . . . CompOptionValue *value; - . . . . . . . . . - . . . . . . . . . for (i = 0; i < d->plugin.list.nValue; i++) - . . . . . . . . . if (!strcmp(p->vTable->name, d->plugin.list.value[i].s)) --- line 455 ---------------------------------------- --- line 478 ---------------------------------------- - . . . . . . . . . /* Shrink list allocation if possible */ - . . . . . . . . . value = realloc(d->plugin.list.value, sizeof(CompOption) * - . . . . . . . . . (d->plugin.list.nValue)); - . . . . . . . . . if (value) - . . . . . . . . . d->plugin.list.value = value; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . CompPlugin *loadPlugin(char *name, CompDisplay * d) - 102 19 2 0 0 0 68 0 0 { - . . . . . . . . . CompPlugin *p; - . . . . . . . . . char *home, *plugindir; - . . . . . . . . . Bool status; - . . . . . . . . . CompOptionValue *value; - . . . . . . . . . - 204 0 0 68 1 1 34 0 0 value = realloc(d->plugin.list.value, sizeof(CompOption) * - . . . . . . . . . (d->plugin.list.nValue + 1)); - 34 2 1 17 0 0 0 0 0 if (!value) - . . . . . . . . . return 0; - . . . . . . . . . - 187 3 1 68 0 0 34 5 0 value[d->plugin.list.nValue].s = strdup(name); - 51 0 0 34 0 0 17 0 0 d->plugin.list.value = value; - . . . . . . . . . - . . . . . . . . . /* Don't increase count until loaded okay */ - . . . . . . . . . - 51 0 0 0 0 0 34 0 0 p = malloc(sizeof(CompPlugin)); - 34 0 0 17 0 0 0 0 0 if (!p) - . . . . . . . . . return 0; - 34 0 0 17 0 0 17 0 0 p->next = 0; - 34 2 1 17 0 0 17 0 0 p->devPrivate.uval = 0; - 34 0 0 17 0 0 17 0 0 p->devType = NULL; - 34 0 0 17 0 0 17 0 0 p->vTable = 0; - 34 0 0 17 0 0 17 0 0 p->state = BerylPluginNeedsInit; - . . . . . . . . . - 51 0 0 0 0 0 34 0 0 home = getenv("HOME"); - 34 2 1 17 0 0 0 0 0 if (home) - . . . . . . . . . { - 391 0 0 221 0 0 51 0 0 plugindir = malloc(strlen(home) + strlen(HOME_PLUGINDIR) + 3); - 34 0 0 17 0 0 0 0 0 if (plugindir) - . . . . . . . . . { - 102 11 1 34 0 0 17 0 0 sprintf(plugindir, "%s/%s", home, HOME_PLUGINDIR); - 102 0 0 68 17 1 34 16 0 status = (*loaderLoadPlugin) (p, plugindir, name); - 34 0 0 17 17 0 17 0 0 free(plugindir); - . . . . . . . . . - 34 0 0 17 0 0 0 0 0 if (status) - . . . . . . . . . goto loaded; - . . . . . . . . . } - . . . . . . . . . } - 102 1 1 51 15 0 34 17 0 status = (*loaderLoadPlugin) (p, PLUGINDIR, name); - 34 0 0 17 0 0 0 0 0 if (status) - . . . . . . . . . goto loaded; - . . . . . . . . . - . . . . . . . . . status = (*loaderLoadPlugin) (p, NULL, name); - . . . . . . . . . if (status) - . . . . . . . . . goto loaded; - . . . . . . . . . fprintf(stderr, _("%s: Couldn't load plugin '%s'\n"), programName, name); - . . . . . . . . . free(p); - . . . . . . . . . - . . . . . . . . . return 0; - . . . . . . . . . - . . . . . . . . . loaded: - 85 34 2 51 34 0 17 0 0 d->plugin.list.nValue++; - 51 0 0 34 0 0 17 0 0 return p; - 68 0 0 51 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static int comparePluginDeps(CompPlugin * new, CompPlugin * existing) - 525 0 0 0 0 0 315 0 0 { - . . . . . . . . . CompPluginDep *deps; - . . . . . . . . . int nDeps; - . . . . . . . . . - 420 0 0 315 16 0 105 0 0 deps = new->vTable->deps; - 420 1 1 315 6 0 105 0 0 nDeps = new->vTable->nDeps; - . . . . . . . . . - 660 1 1 370 0 0 0 0 0 while (nDeps--) - . . . . . . . . . { - 479 0 0 282 12 0 85 0 0 switch (deps->rule) - . . . . . . . . . { - . . . . . . . . . case CompPluginRuleBefore: - 96 0 0 60 6 0 12 0 0 if (!strcmp(deps->name, existing->vTable->name)) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: '%s' plugin must be loaded before '%s' " - . . . . . . . . . "plugin\n"), programName, - . . . . . . . . . new->vTable->name, deps->name); - . . . . . . . . . - . . . . . . . . . return -1; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case CompPluginRuleAfterCategory: - 48 1 1 30 4 0 6 0 0 if (!strcmp(deps->name, existing->vTable->category)) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: '%s' plugin must be loaded after category '%s'" - . . . . . . . . . " which contains '%s' plugin"), programName, - . . . . . . . . . new->vTable->name, deps->name, - . . . . . . . . . existing->vTable->name); - . . . . . . . . . return 1; - . . . . . . . . . } - . . . . . . . . . case CompPluginRuleAfter: - 576 1 1 360 8 0 72 0 0 if (!strcmp(deps->name, existing->vTable->name)) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: '%s' plugin must be loaded after '%s' " - . . . . . . . . . "plugin\n"), programName, - . . . . . . . . . new->vTable->name, deps->name); - . . . . . . . . . - 8 0 0 0 0 0 4 0 0 return 1; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case CompPluginRuleRequire: - 5 0 0 2 0 0 1 0 0 if (!findActiveFeature(deps->name)) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose(stderr, - . . . . . . . . . "%s: '%s' plugin needs feature '%s' which " - . . . . . . . . . "is currently not provided by any plugin\n", - . . . . . . . . . programName, new->vTable->name, deps->name); - . . . . . . . . . - 2 0 0 0 0 0 1 0 0 return 1; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . - 80 0 0 80 0 0 0 0 0 deps++; - . . . . . . . . . } - . . . . . . . . . - 205 0 0 105 0 0 100 0 0 return 0; - 210 0 0 210 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool checkPluginDeps(CompPlugin * p) - 68 6 1 0 0 0 34 0 0 { - . . . . . . . . . CompPluginDep *deps; - . . . . . . . . . int nDeps; - . . . . . . . . . - 68 7 2 51 7 0 17 0 0 deps = p->vTable->deps; - 68 0 0 51 0 0 17 0 0 nDeps = p->vTable->nDeps; - . . . . . . . . . - 149 7 2 88 0 0 0 0 0 while (nDeps--) - . . . . . . . . . { - 134 0 0 54 10 3 0 0 0 switch (deps->rule) - . . . . . . . . . { - . . . . . . . . . case CompPluginRuleRequire: - 5 0 0 2 0 0 1 0 0 if (!findActiveFeature(deps->name)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . "%s: '%s' plugin needs feature '%s' which " - . . . . . . . . . "is currently not provided by any plugin\n", - . . . . . . . . . programName, p->vTable->name, deps->name); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . default: - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . - 27 0 0 27 0 0 0 0 0 deps++; - . . . . . . . . . } - . . . . . . . . . - 34 1 1 17 0 0 17 0 0 return TRUE; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool splashWasActive = FALSE; - . . . . . . . . . - . . . . . . . . . static void splashActivate(CompPlugin * p) - 68 6 1 0 0 0 34 0 0 { - 34 0 0 17 17 1 17 0 0 CompDisplay *d = compDisplays; - . . . . . . . . . - 114 4 1 44 17 1 9 0 0 if (splashWasActive || strcmp(p->vTable->name, "splash") != 0) - 8 0 0 0 0 0 0 0 0 return; - 1 0 0 0 0 0 1 0 0 splashWasActive = TRUE; - . . . . . . . . . - 1 0 0 0 0 0 1 0 0 int i, nOpts = 0; - 7 1 1 4 0 0 2 0 0 CompOption *o = p->vTable->getDisplayOptions(d, &nOpts); - . . . . . . . . . CompScreen *s; - . . . . . . . . . - 11 0 0 6 0 0 2 0 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . { - 37 0 0 26 0 0 1 0 0 for (i = 0; i < nOpts; i++) - . . . . . . . . . { - 96 1 1 24 0 0 8 0 0 if (strcmp(o[i].name, "initiate") == 0) - . . . . . . . . . { - . . . . . . . . . CompOption root; - . . . . . . . . . - 1 0 0 0 0 0 1 0 0 root.type = CompOptionTypeInt; - 1 0 0 0 0 0 1 0 0 root.name = "root"; - 3 0 0 2 0 0 1 0 0 root.value.i = s->root; - 2 0 0 0 0 0 1 0 0 printf("Initiating splash\n"); - 21 1 1 6 0 0 1 0 0 (*o[i].value.action.initiate) (d, - . . . . . . . . . &(o[i]. - . . . . . . . . . value.action), 0, &root, 1); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 34 8 1 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool tryInitPlugin(CompPlugin * p) - 68 10 3 0 0 0 34 0 0 { - . . . . . . . . . CompPlugin *plugin; - . . . . . . . . . int i; - . . . . . . . . . - 179 17 4 118 18 2 17 0 0 for (i = 0; i < p->vTable->nFeatures; i++) - . . . . . . . . . { - 110 5 1 50 7 0 20 0 0 plugin = findActivePluginWithFeature(p->vTable->features[i].name, 0); - . . . . . . . . . - 20 0 0 10 0 0 0 0 0 if (plugin) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . "%s: Plugin '%s' can't be activated because " - . . . . . . . . . "plugin '%s' is already providing feature '%s'\n", - . . . . . . . . . programName, p->vTable->name, - . . . . . . . . . plugin->vTable->name, p->vTable->features[i].name); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 68 0 0 17 0 0 17 0 0 if (!checkPluginDeps(p)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: Can't activate '%s' plugin due to dependency " - . . . . . . . . . "problems\n"), programName, p->vTable->name); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 68 11 2 17 0 0 17 0 0 if (!initPlugin(p)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: Couldn't activate plugin '%s'\n"), - . . . . . . . . . programName, p->vTable->name); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 34 12 1 17 0 0 17 0 0 splashActivate(p); - . . . . . . . . . - 34 0 0 17 0 0 17 3 1 p->state = BerylPluginReady; - . . . . . . . . . - 34 0 0 17 0 0 17 0 0 return TRUE; - 34 0 0 34 14 1 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompPlugin *getPlugins(void) - 110 34 1 0 0 0 55 0 0 { - 55 0 0 55 46 0 0 0 0 return plugins; - 110 0 0 110 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . - . . . . . . . . . static void sort_plugin_list(void) - 3 1 1 0 0 0 1 0 0 { - 1 1 1 0 0 0 1 0 0 CompPlugin *new_list = NULL, *todo; - . . . . . . . . . - 3 0 0 1 0 0 0 0 0 if (!plugins) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose("No plugins loaded.\n"); - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* Put first plugin in new list */ - 2 0 0 1 0 0 1 0 0 new_list = plugins; - 3 0 0 2 0 0 1 0 0 plugins = plugins->next; - 2 0 0 1 0 0 1 0 0 new_list->next = NULL; - 2 1 1 1 0 0 1 0 0 todo = plugins; - . . . . . . . . . - . . . . . . . . . pr_debug_verbose("Put %s at head of list.\n", new_list->vTable->name); - . . . . . . . . . - 35 2 1 17 0 0 0 0 0 while (todo) - . . . . . . . . . { - 32 0 0 16 0 0 16 0 0 CompPlugin *insert_at = new_list, *prev = - 80 0 0 48 0 0 32 0 0 new_list, *next_todo = todo->next; - 16 0 0 0 0 0 16 0 0 int done = 0; - . . . . . . . . . - . . . . . . . . . pr_debug_verbose("Considering %s.\n", todo->vTable->name); - . . . . . . . . . - 476 0 0 230 0 0 0 0 0 while (insert_at && !done) - . . . . . . . . . { - 525 1 1 210 0 0 105 0 0 if (comparePluginDeps(todo, insert_at) == 1) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose(" %s must be after %s.\n", - . . . . . . . . . todo->vTable->name, insert_at->vTable->name); - 15 0 0 10 0 0 5 0 0 todo->next = insert_at; - 15 0 0 10 0 0 0 0 0 if (insert_at == new_list) - 6 0 0 2 0 0 2 0 0 new_list = todo; - . . . . . . . . . else - 9 0 0 6 0 0 3 0 0 prev->next = todo; - 5 0 0 0 0 0 5 0 0 done = 1; - . . . . . . . . . } - 210 0 0 105 0 0 105 0 0 prev = insert_at; - 315 0 0 210 0 0 105 0 0 insert_at = insert_at->next; - . . . . . . . . . } - . . . . . . . . . - 32 0 0 16 0 0 0 0 0 if (!done) - . . . . . . . . . { - . . . . . . . . . pr_debug_verbose(" %s added to list tail.\n", todo->vTable->name); - 33 0 0 22 0 0 11 0 0 prev->next = todo; - 22 0 0 11 0 0 11 0 0 todo->next = NULL; - . . . . . . . . . } - 32 0 0 16 0 0 16 0 0 todo = next_todo; - . . . . . . . . . } - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 plugins = new_list; - . . . . . . . . . - . . . . . . . . . pr_debug("New list: "); - 37 0 0 18 0 0 0 0 0 while (new_list) - . . . . . . . . . { - . . . . . . . . . pr_debug("%s ", new_list->vTable->name); - 51 0 0 34 0 0 17 0 0 new_list = new_list->next; - . . . . . . . . . } - . . . . . . . . . pr_debug("\n"); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void updatePlugins(CompDisplay * d) - 5 1 1 0 0 0 3 0 0 { - . . . . . . . . . CompOption *o; - 1 0 0 0 0 0 1 0 0 CompPlugin *p, *prev = NULL; - 2 1 1 0 0 0 2 0 0 int i, j, old_num = 0, new_num = 0; - 1 0 0 0 0 0 1 0 0 Bool settingsLoaded = FALSE; - . . . . . . . . . - 6 1 1 3 1 0 1 0 0 for (i = 0; i < d->nRequestFlags; i++) - . . . . . . . . . { - . . . . . . . . . for (j = 0; j < 8; j++) - . . . . . . . . . { - . . . . . . . . . d->requestFlags[i].data[j] = 0; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* Unload by default. */ - . . . . . . . . . pr_debug("Pop: "); - 2 0 0 1 1 0 1 0 0 p = plugins; - 3 1 1 1 0 0 0 0 0 while (p) - . . . . . . . . . { - . . . . . . . . . old_num++; - . . . . . . . . . pr_debug("%s ", p->vTable->name); - . . . . . . . . . - . . . . . . . . . - . . . . . . . . . finiPlugin(p); - . . . . . . . . . p->state = BerylPluginNeedsUnload; - . . . . . . . . . --- line 815 ---------------------------------------- --- line 823 ---------------------------------------- - . . . . . . . . . * first startup to get the list of plugins to be - . . . . . . . . . * activated - . . . . . . . . . */ - . . . . . . . . . - . . . . . . . . . - . . . . . . . . . GSList * active_plugins; - . . . . . . . . . GSList * iter; - . . . . . . . . . //o = &d->opt[COMP_DISPLAY_OPTION_ACTIVE_PLUGINS]; - 4 0 0 2 0 0 2 1 0 active_plugins=beryl_settings_context_get_active_plugins(d->context); - . . . . . . . . . - . . . . . . . . . /* - . . . . . . . . . * Now mark names still in the list as ok, and - . . . . . . . . . * find how many plugins we'll have in the new - . . . . . . . . . * list. Don't load new plugins yet though, - . . . . . . . . . * because we want to make sure we can allocate - . . . . . . . . . * the new list first. - . . . . . . . . . */ - . . . . . . . . . - 90 1 1 53 0 0 18 0 0 for (iter=active_plugins;iter;iter=iter->next) - . . . . . . . . . { - . . . . . . . . . pr_debug("Plugin %s ", beryl_settings_plugin_get_name(iter->data)); - 34 0 0 17 1 0 17 0 0 p = plugins; - 51 0 0 17 0 0 0 0 0 while (p) - . . . . . . . . . { - . . . . . . . . . if (!strcmp(beryl_settings_plugin_get_name(iter->data), p->vTable->name)) - . . . . . . . . . { - . . . . . . . . . pr_debug("matches an existing plugin name.\n"); - . . . . . . . . . if (p->state == BerylPluginNeedsUnload) - . . . . . . . . . { - . . . . . . . . . p->state = BerylPluginNeedsInit; - . . . . . . . . . new_num++; --- line 853 ---------------------------------------- --- line 866 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . pr_debug("New number of plugins is %d.\n", new_num); - . . . . . . . . . pr_debug("Checking for new plugins.\n"); - . . . . . . . . . - . . . . . . . . . /* - . . . . . . . . . * Now mark names still in the list as ok, and - . . . . . . . . . * seek to load plugins with new names. - . . . . . . . . . */ - 90 1 1 53 17 0 18 0 0 for (iter = active_plugins; iter; iter=iter->next) - . . . . . . . . . { - 34 3 0 17 0 0 17 0 0 p = plugins; - 323 3 1 153 0 0 0 0 0 while (p) - . . . . . . . . . { - 1,632 0 0 680 266 2 272 0 0 if (!strcmp(beryl_settings_plugin_get_name(iter->data), p->vTable->name)) - . . . . . . . . . { - . . . . . . . . . break; - . . . . . . . . . } - 408 0 0 272 26 0 136 0 0 p = p->next; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* New plugin? */ - 34 1 1 17 0 0 0 0 0 if (!p) - . . . . . . . . . { - . . . . . . . . . pr_debug("Seeking to load %s.\n", beryl_settings_plugin_get_name(iter->data)); - 136 0 0 51 0 0 51 0 0 p = loadPlugin(beryl_settings_plugin_get_name(iter->data), d); - 34 0 0 17 0 0 0 0 0 if (p) - . . . . . . . . . { - 51 0 0 34 17 0 17 0 0 p->next = plugins; - 34 0 0 17 0 0 17 0 0 plugins = p; - 17 0 0 17 17 0 0 0 0 new_num++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* Unload old plugins before sorting! */ - 2 0 0 1 0 0 1 0 0 p = plugins; - 37 1 1 18 0 0 0 0 0 while (p) - . . . . . . . . . { - 51 0 0 34 16 0 17 0 0 CompPlugin *next = p->next; - . . . . . . . . . - 68 1 1 34 6 0 0 0 0 if (p->state == BerylPluginNeedsUnload) - . . . . . . . . . { - . . . . . . . . . pr_debug("Unloading %s...", p->vTable->name); - . . . . . . . . . if (p == plugins) - . . . . . . . . . plugins = next; - . . . . . . . . . else - . . . . . . . . . prev->next = next; - . . . . . . . . . unloadPlugin(p, d); - . . . . . . . . . pr_debug("done.\n"); - . . . . . . . . . } - . . . . . . . . . else - 34 0 0 17 0 0 17 0 0 prev = p; - 34 0 0 17 0 0 17 0 0 p = next; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . pr_debug_verbose("Seeking to arrange new plugin list.\n"); - . . . . . . . . . - 1 0 0 0 0 0 1 0 0 sort_plugin_list(); - . . . . . . . . . - . . . . . . . . . pr_debug_verbose("Initialising new plugins.\n"); - . . . . . . . . . - . . . . . . . . . /* - . . . . . . . . . * Ok. Now we know what needs initialising and in. - . . . . . . . . . * what order. - . . . . . . . . . * - . . . . . . . . . * This could be done more efficiently (O(n^2/2) at the mo), - . . . . . . . . . * but n will normally be small, it isn't run often, - . . . . . . . . . * and I decided the extra complexity of a doubly linked list - . . . . . . . . . * wasn't worth it. - NC - . . . . . . . . . */ - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 i = new_num; - 37 6 3 18 0 0 0 0 0 while (i) - . . . . . . . . . { - 17 9 1 0 0 0 17 0 0 CompPlugin *prev = NULL; - . . . . . . . . . - 34 0 0 17 0 0 17 0 0 p = plugins; - 629 1 1 442 0 0 17 0 0 for (j = 1; j < i; j++) - . . . . . . . . . { - 272 0 0 136 0 0 136 0 0 prev = p; - 408 0 0 272 106 1 136 0 0 p = p->next; - . . . . . . . . . } - . . . . . . . . . pr_debug("Trying to initialise %s... ", p->vTable->name); - 68 0 0 34 15 2 0 0 0 if (p->state == BerylPluginNeedsInit) - . . . . . . . . . { - 68 11 1 17 0 0 17 0 0 if (!tryInitPlugin(p)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . "Couldn't initialise %s. This should not happen!\n", - . . . . . . . . . p->vTable->name); - . . . . . . . . . if (prev) - . . . . . . . . . prev->next = p->next; - . . . . . . . . . else - . . . . . . . . . plugins = p->next; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . pr_debug("Done.\n"); - . . . . . . . . . } - 17 7 1 17 15 1 0 0 0 i--; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . pr_debug_verbose("Initialisation done.\n"); - . . . . . . . . . - . . . . . . . . . pr_debug("Indirect routine.\n"); - . . . . . . . . . //(*d->setDisplayOption) (d, o->name, &d->plugin); - . . . . . . . . . - 2 0 0 1 0 0 1 1 0 d->dirtyPluginList = FALSE; - . . . . . . . . . - . . . . . . . . . pr_debug("Leaving.\n"); - 4 0 0 3 1 1 0 0 0 } - . . . . . . . . . - . . . . . . . . . void finiPlugins(CompDisplay * d) - . . . . . . . . . { - . . . . . . . . . while (plugins) - . . . . . . . . . { - . . . . . . . . . CompPlugin *next = plugins->next; - . . . . . . . . . - . . . . . . . . . finiPlugin(plugins); --- line 983 ---------------------------------------- - --------------------------------------------------------------------------------- --- User-annotated source: main.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 42 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . char *programName; - . . . . . . . . . char **programArgv; - . . . . . . . . . int programArgc; - . . . . . . . . . REGION infiniteRegion; - . . . . . . . . . REGION emptyRegion; - . . . . . . . . . - . . . . . . . . . REGION *getInfiniteRegion(void) - 4 2 1 0 0 0 2 0 0 { - 2 2 1 0 0 0 0 0 0 return &infiniteRegion; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . REGION *getEmptyRegion(void) - . . . . . . . . . { - . . . . . . . . . return &emptyRegion; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . char *getProgramName(void) - 6 3 2 0 0 0 3 0 0 { - 3 0 0 3 3 1 0 0 0 return programName; - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . char **getProgramArgv(void) - . . . . . . . . . { - . . . . . . . . . return programArgv; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . int getProgramArgc(void) - . . . . . . . . . { --- line 70 ---------------------------------------- --- line 108 ---------------------------------------- - . . . . . . . . . "[--version | -v] " - . . . . . . . . . "[--help | -h] " "[PLUGIN ...]\n"), programName); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static void signalHandler(int sig) - . . . . . . . . . { - . . . . . . . . . int status; - . . . . . . . . . - 12,240 286 2 0 0 0 8,160 0 0 switch (sig) - . . . . . . . . . { - 6,120 0 0 2,040 1,014 264 0 0 0 case SIGCHLD: - 486 0 0 486 0 0 0 0 0 waitpid(-1, &status, WNOHANG | WUNTRACED); - . . . . . . . . . break; - 3,594 288 1 3,594 0 0 0 0 0 case SIGHUP: - 2,040 0 0 0 0 0 2,040 0 0 restartSignal = TRUE; - 4,080 5 0 2,040 0 0 2,040 0 0 default: - 4,080 0 0 0 0 0 0 0 0 break; - . . . . . . . . . } - 3,840 386 2 0 0 0 0 0 0 } - 12,240 0 0 6,120 0 0 6,120 488 120 - . . . . . . . . . static void detect_tfp(void) - 1,173 44 3 390 16 6 781 0 0 { - 2 0 0 0 0 0 2 0 0 pid_t p = fork(); - . . . . . . . . . - 2 0 0 1 0 0 0 0 0 if (p) - . . . . . . . . . { - 120 0 0 0 0 0 120 0 0 int stat; - 1,233 0 0 363 0 0 0 0 0 - 4 0 0 1 0 0 1 0 0 waitpid(p, &stat, 0); - 3,408 18 1 2 0 0 1,702 0 0 if (!WIFEXITED(stat)) - 729 0 0 243 41 22 243 0 0 { - 972 0 0 243 0 0 486 0 0 fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("Something went wrong with texture_from_pixmap detection, giving up.")); - 12,240 3 0 10,200 0 0 0 0 0 exit(1); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 5,398 35 2 2 0 0 1 0 0 if (WEXITSTATUS(stat)) - . . . . . . . . . { - . . . . . . . . . indirectRendering = FALSE; - . . . . . . . . . useCow = TRUE; - . . . . . . . . . strictBinding = FALSE; - . . . . . . . . . skipGlYield = TRUE; - 5,094 32 1 0 0 0 2,830 0 0 printf(_("texture_from_pixmap absent, using Copy mode\n")); - 3,553 34 1 0 0 0 0 0 0 } - . . . . . . . . . else - . . . . . . . . . { - 137 12 1 68 4 0 69 0 0 indirectRendering = TRUE; - 205 0 0 68 0 0 69 0 0 useCow = TRUE; - 1 0 0 0 0 0 1 0 0 strictBinding = TRUE; - 2 0 0 0 0 0 1 0 0 printf(_("texture_from_pixmap Present\n")); - 285 3 0 95 6 0 95 0 0 } - 285 11 0 95 0 0 95 0 0 } - 380 0 0 95 0 0 95 0 0 } - . . . . . . . . . else - . . . . . . . . . { - 363 17 1 137 4 0 0 0 0 execl("/bin/sh", "sh", "-c", - . . . . . . . . . "glxinfo -i 2>/dev/null | grep -q -i GLX_EXT_texture_from_pixmap", - . . . . . . . . . (char *)NULL); - 2,328 0 0 522 0 0 0 0 0 exit(1); - . . . . . . . . . } - 3,654 15 1 1,566 44 1 1,566 0 0 - 3 0 0 2 0 0 0 0 0 } - 5,742 10 1 1,566 0 0 2,088 0 0 - . . . . . . . . . static void detect_nvidia(void) - 3 1 1 0 0 0 1 0 0 { - 2 0 0 0 0 0 2 0 0 pid_t p = fork(); - . . . . . . . . . - 2 0 0 1 0 0 0 0 0 if (p) - . . . . . . . . . { - 537 0 0 179 11 0 179 0 0 int stat; - . . . . . . . . . - 720 0 0 180 0 0 180 0 0 waitpid(p, &stat, 0); - 6 1 1 2 0 0 1 0 0 if (!WIFEXITED(stat)) - 716 0 0 179 0 0 179 0 0 { - . . . . . . . . . fprintf(stderr, - 895 0 0 179 0 0 179 0 0 _ - . . . . . . . . . ("Something went wrong with Nvidia detection, giving up.")); - . . . . . . . . . exit(1); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 3,969 26 2 3,398 0 0 1 0 0 if (WEXITSTATUS(stat)) - . . . . . . . . . { - 2 0 0 0 0 0 1 0 0 printf(_ - . . . . . . . . . ("Nvidia Absent, checking for texture_from_pixmap\n")); - 1,216 0 0 0 0 0 608 0 0 detect_tfp(); - 4,249 31 1 607 33 1 0 0 0 } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . indirectRendering = FALSE; - . . . . . . . . . useCow = TRUE; - . . . . . . . . . strictBinding = FALSE; - 285 10 0 95 0 0 95 0 0 isNVTFP = TRUE; - . . . . . . . . . nvidia = TRUE; - . . . . . . . . . printf(_("Nvidia Present\n")); - 384 6 0 192 4 0 192 0 0 } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . execl("/bin/sh", "sh", "-c", - 88 2 0 44 1 0 44 0 0 "xdpyinfo | grep -q -i NV-GLX", (char *)NULL); - . . . . . . . . . exit(1); - . . . . . . . . . } - . . . . . . . . . - 392 15 1 132 22 0 260 0 0 } - . . . . . . . . . - . . . . . . . . . static void detect_xgl(Bool onlyShm) - 541 1 1 179 0 0 181 0 0 { - 2 0 0 0 0 0 2 0 0 pid_t p = fork(); - 716 0 0 179 0 0 179 0 0 - 2 0 0 1 0 0 0 0 0 if (p) - 358 24 1 179 0 0 179 0 0 { - 358 0 0 179 0 0 179 0 0 int stat; - 358 0 0 179 0 0 179 0 0 - 362 0 0 180 0 0 180 0 0 waitpid(p, &stat, 0); - 364 1 1 181 0 0 180 0 0 if (!WIFEXITED(stat)) - 358 0 0 179 0 0 179 0 0 { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("Something went wrong with Xgl detection, giving up.")); - . . . . . . . . . exit(1); - . . . . . . . . . } - 1,214 0 0 1,214 0 0 0 0 0 else - . . . . . . . . . { - 7 0 0 2 0 0 1 0 0 if (WEXITSTATUS(stat)) - . . . . . . . . . { - 5,064 40 0 714 61 1 0 0 0 //no XGL - 2 1 1 0 0 0 1 0 0 printf(_("XGL Absent, checking for NVIDIA\n")); - 2 0 0 1 0 0 0 0 0 if (!onlyShm) - 287 9 0 95 0 0 1 0 0 detect_nvidia(); - . . . . . . . . . } - 178 12 1 89 0 0 0 0 0 else - . . . . . . . . . { - 22 2 0 11 0 0 0 0 0 noShm = TRUE; - . . . . . . . . . useCow = FALSE; - 248 0 0 124 0 0 0 0 0 if (!onlyShm) - . . . . . . . . . { - 179 0 0 0 0 0 0 0 0 indirectRendering = FALSE; - . . . . . . . . . useCow = FALSE; - . . . . . . . . . strictBinding = FALSE; - . . . . . . . . . printf(_("XGL Present\n")); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - 179 0 0 179 0 0 0 0 0 { - . . . . . . . . . execl("/bin/sh", "sh", "-c", "xvinfo | grep -q -i Xgl", (char *)NULL); - . . . . . . . . . exit(1); - 5,660 30 1 0 0 0 3,396 0 0 } - 3,964 0 0 2 0 0 1,132 0 0 } - 566 0 0 0 0 0 566 0 0 - 566 0 0 0 0 0 566 0 0 static inline void init_variables(void) - 568 30 2 0 0 0 567 0 0 { - 1,699 0 0 566 31 0 1,133 1 1 emptyRegion.rects = &emptyRegion.extents; - 1,699 0 0 566 36 0 1 0 0 emptyRegion.numRects = 0; - 1 0 0 0 0 0 1 0 0 emptyRegion.extents.x1 = 0; - 1 0 0 0 0 0 1 0 0 emptyRegion.extents.y1 = 0; - 3,963 4 1 1,132 31 0 1,699 0 0 emptyRegion.extents.x2 = 0; - 1 1 1 0 0 0 1 0 0 emptyRegion.extents.y2 = 0; - 3,963 0 0 1,132 21 0 1,699 0 0 emptyRegion.size = 0; - 6,186 38 2 1,690 36 3 1,690 0 0 - 4,992 2 1 1,451 36 2 1,452 0 0 infiniteRegion.rects = &infiniteRegion.extents; - 1,699 0 0 566 27 0 1,133 0 0 infiniteRegion.numRects = 1; - 1,699 0 0 566 22 0 1,133 0 0 infiniteRegion.extents.x1 = MINSHORT; - 2,265 14 1 566 166 0 567 0 0 infiniteRegion.extents.y1 = MINSHORT; - 567 0 0 0 0 0 567 0 0 infiniteRegion.extents.x2 = MAXSHORT; - 1,699 1 1 566 0 0 1 0 0 infiniteRegion.extents.y2 = MAXSHORT; - 2 0 0 2 0 0 0 0 0 } - 240 0 0 0 0 0 160 0 0 - 120 5 1 40 0 0 80 0 0 /* Keep them equal to their sopts version */ - 40 0 0 0 0 0 40 0 0 #define OPT_HELP 'h' - 200 0 0 40 0 0 40 0 0 #define OPT_VERSION 'v' - . . . . . . . . . #define OPT_DISPLAY 1 - . . . . . . . . . #define OPT_SCREEN 2 - 540 0 0 121 0 0 0 0 0 #define OPT_FORCE_NVIDIA 4 - . . . . . . . . . #define OPT_FORCE_XGL 5 - 1,134 6 1 0 0 0 567 0 0 #define OPT_FORCE_AIGLX 6 - 81 0 0 0 0 0 81 0 0 #define OPT_USE_COPY 7 - 81 0 0 0 0 0 81 0 0 #define OPT_SM_CLIENT_ID 8 - 486 0 0 243 0 0 81 0 0 - . . . . . . . . . int main(int argc, char **argv) - 332 6 1 82 0 0 166 1 0 { - 1 0 0 0 0 0 1 0 0 char *displayName = 0; - . . . . . . . . . char *plugin[256]; - 1 0 0 0 0 0 1 0 0 int screenNum = -1; - 1 1 1 0 0 0 1 0 0 int nPlugin = 0; - 1 0 0 0 0 0 1 0 0 int result = 0; - 2,105 0 0 526 0 0 527 0 0 Bool disableSm = FALSE; - 2,631 0 0 1,052 0 0 527 0 0 char *clientId = NULL; - 1 0 0 0 0 0 1 0 0 Bool forceNvidia = FALSE; - 2,265 1 0 566 11 0 1,133 0 0 Bool forceXgl = FALSE; - 1,133 0 0 0 0 0 1 0 0 Bool forceAiglx = FALSE; - 3,963 0 0 3,396 1 0 1 0 0 Bool checkXglShm = FALSE; - . . . . . . . . . int optch; - 4 1 1 2 1 1 2 0 0 char sopts[] = "hv"; - 553 158 1 0 0 0 316 0 0 struct option lopts[] = { - . . . . . . . . . {"help", 0, 0, OPT_HELP}, - 237 0 0 79 2 0 0 0 0 {"version", 0, 0, OPT_VERSION}, - . . . . . . . . . {"display", 1, 0, OPT_DISPLAY}, - . . . . . . . . . {"screen", 1, 0, OPT_SCREEN}, - 237 79 1 158 0 0 0 0 0 {"skip-gl-yield", 0, &skipGlYield, TRUE}, - 79 0 0 0 0 0 79 0 0 {"force-nvidia", 0, 0, OPT_FORCE_NVIDIA}, - 553 0 0 79 79 0 0 0 0 {"force-xgl", 0, 0, OPT_FORCE_XGL}, - . . . . . . . . . {"force-aiglx", 0, 0, OPT_FORCE_AIGLX}, - . . . . . . . . . {"use-tfp", 0, ©Texture, FALSE}, - . . . . . . . . . {"use-copy", 0, 0, OPT_USE_COPY}, - . . . . . . . . . {"indirect-rendering", 0, &indirectRendering, TRUE}, - . . . . . . . . . {"xgl-rendering", 0, &indirectRendering, FALSE}, - . . . . . . . . . {"strict-binding", 0, &strictBinding, TRUE}, - . . . . . . . . . {"xgl-binding", 0, &strictBinding, FALSE}, - . . . . . . . . . {"use-cow", 0, &useCow, TRUE}, - 75 0 0 25 0 0 25 0 0 {"no-cow", 0, &useCow, FALSE}, - . . . . . . . . . {"no-replace", 0, &replaceCurrentWm, FALSE}, - . . . . . . . . . {"replace", 0, &replaceCurrentWm, TRUE}, - . . . . . . . . . {"sm-disable", 0, &disableSm, TRUE}, - . . . . . . . . . {"sm-client-id", 1, 0, OPT_SM_CLIENT_ID}, - . . . . . . . . . {0, 0, 0, 0} - 85 14 13 0 0 0 84 3 2 }; - . . . . . . . . . - 3 0 0 2 0 0 1 1 1 programName = argv[0]; - 2 1 1 1 0 0 1 1 1 programArgc = argc; - 50 16 1 17 0 0 1 0 0 programArgv = argv; - 16 0 0 0 0 0 16 0 0 - 65 0 0 16 0 0 33 1 0 init_variables(); - . . . . . . . . . - . . . . . . . . . /* Process arguments */ - 124 2 2 41 0 0 40 0 0 while ((optch = getopt_long(argc, argv, sopts, lopts, NULL)) != EOF) - . . . . . . . . . { - 76 0 0 38 0 0 38 0 0 switch (optch) - 76 38 0 38 0 0 38 0 0 { - 152 0 0 38 0 0 38 0 0 case OPT_HELP: - . . . . . . . . . usage(); - 76 0 0 38 0 0 38 0 0 return 0; - 76 0 0 38 0 0 38 0 0 case OPT_VERSION: - 76 0 0 38 0 0 38 0 0 printf(PACKAGE_STRING "\n"); - 76 0 0 38 0 0 38 0 0 return 0; - . . . . . . . . . case OPT_DISPLAY: - . . . . . . . . . if (optarg) - . . . . . . . . . displayName = optarg; - . . . . . . . . . break; - . . . . . . . . . case OPT_SCREEN: - . . . . . . . . . if (optarg) - . . . . . . . . . screenNum = atoi(optarg); - . . . . . . . . . break; --- line 354 ---------------------------------------- --- line 355 ---------------------------------------- - . . . . . . . . . case OPT_FORCE_NVIDIA: - . . . . . . . . . forceNvidia = TRUE; - . . . . . . . . . indirectRendering = FALSE; - . . . . . . . . . useCow = TRUE; - . . . . . . . . . strictBinding = FALSE; - . . . . . . . . . isNVTFP = TRUE; - . . . . . . . . . break; - . . . . . . . . . case OPT_FORCE_XGL: - 474 41 1 395 0 0 0 0 0 forceXgl = TRUE; - . . . . . . . . . indirectRendering = FALSE; - . . . . . . . . . useCow = FALSE; - 2,532 89 2 0 0 0 1,266 0 0 strictBinding = FALSE; - . . . . . . . . . break; - 1,266 0 0 422 422 213 0 0 0 case OPT_FORCE_AIGLX: - 122 0 0 122 0 0 0 0 0 forceAiglx = TRUE; - . . . . . . . . . indirectRendering = TRUE; - 1,083 90 2 722 104 64 0 0 0 useCow = TRUE; - 2,954 88 2 422 99 2 0 0 0 strictBinding = TRUE; - . . . . . . . . . break; - . . . . . . . . . case OPT_USE_COPY: - . . . . . . . . . copyTexture = TRUE; - . . . . . . . . . indirectRendering = FALSE; - . . . . . . . . . useCow = TRUE; - 219 2 0 73 15 8 73 0 0 strictBinding = FALSE; - . . . . . . . . . skipGlYield = TRUE; - . . . . . . . . . checkXglShm = TRUE; - 351 0 0 117 31 20 117 0 0 break; - 7 2 1 0 0 0 0 0 0 case OPT_SM_CLIENT_ID: - . . . . . . . . . if (optarg) - . . . . . . . . . clientId = optarg; - . . . . . . . . . break; - 63 0 0 0 0 0 0 0 0 case 0: /* Returned when auto-set stuff is in effect */ - 84 0 0 28 1 0 28 0 0 break; - . . . . . . . . . default: - . . . . . . . . . /* Not recognised option or with missing argument. - . . . . . . . . . * getopt_long() prints an error message for us. - . . . . . . . . . */ - . . . . . . . . . return 1; - 404 23 1 101 20 7 202 0 0 - . . . . . . . . . } - . . . . . . . . . } - 104 0 0 0 0 0 104 0 0 - 312 0 0 104 23 10 0 0 0 /* Any remaing args are assumed to be plugins */ - 48 1 1 2 0 0 40 0 0 while (argc - optind > 0) - 208 0 0 104 0 0 104 0 0 if (nPlugin < 256) - 208 0 0 104 0 0 104 0 0 plugin[nPlugin++] = argv[optind++]; - 312 40 0 104 0 0 0 0 0 - 27 1 1 22 1 1 0 0 0 if (!skipTests && !forceNvidia && !forceXgl && !forceAiglx) - 210 0 0 105 0 0 105 0 0 detect_xgl(checkXglShm); - 208 0 0 104 0 0 104 0 0 - 208 0 0 104 0 0 104 0 0 - 211 0 0 105 0 0 104 0 0 if (isNVTFP && !skipGlYield) - . . . . . . . . . { - . . . . . . . . . char *newargs[argc + 2]; - . . . . . . . . . int i; - 40 0 0 20 7 2 20 0 0 - 20 0 0 0 0 0 20 0 0 printf(_("Relaunching %s with __GL_YIELD=\"NOTHING\"\n"), argv[0]); - 40 0 0 0 0 0 0 0 0 setenv("__GL_YIELD", "NOTHING", 1); - . . . . . . . . . for (i = 0; i < argc; i++) - 136 7 2 0 0 0 34 0 0 newargs[i] = argv[i]; - 51 0 0 0 0 0 17 0 0 newargs[argc] = "--skip-gl-yield"; - . . . . . . . . . newargs[argc + 1] = NULL; - . . . . . . . . . execvp(argv[0], newargs); - . . . . . . . . . } - 329 0 0 78 0 0 0 0 0 - 3 2 2 0 0 0 1 0 0 signal(SIGHUP, signalHandler); - 247 0 0 122 0 0 62 0 0 signal(SIGCHLD, signalHandler); - . . . . . . . . . - 3 0 0 1 0 0 0 0 0 if (!disableSm) - 2 0 0 1 0 0 1 0 0 initSession(clientId); - . . . . . . . . . - 7 1 1 3 0 0 1 0 0 if (!addDisplay(displayName, screenNum, plugin, nPlugin)) - . . . . . . . . . return 1; - . . . . . . . . . - 1 1 1 0 0 0 1 0 0 result = eventLoop(); - 2,110 47 2 1,688 0 0 0 0 0 - . . . . . . . . . releaseDisplay(); - . . . . . . . . . - . . . . . . . . . if (!disableSm) - . . . . . . . . . closeSession(); - . . . . . . . . . - . . . . . . . . . exit(result); - . . . . . . . . . } - 7,545 0 0 0 0 0 3,018 0 0 <bogus line 440> - 4,527 0 0 1,509 0 0 0 0 0 <bogus line 441> - 6,880 30 1 2,752 0 0 1,376 0 0 <bogus line 442> - 359 0 0 0 0 0 359 0 0 <bogus line 444> - 718 0 0 0 0 0 359 0 0 <bogus line 445> - 6,036 0 0 4,527 0 0 0 0 0 <bogus line 447> - 599 0 0 0 0 0 599 0 0 <bogus line 452> - 1,198 0 0 599 141 0 599 0 0 <bogus line 453> - 2,396 0 0 599 0 0 599 0 0 <bogus line 454> - 1,797 0 0 599 0 0 0 0 0 <bogus line 455> - 1,440 17 1 0 0 0 960 0 0 <bogus line 457> - 960 0 0 240 0 0 480 0 0 <bogus line 458> - 720 0 0 240 0 0 480 0 0 <bogus line 459> - 240 0 0 0 0 0 240 0 0 <bogus line 460> - 2,995 0 0 1,198 0 0 1,198 0 0 <bogus line 462> - 8,320 8 1 0 0 0 3,328 0 0 <bogus line 473> - 4,992 0 0 1,664 0 0 0 0 0 <bogus line 474> - 6,975 0 0 2,790 0 0 1,395 0 0 <bogus line 475> - 476 5 1 0 0 0 476 0 0 <bogus line 477> - 952 0 0 0 0 0 476 0 0 <bogus line 478> - 6,656 0 0 4,992 0 0 0 0 0 <bogus line 480> - 3,594 21 1 0 0 0 1,797 0 0 <bogus line 483> - 599 0 0 0 0 0 599 3 0 <bogus line 485> - 1,198 0 0 599 458 0 599 0 0 <bogus line 486> - 2,396 0 0 599 0 0 599 0 0 <bogus line 487> - 1,797 0 0 599 0 0 0 0 0 <bogus line 488> - 738 34 1 0 0 0 492 0 0 <bogus line 490> - 492 34 1 123 0 0 246 0 0 <bogus line 491> - 369 0 0 123 0 0 246 0 0 <bogus line 492> - 246 0 0 0 0 0 123 0 0 <bogus line 493> - 599 17 1 599 0 0 0 0 0 <bogus line 495> - 2,995 0 0 2,396 0 0 0 0 0 <bogus line 496> - 34 22 1 0 0 0 0 0 0 <bogus line 499> - 136 32 1 34 8 0 0 0 0 <bogus line 500> - 136 1 1 0 0 0 68 0 0 <bogus line 504> - 68 0 0 0 0 0 34 0 0 <bogus line 505> - 136 0 0 34 0 0 68 0 0 <bogus line 506> - 136 0 0 102 0 0 0 0 0 <bogus line 507> - 4 1 1 1 1 0 1 0 0 <bogus line 512> - 144 0 0 0 0 0 36 0 0 <bogus line 521> - 72 3 0 0 0 0 0 0 0 <bogus line 522> - 36 4 1 0 0 0 36 0 0 <bogus line 529> - 144 0 0 0 0 0 36 0 0 <bogus line 530> - 108 0 0 0 0 0 36 0 0 <bogus line 531> - 72 1 1 0 0 0 36 0 0 <bogus line 537> - 378 36 1 138 39 0 0 0 0 <bogus line 538> - 18 0 0 6 6 2 3 0 0 <bogus line 546> - 9 0 0 0 0 0 3 0 0 <bogus line 547> - 165 66 1 66 31 0 33 0 0 <bogus line 551> - 231 0 0 0 0 0 99 0 0 <bogus line 556> - 99 33 1 66 0 0 33 0 0 <bogus line 557> - 132 0 0 66 0 0 66 0 0 <bogus line 558> - 165 0 0 66 0 0 66 0 0 <bogus line 559> - 231 33 1 66 0 0 99 0 0 <bogus line 560> - 297 0 0 132 0 0 99 0 0 <bogus line 561> - 132 33 1 66 0 0 66 0 0 <bogus line 562> - 272 0 0 97 0 0 15 15 0 <bogus line 564> - 179 15 1 96 14 0 0 0 0 <bogus line 566> - 9 1 0 4 0 0 3 0 0 <bogus line 569> - 225 10 1 100 0 0 75 0 0 <bogus line 573> - 8 0 0 4 0 0 3 0 0 <bogus line 577> - 175 41 1 69 0 0 8 0 0 <bogus line 584> - 108 0 0 60 0 0 36 0 0 <bogus line 586> - 99 25 1 33 26 0 0 0 0 <bogus line 589> - 100 0 0 0 0 0 25 0 0 <bogus line 593> - 1,135 0 0 237 0 0 212 0 0 <bogus line 594> - 848 0 0 212 0 0 212 0 0 <bogus line 596> - 212 25 0 0 0 0 0 0 0 <bogus line 597> - 99 8 1 33 11 0 0 0 0 <bogus line 600> - 80 0 0 0 0 0 20 0 0 <bogus line 604> - 1,440 0 0 296 0 0 276 0 0 <bogus line 605> - 1,104 20 1 276 0 0 276 0 0 <bogus line 607> - 276 0 0 0 0 0 0 0 0 <bogus line 608> - 66 13 0 33 20 0 0 0 0 <bogus line 611> - 198 33 1 33 0 0 33 0 0 <bogus line 635> - 231 66 2 0 0 0 66 0 0 <bogus line 637> - 66 0 0 33 0 0 33 0 0 <bogus line 638> - 33 0 0 0 0 0 33 0 0 <bogus line 639> - 33 0 0 0 0 0 33 0 0 <bogus line 640> - 99 0 0 0 0 0 66 0 0 <bogus line 641> - 99 33 1 0 0 0 66 0 0 <bogus line 642> - 99 0 0 0 0 0 66 0 0 <bogus line 643> - 99 0 0 0 0 0 66 0 0 <bogus line 644> - 99 0 0 0 0 0 66 0 0 <bogus line 645> - 33 0 0 0 0 0 33 0 0 <bogus line 646> - 33 33 1 0 0 0 33 0 0 <bogus line 647> - 33 0 0 0 0 0 33 0 0 <bogus line 648> - 66 0 0 33 0 0 33 0 0 <bogus line 649> - 66 0 0 0 0 0 33 0 0 <bogus line 650> - 231 0 0 99 0 0 66 0 0 <bogus line 651> - 66 0 0 0 0 0 33 0 0 <bogus line 657> - 66 0 0 33 0 0 33 0 0 <bogus line 658> - 231 0 0 132 32 0 66 0 0 <bogus line 659> - 18 1 1 0 0 0 14 0 0 <bogus line 666> - 10 1 1 0 0 0 2 0 0 <bogus line 669> - 6 0 0 0 0 0 0 0 0 <bogus line 670> - 545 4 0 0 0 0 109 0 0 <bogus line 672> - 715 1 1 0 0 0 143 0 0 <bogus line 674> - 252 0 0 0 0 0 36 0 0 <bogus line 677> - 108 4 0 0 0 0 36 0 0 <bogus line 680> - 4 0 0 0 0 0 2 0 0 <bogus line 683> - 16 0 0 14 4 1 0 0 0 <bogus line 684> - 7 1 1 0 0 0 2 0 0 <bogus line 688> - 3 0 0 0 0 0 2 0 0 <bogus line 689> - 1 0 0 0 0 0 1 0 0 <bogus line 690> - 5 0 0 1 1 0 2 1 0 <bogus line 693> - 3 0 0 0 0 0 1 0 0 <bogus line 694> - 3 1 1 0 0 0 2 1 0 <bogus line 695> - 5 0 0 0 0 0 1 0 0 <bogus line 696> - 313 1 1 63 0 0 62 0 0 <bogus line 697> - 248 0 0 0 0 0 62 0 0 <bogus line 699> - 62 0 0 0 0 0 0 0 0 <bogus line 700> - 3 0 0 0 0 0 1 0 0 <bogus line 702> - 83 0 0 17 0 0 16 0 0 <bogus line 703> - 64 0 0 0 0 0 16 0 0 <bogus line 705> - 16 0 0 0 0 0 0 0 0 <bogus line 706> - 2 1 1 0 0 0 1 0 0 <bogus line 732> - 4 0 0 1 1 0 2 0 0 <bogus line 733> - 2,754 154 1 0 0 0 1,377 0 0 <bogus line 737> - 4,131 0 0 1,377 1,336 410 0 0 0 <bogus line 739> - 358 0 0 358 0 0 0 0 0 <bogus line 740> - 2,396 201 1 2,396 1,451 326 0 0 0 <bogus line 742> - 4,954 0 0 0 0 0 0 0 0 <bogus line 743> - 320 10 1 80 40 17 80 0 0 <bogus line 746> - 240 0 0 80 0 0 0 0 0 <bogus line 748> - 144 0 0 0 0 0 48 0 0 <bogus line 749> - 831 0 0 277 110 47 0 0 0 <bogus line 752> - 277 0 0 0 0 0 277 0 0 <bogus line 753> - 4,131 0 0 1,377 0 0 0 0 0 <bogus line 757> - 358 0 0 0 0 0 0 0 0 <bogus line 758> - 2,575 0 0 2,575 0 0 0 0 0 <bogus line 759> - 77,605 122 2 0 0 0 31,042 0 0 <bogus line 835> - 31,042 0 0 15,521 0 0 0 0 0 <bogus line 836> - 18,545 106 2 6,077 79 0 0 0 0 <bogus line 838> - 33,630 0 0 5,763 935 25 5,447 0 0 <bogus line 843> - 1,320 0 0 0 0 0 440 0 0 <bogus line 844> - 62,084 0 0 46,563 0 0 0 0 0 <bogus line 845> -120,545 123 2 0 0 0 48,218 0 0 <bogus line 855> - 48,218 121 2 24,109 0 0 0 0 0 <bogus line 856> -114,318 0 0 50,808 6,614 231 0 0 0 <bogus line 858> - 27,582 1 0 0 0 0 9,194 1 0 <bogus line 861> - 946 0 0 0 0 0 473 0 0 <bogus line 862> - 96,436 0 0 72,327 0 0 0 0 0 <bogus line 863> - 5,990 3 1 0 0 0 2,396 0 0 <bogus line 865> - 1,198 0 0 0 0 0 1,198 0 0 <bogus line 866> - 3,594 3 2 1,198 3 0 0 0 0 <bogus line 867> - 4,792 0 0 0 0 0 0 0 0 <bogus line 868> - 3,594 0 0 2,396 1 0 0 0 0 <bogus line 869> - 47,321 0 0 0 0 0 0 0 0 <bogus line 871> -141,963 4,661 0 47,321 80 0 0 0 0 <bogus line 872> -189,284 0 0 0 0 0 0 0 0 <bogus line 873> - 272 3 1 68 68 1 0 0 0 <bogus line 878> - 10,744 78 0 2,686 2,686 2 0 0 0 <bogus line 884> -124,188 11,692 1 41,396 4 0 0 0 0 <bogus line 906> -124,188 0 0 0 0 0 0 0 0 <bogus line 909> - 41,396 0 0 41,396 0 0 0 0 0 <bogus line 910> - 82,792 288 0 41,396 0 0 0 0 0 <bogus line 914> - 41,396 0 0 0 0 0 0 0 0 <bogus line 917> - 41,396 0 0 41,396 0 0 0 0 0 <bogus line 918> -188,613 29 1 62,871 7,511 8 0 0 0 <bogus line 922> -251,484 1,207 1 125,742 2,847 3 0 0 0 <bogus line 925> - 62,871 0 0 62,871 0 0 0 0 0 <bogus line 926> - 4,794 0 0 1,598 0 0 0 0 0 <bogus line 930> - 3,196 0 0 1,598 0 0 0 0 0 <bogus line 933> - 1,598 0 0 1,598 0 0 0 0 0 <bogus line 934> - 7 0 0 0 0 0 2 0 0 <bogus line 940> - 2 0 0 0 0 0 1 0 0 <bogus line 941> - 5 0 0 0 0 0 1 0 0 <bogus line 942> - 2 2 1 0 0 0 1 0 0 <bogus line 943> - 6 0 0 0 0 0 1 0 0 <bogus line 944> - 2 0 0 0 0 0 0 0 0 <bogus line 945> - 5 1 0 0 0 0 1 0 0 <bogus line 949> - 2 0 0 0 0 0 1 0 0 <bogus line 951> - 6 1 1 0 0 0 1 0 0 <bogus line 953> - 3 0 0 0 0 0 1 0 0 <bogus line 954> - 2 1 0 0 0 0 0 0 0 <bogus line 955> - 2 0 0 0 0 0 1 0 0 <bogus line 957> - 16 4 2 0 0 0 10 0 0 <bogus line 961> - 14 0 0 0 0 0 4 0 0 <bogus line 964> - 6 0 0 0 0 0 2 0 0 <bogus line 965> - 4 1 1 0 0 0 2 0 0 <bogus line 966> - 14 0 0 0 0 0 4 0 0 <bogus line 967> - 4 0 0 0 0 0 2 0 0 <bogus line 968> - 10 0 0 0 0 0 2 0 0 <bogus line 969> - 6 0 0 0 0 0 0 0 0 <bogus line 970> - 6 1 1 1 0 0 1 0 0 <bogus line 973> - 3 0 0 1 0 0 0 0 0 <bogus line 976> - 5 1 1 0 0 0 1 0 0 <bogus line 977> - 10 1 1 0 0 0 2 0 0 <bogus line 983> - 10 0 0 0 0 0 2 0 0 <bogus line 984> - 4 0 0 0 0 0 2 0 0 <bogus line 985> - 4 0 0 0 0 0 2 0 0 <bogus line 986> - 4 0 0 0 0 0 0 0 0 <bogus line 987> - 12 0 0 10 0 0 0 0 0 <bogus line 988> - 7 2 2 0 0 0 5 0 0 <bogus line 991> - 9 0 0 0 0 0 2 0 0 <bogus line 995> - 2 0 0 0 0 0 1 0 0 <bogus line 998> - 1 1 1 0 0 0 1 0 0 <bogus line 999> - 4 0 0 0 0 0 1 0 0 <bogus line 1000> - 2 0 0 0 0 0 1 0 0 <bogus line 1001> - 4 0 0 0 0 0 0 0 0 <bogus line 1002> - 2 1 1 0 0 0 1 0 0 <bogus line 1005> - 8 0 0 0 0 0 1 0 0 <bogus line 1006> - 4 0 0 0 0 0 1 0 0 <bogus line 1007> - 2 1 1 0 0 0 1 0 0 <bogus line 1008> - 4 1 1 0 0 0 0 0 0 <bogus line 1010> - 2 0 0 0 0 0 0 0 0 <bogus line 1018> - 2 0 0 0 0 0 1 0 0 <bogus line 1020> - 3 0 0 0 0 0 1 0 0 <bogus line 1023> - 8 0 0 6 0 0 0 0 0 <bogus line 1027> - 6 1 1 0 0 0 5 0 0 <bogus line 1190> - 7 1 0 0 0 0 2 0 0 <bogus line 1191> - 7 1 1 0 0 0 2 0 0 <bogus line 1192> - 4 0 0 0 0 0 2 0 0 <bogus line 1193> - 3 0 0 0 0 0 1 0 0 <bogus line 1194> - 3 0 0 0 0 0 1 0 0 <bogus line 1196> - 3 1 0 0 0 0 1 0 0 <bogus line 1197> - 2 1 1 0 0 0 1 0 0 <bogus line 1199> - 1 1 1 0 0 0 1 0 0 <bogus line 1203> - 8 0 0 6 1 1 0 0 0 <bogus line 1205> - 5 1 1 0 0 0 2 0 0 <bogus line 1209> - 2 1 1 1 1 1 0 0 0 <bogus line 1210> - 3 1 1 0 0 0 2 1 0 <bogus line 1226> - 2 1 1 0 0 0 0 0 0 <bogus line 1227> - 3 0 0 0 0 0 2 0 0 <bogus line 1230> - 6 0 0 1 0 0 2 1 1 <bogus line 1235> - 6 1 1 1 0 0 2 0 0 <bogus line 1236> - 6 0 0 1 0 0 2 0 0 <bogus line 1237> - 6 1 1 1 0 0 2 0 0 <bogus line 1238> - 6 0 0 1 0 0 2 0 0 <bogus line 1239> - 6 2 1 1 0 0 2 0 0 <bogus line 1240> - 6 0 0 1 0 0 2 0 0 <bogus line 1241> - 6 1 1 1 0 0 2 0 0 <bogus line 1242> - 6 0 0 1 0 0 2 0 0 <bogus line 1243> - 6 1 1 1 0 0 2 0 0 <bogus line 1244> - 6 0 0 1 0 0 2 0 0 <bogus line 1245> - 3 0 0 0 0 0 1 0 0 <bogus line 1247> - 2 1 0 1 1 0 1 0 0 <bogus line 1249> - 5 1 1 3 1 0 0 0 0 <bogus line 1251> - 473 122 2 0 0 0 0 0 0 <bogus line 1359> - 473 121 2 0 0 0 473 0 0 <bogus line 1361> - 473 0 0 0 0 0 473 3 0 <bogus line 1362> - 2,365 0 0 946 130 2 473 0 0 <bogus line 1363> - 946 0 0 473 0 0 0 0 0 <bogus line 1365> - 507 124 2 0 0 0 0 0 0 <bogus line 1369> - 507 0 0 0 0 0 507 0 0 <bogus line 1371> - 507 0 0 0 0 0 507 0 0 <bogus line 1372> - 507 0 0 0 0 0 507 0 0 <bogus line 1373> - 2,535 0 0 1,014 135 2 507 0 0 <bogus line 1374> - 1,014 120 2 507 0 0 0 0 0 <bogus line 1376> - 4 2 1 0 0 0 2 0 0 <bogus line 1379> - 6 0 0 2 2 0 0 0 0 <bogus line 1380> - 6 2 0 0 0 0 2 0 0 <bogus line 1381> - 8 0 0 2 0 0 2 0 0 <bogus line 1382> - 6 2 0 2 0 0 0 0 0 <bogus line 1383> - 6 2 0 0 0 0 0 0 0 <bogus line 1384> - 2 0 0 2 0 0 0 0 0 <bogus line 1385> - 158 79 0 0 0 0 79 0 0 <bogus line 1388> - 237 0 0 79 79 0 0 0 0 <bogus line 1389> - 237 0 0 0 0 0 79 0 0 <bogus line 1390> - 316 0 0 79 0 0 79 0 0 <bogus line 1391> - 237 0 0 79 0 0 0 0 0 <bogus line 1392> - 237 79 0 0 0 0 0 0 0 <bogus line 1393> - 79 0 0 79 16 0 0 0 0 <bogus line 1394> - 2,527 85 2 0 0 0 1,083 0 0 <bogus line 1410> - 1,083 0 0 0 0 0 361 0 0 <bogus line 1413> - 2,166 0 0 0 0 0 361 0 0 <bogus line 1417> - 1,444 87 2 0 0 0 361 0 0 <bogus line 1421> - 1,805 0 0 1,444 0 0 0 0 0 <bogus line 1423> - 553 79 1 0 0 0 237 0 0 <bogus line 1427> - 237 79 1 0 0 0 79 0 0 <bogus line 1430> - 474 0 0 0 0 0 79 0 0 <bogus line 1432> - 79 0 0 0 0 0 79 46 0 <bogus line 1434> - 316 0 0 0 0 0 79 0 0 <bogus line 1435> - 395 79 0 316 0 0 0 0 0 <bogus line 1437> - 2,396 3 1 0 0 0 1,198 0 0 <bogus line 1487> - 2,396 0 0 0 0 0 1,198 0 0 <bogus line 1489> - 2,396 0 0 0 0 0 1,198 0 0 <bogus line 1490> - 1,198 0 0 0 0 0 1,198 0 0 <bogus line 1491> - 2,396 0 0 2,396 0 0 0 0 0 <bogus line 1492> - 12 2 1 0 0 0 6 0 0 <bogus line 1495> - 12 0 0 6 0 0 0 0 0 <bogus line 1496> - 6 0 0 0 0 0 6 0 0 <bogus line 1498> - 24 0 0 6 0 0 6 0 0 <bogus line 1499> - 18 0 0 6 0 0 0 0 0 <bogus line 1501> - 6 0 0 0 0 0 6 0 0 <bogus line 1502> - 6 2 1 0 0 0 6 0 0 <bogus line 1503> - 12 0 0 12 0 0 0 0 0 <bogus line 1504> - 72 2 1 0 0 0 36 0 0 <bogus line 1507> - 54 0 0 18 0 0 0 0 0 <bogus line 1508> - 18 0 0 0 0 0 18 0 0 <bogus line 1510> - 252 2 1 0 0 0 126 0 0 <bogus line 1511> - 18 0 0 0 0 0 18 0 0 <bogus line 1512> - 18 0 0 0 0 0 18 0 0 <bogus line 1513> - 90 0 0 18 0 0 36 0 0 <bogus line 1514> - 90 0 0 54 0 0 0 0 0 <bogus line 1516> - 50,165 1,343 1 0 0 0 20,066 0 0 <bogus line 1640> - 50,165 0 0 0 0 0 10,033 0 0 <bogus line 1641> - 30,099 0 0 10,033 0 0 10,033 0 0 <bogus line 1643> - 50,165 0 0 30,099 0 0 0 0 0 <bogus line 1645> - 50,165 553 1 0 0 0 20,066 0 0 <bogus line 1648> - 50,165 0 0 0 0 0 10,033 0 0 <bogus line 1649> - 30,099 0 0 10,033 0 0 10,033 0 0 <bogus line 1651> - 50,165 0 0 30,099 0 0 0 0 0 <bogus line 1653> - 49,375 79 1 0 0 0 19,750 0 0 <bogus line 1656> - 49,375 0 0 0 0 0 9,875 0 0 <bogus line 1657> - 29,625 0 0 9,875 0 0 9,875 0 0 <bogus line 1659> - 49,375 0 0 29,625 0 0 0 0 0 <bogus line 1661> - 49,375 79 1 0 0 0 19,750 0 0 <bogus line 1664> - 49,375 0 0 0 0 0 9,875 0 0 <bogus line 1665> - 29,625 0 0 9,875 0 0 9,875 0 0 <bogus line 1667> - 49,375 0 0 29,625 0 0 0 0 0 <bogus line 1669> - 6,320 79 1 0 0 0 2,528 0 0 <bogus line 1672> - 6,320 0 0 0 0 0 1,264 0 0 <bogus line 1673> - 3,792 0 0 1,264 0 0 1,264 0 0 <bogus line 1675> - 6,320 0 0 3,792 0 0 0 0 0 <bogus line 1677> - 1,185 79 1 0 0 0 474 0 0 <bogus line 1680> - 1,185 0 0 0 0 0 237 0 0 <bogus line 1681> - 711 0 0 237 0 0 237 0 0 <bogus line 1683> - 1,185 0 0 711 0 0 0 0 0 <bogus line 1685> - 50,165 214 1 0 0 0 20,066 0 0 <bogus line 1688> - 50,165 0 0 0 0 0 10,033 0 0 <bogus line 1689> - 30,099 0 0 10,033 2,449 2 10,033 0 0 <bogus line 1691> - 50,165 0 0 30,099 0 0 0 0 0 <bogus line 1693> - 49,375 341 1 0 0 0 19,750 0 0 <bogus line 1696> - 49,375 0 0 0 0 0 9,875 0 0 <bogus line 1697> - 29,625 0 0 9,875 158 0 9,875 0 0 <bogus line 1699> - 49,375 0 0 29,625 0 0 0 0 0 <bogus line 1701> - 150 3 1 0 0 0 60 0 0 <bogus line 1720> - 120 0 0 0 0 0 30 0 0 <bogus line 1721> - 60 0 0 0 0 0 30 0 0 <bogus line 1723> - 150 3 1 90 0 0 0 0 0 <bogus line 1724> - 60 0 0 30 0 0 30 0 0 <bogus line 1726> - 120 0 0 30 0 0 30 0 0 <bogus line 1727> - 120 0 0 90 0 0 0 0 0 <bogus line 1729> - 90 0 0 0 0 0 36 0 0 <bogus line 1732> - 72 6 1 0 0 0 18 0 0 <bogus line 1733> - 36 0 0 0 0 0 18 0 0 <bogus line 1735> - 108 0 0 54 0 0 0 0 0 <bogus line 1736> - 36 0 0 18 0 0 18 0 0 <bogus line 1738> - 72 1 0 18 0 0 18 0 0 <bogus line 1739> - 72 0 0 54 0 0 0 0 0 <bogus line 1741> - 240 4 1 0 0 0 96 0 0 <bogus line 1744> - 240 0 0 0 0 0 48 0 0 <bogus line 1745> - 96 0 0 48 0 0 48 0 0 <bogus line 1747> - 144 0 0 48 0 0 48 0 0 <bogus line 1748> - 240 0 0 144 0 0 0 0 0 <bogus line 1750> - 1,270 3 1 0 0 0 508 0 0 <bogus line 1787> - 1,016 3 1 0 0 0 254 0 0 <bogus line 1788> - 1,270 0 0 254 0 0 254 0 0 <bogus line 1790> - 508 0 0 254 0 0 254 0 0 <bogus line 1792> - 1,016 0 0 254 0 0 254 0 0 <bogus line 1793> - 1,016 0 0 762 0 0 0 0 0 <bogus line 1795> - 1,270 163 1 0 0 0 508 0 0 <bogus line 1798> - 1,016 0 0 0 0 0 254 0 0 <bogus line 1799> - 1,270 9 1 254 0 0 254 0 0 <bogus line 1801> - 508 0 0 254 0 0 254 0 0 <bogus line 1803> - 1,016 0 0 254 0 0 254 0 0 <bogus line 1804> - 1,016 0 0 762 0 0 0 0 0 <bogus line 1806> - 1,250 0 0 0 0 0 500 0 0 <bogus line 1809> - 1,000 13 1 0 0 0 250 0 0 <bogus line 1810> - 1,250 0 0 250 0 0 250 0 0 <bogus line 1812> - 500 0 0 250 0 0 250 0 0 <bogus line 1814> - 1,000 0 0 250 0 0 250 0 0 <bogus line 1815> - 1,000 0 0 750 0 0 0 0 0 <bogus line 1817> - 1,250 11 2 0 0 0 500 0 0 <bogus line 1820> - 1,000 0 0 0 0 0 250 0 0 <bogus line 1821> - 1,250 3 1 250 0 0 250 0 0 <bogus line 1823> - 500 0 0 250 0 0 250 0 0 <bogus line 1825> - 1,000 0 0 250 0 0 250 0 0 <bogus line 1826> - 1,000 0 0 750 0 0 0 0 0 <bogus line 1828> - 160 0 0 0 0 0 64 0 0 <bogus line 1831> - 128 2 1 0 0 0 32 0 0 <bogus line 1832> - 160 0 0 32 0 0 32 0 0 <bogus line 1834> - 64 0 0 32 0 0 32 0 0 <bogus line 1836> - 128 0 0 32 0 0 32 0 0 <bogus line 1837> - 128 0 0 96 0 0 0 0 0 <bogus line 1839> - 30 2 1 0 0 0 12 0 0 <bogus line 1842> - 24 0 0 0 0 0 6 0 0 <bogus line 1843> - 30 0 0 6 0 0 6 0 0 <bogus line 1845> - 12 0 0 6 0 0 6 0 0 <bogus line 1847> - 24 0 0 6 0 0 6 0 0 <bogus line 1848> - 24 0 0 18 0 0 0 0 0 <bogus line 1850> - 1,270 3 1 0 0 0 508 0 0 <bogus line 1853> - 1,016 3 1 0 0 0 254 0 0 <bogus line 1854> - 1,270 0 0 254 0 0 254 0 0 <bogus line 1856> - 508 0 0 254 0 0 254 0 0 <bogus line 1858> - 1,016 0 0 254 0 0 254 0 0 <bogus line 1859> - 1,016 0 0 762 0 0 0 0 0 <bogus line 1861> - 1,250 3 1 0 0 0 500 0 0 <bogus line 1864> - 1,000 0 0 0 0 0 250 0 0 <bogus line 1865> - 1,250 3 1 250 0 0 250 0 0 <bogus line 1867> - 500 0 0 250 0 0 250 0 0 <bogus line 1869> - 1,000 0 0 250 0 0 250 0 0 <bogus line 1870> - 1,000 0 0 750 0 0 0 0 0 <bogus line 1872> - 51,745 78 0 0 0 0 20,698 0 0 <bogus line 1884> - 51,745 79 1 0 0 0 10,349 0 0 <bogus line 1885> - 51,745 0 0 10,349 0 0 20,698 64 0 <bogus line 1887> - 51,745 0 0 31,047 0 0 0 0 0 <bogus line 1889> - 51,745 79 1 0 0 0 20,698 0 0 <bogus line 1892> - 51,745 0 0 0 0 0 10,349 0 0 <bogus line 1893> - 51,745 0 0 10,349 0 0 20,698 0 0 <bogus line 1895> - 51,745 0 0 31,047 0 0 0 0 0 <bogus line 1897> - 51,745 157 1 0 0 0 20,698 0 0 <bogus line 1900> - 51,745 0 0 0 0 0 10,349 0 0 <bogus line 1901> - 51,745 0 0 10,349 0 0 20,698 0 0 <bogus line 1903> - 51,745 80 1 31,047 0 0 0 0 0 <bogus line 1905> - 51,745 0 0 0 0 0 20,698 0 0 <bogus line 1908> - 51,745 0 0 0 0 0 10,349 0 0 <bogus line 1909> - 51,745 79 1 10,349 0 0 20,698 0 0 <bogus line 1911> - 51,745 0 0 31,047 0 0 0 0 0 <bogus line 1913> - 153 17 1 153 17 2 0 0 0 <bogus line 2020> - 153 0 0 153 0 0 0 0 0 <bogus line 2022> - 272 0 0 0 0 0 204 0 0 <bogus line 2075> - 160 0 0 0 0 0 0 0 0 <bogus line 2077> - 854 1 1 216 72 8 114 0 0 <bogus line 2079> - 240 0 0 0 0 0 0 0 0 <bogus line 2080> - 34 1 1 34 0 0 0 0 0 <bogus line 2084> - 306 0 0 238 0 0 0 0 0 <bogus line 2088> - 5 1 1 0 0 0 2 0 0 <bogus line 2111> - 3 0 0 1 0 0 0 0 0 <bogus line 2112> - 2 0 0 0 0 0 0 0 0 <bogus line 2114> - 2 1 0 0 0 0 1 0 0 <bogus line 2117> - 3 0 0 0 0 0 0 0 0 <bogus line 2118> - 3 0 0 2 0 0 0 0 0 <bogus line 2119> - 160 3 1 160 159 0 0 0 0 <bogus line 2122> - 160 0 0 160 0 0 0 0 0 <bogus line 2124> - 3 1 1 0 0 0 2 0 0 <bogus line 2335> - 106 0 0 35 1 0 0 0 0 <bogus line 2338> - 136 1 1 34 34 0 34 0 0 <bogus line 2340> - 68 0 0 0 0 0 0 0 0 <bogus line 2341> - 99 0 0 33 23 0 0 0 0 <bogus line 2343> - 68 0 0 17 0 0 17 0 0 <bogus line 2344> - 5 0 0 3 1 0 0 0 0 <bogus line 2348> - -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -@@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ WARNING @@ -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -@@ -@@ Information recorded about lines past the end of 'main.c'. -@@ -@@ Probable cause and solution: -@@ cause: not sure, sorry -@@ -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - --------------------------------------------------------------------------------- --- User-annotated source: display.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 113 ---------------------------------------- - . . . . . . . . . GLfloat y; - . . . . . . . . . GLfloat a; - . . . . . . . . . GLfloat b; - . . . . . . . . . GLfloat c; - . . . . . . . . . GLfloat d; - . . . . . . . . . } multiPerspective[64]; - . . . . . . . . . - . . . . . . . . . static int reallocDisplayPrivate(int size, void *closure) - 85 9 1 0 0 0 51 0 0 { - 34 12 2 17 0 0 17 0 0 CompDisplay *d = compDisplays; - . . . . . . . . . void *privates; - . . . . . . . . . - 34 0 0 17 0 0 0 0 0 if (d) - . . . . . . . . . { - 119 0 0 51 3 1 34 0 0 privates = realloc(d->privates, size * sizeof(CompPrivate)); - 34 0 0 17 0 0 0 0 0 if (!privates) - . . . . . . . . . return FALSE; - . . . . . . . . . - 51 0 0 34 0 0 17 0 0 d->privates = (CompPrivate *) privates; - . . . . . . . . . } - . . . . . . . . . - 34 0 0 17 0 0 17 0 0 return TRUE; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int allocateDisplayPrivateIndex(void) - 34 10 2 0 0 0 17 0 0 { - 85 0 0 0 0 0 17 0 0 return allocatePrivateIndex(&displayPrivateLen, - . . . . . . . . . &displayPrivateIndices, - . . . . . . . . . reallocDisplayPrivate, 0); - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void freeDisplayPrivateIndex(int index) - . . . . . . . . . { - . . . . . . . . . freePrivateIndex(displayPrivateLen, displayPrivateIndices, index); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . closeWin(CompDisplay * d, --- line 150 ---------------------------------------- --- line 748 ---------------------------------------- - . . . . . . . . . { - . . . . . . . . . w->state ^= CompWindowStateShadedMask; - . . . . . . . . . updateWindowAttributes(w, FALSE); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . static void setAudibleBell(CompDisplay * display, Bool audible) - 5 2 2 0 0 0 3 0 0 { - 4 0 0 2 1 0 0 0 0 if (display->xkbExtension) - 9 1 1 4 0 0 2 0 0 XkbChangeEnabledControls(display->display, - . . . . . . . . . XkbUseCoreKbd, - . . . . . . . . . XkbAudibleBellMask, - . . . . . . . . . audible ? XkbAudibleBellMask : 0); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . setDisplayOption(CompDisplay * display, char *name, CompOptionValue * value) - 372 61 0 0 0 0 248 0 0 { - . . . . . . . . . CompOption *o; - . . . . . . . . . int index; - . . . . . . . . . - 434 0 0 124 0 0 124 0 0 o = compFindOption(display->opt, NUM_OPTIONS(display), name, &index); - 124 62 1 62 0 0 0 0 0 if (!o) - . . . . . . . . . return FALSE; - 496 0 0 248 0 0 62 0 0 beryl_settings_context_comp_set_option_value(display->context,NULL,name,FALSE,value); - 186 1 1 124 17 0 62 0 0 beryl_settings_context_write(display->context); - 434 62 0 248 124 9 62 62 0 switch (index) - . . . . . . . . . { - . . . . . . . . . #if 0 - . . . . . . . . . case COMP_DISPLAY_OPTION_FOCUS_STEALING_LEVEL: - . . . . . . . . . if (compSetStringOption(o, value)) - . . . . . . . . . { - . . . . . . . . . int i; - . . . . . . . . . - . . . . . . . . . for (i = 0; i < FSP_COUNT; i++) --- line 783 ---------------------------------------- --- line 797 ---------------------------------------- - . . . . . . . . . if (compSetOptionList(o, value)) - . . . . . . . . . { - . . . . . . . . . display->dirtyPluginList = TRUE; - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . #endif - . . . . . . . . . case COMP_DISPLAY_OPTION_TEXTURE_FILTER: - 5 0 0 2 0 0 1 0 0 if (compSetStringOption(o, value)) - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . - . . . . . . . . . for (s = display->screens; s; s = s->next) - . . . . . . . . . damageScreen(s); - . . . . . . . . . - . . . . . . . . . if (strcmp(o->value.s, "Fast") == 0) - . . . . . . . . . display->textureFilter = GL_NEAREST; --- line 813 ---------------------------------------- --- line 817 ---------------------------------------- - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case COMP_DISPLAY_OPTION_CLICK_TO_FOCUS: - . . . . . . . . . case COMP_DISPLAY_OPTION_AUTORAISE: - . . . . . . . . . case COMP_DISPLAY_OPTION_RAISE_ON_CLICK: - . . . . . . . . . case COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS: - . . . . . . . . . case COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED: - 25 5 1 10 0 0 5 0 0 if (compSetBoolOption(o, value)) - . . . . . . . . . return TRUE; - . . . . . . . . . break; - . . . . . . . . . case COMP_DISPLAY_OPTION_AUTORAISE_DELAY: - . . . . . . . . . case COMP_DISPLAY_OPTION_EDGE_TRIGGERING_DELAY: - 10 2 0 4 0 0 2 0 0 if (compSetIntOption(o, value)) - . . . . . . . . . return TRUE; - . . . . . . . . . break; - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND0: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND1: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND2: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND3: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND4: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND5: --- line 838 ---------------------------------------- --- line 839 ---------------------------------------- - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND6: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND7: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND8: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND9: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND10: - . . . . . . . . . case COMP_DISPLAY_OPTION_COMMAND11: - . . . . . . . . . case COMP_DISPLAY_OPTION_SCREENSHOT: - . . . . . . . . . case COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT: - 70 14 0 28 0 0 14 0 0 if (compSetStringOption(o, value)) - . . . . . . . . . return TRUE; - . . . . . . . . . break; - . . . . . . . . . case COMP_DISPLAY_OPTION_CLOSE_WINDOW: - . . . . . . . . . case COMP_DISPLAY_OPTION_MAIN_MENU: - . . . . . . . . . case COMP_DISPLAY_OPTION_RUN_DIALOG: - . . . . . . . . . case COMP_DISPLAY_OPTION_MINIMIZE_WINDOW: - . . . . . . . . . case COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW: - . . . . . . . . . case COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ: --- line 855 ---------------------------------------- --- line 880 ---------------------------------------- - . . . . . . . . . case COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT: - . . . . . . . . . case COMP_DISPLAY_OPTION_WINDOW_MENU: - . . . . . . . . . case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED: - . . . . . . . . . case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ: - . . . . . . . . . case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT: - . . . . . . . . . case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED: - . . . . . . . . . case COMP_DISPLAY_OPTION_TOGGLE_WINDOW_FULLSCREEN: - . . . . . . . . . case COMP_DISPLAY_OPTION_RAISE_WINDOW: - 228 76 2 114 0 0 38 0 0 if (setDisplayAction(display, o, value)) - . . . . . . . . . return TRUE; - . . . . . . . . . break; - . . . . . . . . . case COMP_DISPLAY_OPTION_AUDIBLE_BELL: - 5 1 0 2 0 0 1 0 0 if (compSetBoolOption(o, value)) - . . . . . . . . . { - . . . . . . . . . setAudibleBell(display, o->value.b); - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case COMP_DISPLAY_OPTION_DIM_DEAD: - 5 1 1 2 0 0 1 0 0 if (compSetBoolOption(o, value)) - . . . . . . . . . { - . . . . . . . . . Bool b = o->value.b; - . . . . . . . . . CompScreen *s; - . . . . . . . . . - . . . . . . . . . for (s = display->screens; s; s = s->next) - . . . . . . . . . { - . . . . . . . . . CompWindow *w; - . . . . . . . . . --- line 907 ---------------------------------------- --- line 924 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . default: - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . - 124 62 1 62 0 0 62 0 0 return FALSE; - 124 0 0 124 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . setDisplayOptionForPlugin(CompDisplay * display, - . . . . . . . . . char *plugin, char *name, CompOptionValue * value) - . . . . . . . . . { - . . . . . . . . . gboolean retval = FALSE; - . . . . . . . . . CompPlugin *p; - . . . . . . . . . --- line 941 ---------------------------------------- --- line 948 ---------------------------------------- - . . . . . . . . . beryl_settings_context_comp_set_option_value(display->context,plugin,name,FALSE,value); - . . . . . . . . . beryl_settings_context_write(display->context); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . return retval; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static void addTimeout(CompTimeout * timeout) - 15 5 3 0 0 0 10 0 0 { - 5 5 3 0 0 0 5 0 0 CompTimeout *p = 0, *t; - . . . . . . . . . - 25 0 0 10 0 0 5 0 0 for (t = timeouts; t; t = t->next) - . . . . . . . . . { - . . . . . . . . . if (timeout->time < t->left) - . . . . . . . . . break; - . . . . . . . . . - . . . . . . . . . p = t; - . . . . . . . . . } - . . . . . . . . . - 15 4 2 10 0 0 5 0 0 timeout->next = t; - 20 0 0 15 0 0 5 0 0 timeout->left = timeout->time; - . . . . . . . . . - 10 0 0 5 0 0 0 0 0 if (p) - . . . . . . . . . p->next = timeout; - . . . . . . . . . else - 10 0 0 5 0 0 5 0 0 timeouts = timeout; - 10 0 0 10 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompTimeoutHandle - . . . . . . . . . compAddTimeout(int time, CallBackProc callBack, void *closure) - 6 2 2 0 0 0 4 0 0 { - . . . . . . . . . CompTimeout *timeout; - . . . . . . . . . - 3 0 0 0 0 0 2 0 0 timeout = malloc(sizeof(CompTimeout)); - 2 0 0 1 0 0 0 0 0 if (!timeout) - . . . . . . . . . return 0; - . . . . . . . . . - 3 0 0 2 0 0 1 0 0 timeout->time = time; - 3 0 0 2 0 0 1 0 0 timeout->callBack = callBack; - 3 1 1 2 0 0 1 0 0 timeout->closure = closure; - 5 0 0 2 1 0 2 0 0 timeout->handle = lastTimeoutHandle++; - . . . . . . . . . - 3 0 0 1 0 0 0 0 0 if (lastTimeoutHandle == MAXSHORT) - . . . . . . . . . lastTimeoutHandle = 1; - . . . . . . . . . - 3 1 1 1 1 1 0 0 0 if (!timeouts) - 3 0 0 0 0 0 1 0 0 gettimeofday(&lastTimeout, 0); - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 addTimeout(timeout); - . . . . . . . . . - 4 0 0 3 0 0 1 0 0 return timeout->handle; - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void compRemoveTimeout(CompTimeoutHandle handle) - . . . . . . . . . { - . . . . . . . . . CompTimeout *p = 0, *t; - . . . . . . . . . - . . . . . . . . . for (t = timeouts; t; t = t->next) - . . . . . . . . . { - . . . . . . . . . if (t->handle == handle) --- line 1007 ---------------------------------------- --- line 1018 ---------------------------------------- - . . . . . . . . . timeouts = t->next; - . . . . . . . . . - . . . . . . . . . free(t); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . CompWatchFdHandle - . . . . . . . . . compAddWatchFd(int fd, short int events, CallBackProc callBack, void *closure) - 7 1 1 0 0 0 5 0 0 { - . . . . . . . . . CompWatchFd *watchFd; - . . . . . . . . . - 3 1 1 0 0 0 2 0 0 watchFd = malloc(sizeof(CompWatchFd)); - 2 0 0 1 0 0 0 0 0 if (!watchFd) - . . . . . . . . . return 0; - . . . . . . . . . - 3 0 0 2 0 0 1 0 0 watchFd->fd = fd; - 3 0 0 2 0 0 1 0 0 watchFd->callBack = callBack; - 3 1 1 2 0 0 1 0 0 watchFd->closure = closure; - 5 0 0 2 1 0 2 0 0 watchFd->handle = lastWatchFdHandle++; - . . . . . . . . . - 3 0 0 1 0 0 0 0 0 if (lastWatchFdHandle == MAXSHORT) - . . . . . . . . . lastWatchFdHandle = 1; - . . . . . . . . . - 3 0 0 2 0 0 1 0 0 watchFd->next = watchFds; - 2 1 1 1 0 0 1 0 0 watchFds = watchFd; - . . . . . . . . . - 3 0 0 1 0 0 1 0 0 nWatchFds++; - . . . . . . . . . - 6 0 0 2 0 0 2 0 0 watchPollFds = realloc(watchPollFds, nWatchFds * sizeof(struct pollfd)); - . . . . . . . . . - 9 1 1 3 0 0 1 0 0 watchPollFds[nWatchFds - 1].fd = fd; - 9 1 1 3 0 0 1 0 0 watchPollFds[nWatchFds - 1].events = events; - . . . . . . . . . - 4 0 0 3 0 0 1 0 0 return watchFd->handle; - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void compRemoveWatchFd(CompWatchFdHandle handle) - . . . . . . . . . { - . . . . . . . . . CompWatchFd *p = 0, *w; - . . . . . . . . . int i; - . . . . . . . . . - . . . . . . . . . for (i = nWatchFds - 1, w = watchFds; w; i--, w = w->next) - . . . . . . . . . { --- line 1060 ---------------------------------------- --- line 1086 ---------------------------------------- - . . . . . . . . . ((((tv1)->tv_sec - (tv2)->tv_sec) * 1000000) + \ - . . . . . . . . . ((tv1)->tv_usec - (tv2)->tv_usec)) / 1000 : \ - . . . . . . . . . ((((tv1)->tv_sec - 1 - (tv2)->tv_sec) * 1000000) + \ - . . . . . . . . . (1000000 + (tv1)->tv_usec - (tv2)->tv_usec)) / 1000 - . . . . . . . . . - . . . . . . . . . static int - . . . . . . . . . getTimeToNextRedraw(CompScreen * s, - . . . . . . . . . struct timeval *tv, struct timeval *lastTv, Bool idle) - 2,541 325 2 0 0 0 2,178 0 0 { - . . . . . . . . . int diff, next; - . . . . . . . . . - 9,801 651 4 3,267 21 0 1,089 0 0 diff = TIMEVALDIFF(tv, lastTv); - . . . . . . . . . - . . . . . . . . . /* handle clock rollback */ - 726 0 0 363 0 0 0 0 0 if (diff < 0) - . . . . . . . . . diff = 0; - . . . . . . . . . - 2,115 0 0 1,057 18 0 0 0 0 if (idle || - . . . . . . . . . (s->getVideoSync - . . . . . . . . . && s->opt[COMP_SCREEN_OPTION_SYNC_TO_VBLANK].value.b)) - . . . . . . . . . { - 64 16 2 32 0 0 0 0 0 if (s->timeMult > 1) - . . . . . . . . . { - 2 0 0 1 0 0 1 0 0 s->frameStatus = -1; - 4 0 0 3 0 0 1 0 0 s->redrawTime = s->optimalRedrawTime; - 5 1 0 3 0 0 1 0 0 s->timeMult--; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 1,388 311 1 1,041 0 0 0 0 0 if (diff > s->redrawTime) - . . . . . . . . . { - 208 0 0 104 0 0 0 0 0 if (s->frameStatus > 0) - 8 0 0 4 0 0 4 0 0 s->frameStatus = 0; - . . . . . . . . . - 364 52 1 208 0 0 52 0 0 next = s->optimalRedrawTime * (s->timeMult + 1); - 156 0 0 104 0 0 0 0 0 if (diff > next) - . . . . . . . . . { - 55 0 0 33 0 0 11 0 0 s->frameStatus--; - 44 11 1 22 0 0 0 0 0 if (s->frameStatus < -1) - . . . . . . . . . { - 25 0 0 15 0 0 5 0 0 s->timeMult++; - 30 0 0 15 0 0 10 0 0 s->redrawTime = diff = next; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 1,180 534 1 885 0 0 0 0 0 else if (diff < s->redrawTime) - . . . . . . . . . { - 1,140 0 0 570 0 0 0 0 0 if (s->frameStatus < 0) - 14 0 0 7 0 0 7 0 0 s->frameStatus = 0; - . . . . . . . . . - 1,140 0 0 570 0 0 0 0 0 if (s->timeMult > 1) - . . . . . . . . . { - 1,148 142 1 656 0 0 164 0 0 next = s->optimalRedrawTime * (s->timeMult - 1); - 492 0 0 328 0 0 0 0 0 if (diff < next) - . . . . . . . . . { - 100 0 0 60 0 0 20 0 0 s->frameStatus++; - 80 19 0 40 0 0 0 0 0 if (s->frameStatus > 4) - . . . . . . . . . { - 20 0 0 12 0 0 4 0 0 s->timeMult--; - 12 0 0 8 0 0 4 0 0 s->redrawTime = next; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 1,452 319 2 1,089 0 0 0 0 0 if (diff > s->redrawTime) - 126 0 0 0 0 0 63 0 0 return 0; - . . . . . . . . . - 1,863 325 2 1,263 0 0 300 0 0 return s->redrawTime - diff; - 1,089 0 0 1,089 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static const int maskTable[] = { - . . . . . . . . . ShiftMask, LockMask, ControlMask, Mod1Mask, - . . . . . . . . . Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask - . . . . . . . . . }; - . . . . . . . . . static const int maskTableSize = sizeof(maskTable) / sizeof(int); - . . . . . . . . . - . . . . . . . . . void updateModifierMappings(CompDisplay * d) - 4 1 1 0 0 0 2 0 0 { - . . . . . . . . . unsigned int modMask[CompModNum]; - 3 0 0 0 0 0 3 0 0 int i, minKeycode = 0, maxKeycode = 0, keysymsPerKeycode = 0; - . . . . . . . . . KeySym *keyboard_sym; - . . . . . . . . . - 25 1 1 15 0 0 1 0 0 for (i = 0; i < CompModNum; i++) - 21 0 0 7 0 0 7 0 0 modMask[i] = 0; - . . . . . . . . . - 5 0 0 2 1 0 1 0 0 XDisplayKeycodes(d->display, &minKeycode, &maxKeycode); - 13 1 1 5 0 0 2 0 0 keyboard_sym = - . . . . . . . . . XGetKeyboardMapping(d->display, minKeycode, - . . . . . . . . . (maxKeycode - minKeycode + 1), - . . . . . . . . . &keysymsPerKeycode); - . . . . . . . . . - 2 0 0 1 0 0 0 0 0 if (keyboard_sym) - 2 0 0 1 0 0 1 0 0 XFree(keyboard_sym); - . . . . . . . . . - 4 0 0 2 1 0 0 0 0 if (d->modMap) - . . . . . . . . . XFreeModifiermap(d->modMap); - . . . . . . . . . - 6 1 1 3 1 0 2 0 0 d->modMap = XGetModifierMapping(d->display); - 9 1 1 5 0 0 0 0 0 if (d->modMap && d->modMap->max_keypermod > 0) - . . . . . . . . . { - 1 0 0 0 0 0 1 0 0 KeySym keysym = 0; - . . . . . . . . . int index, size, mask; - . . . . . . . . . - 6 0 0 4 1 1 1 1 0 size = maskTableSize * d->modMap->max_keypermod; - . . . . . . . . . - 101 1 1 74 0 0 1 0 0 for (i = 0; i < size; i++) - . . . . . . . . . { - 216 1 1 120 0 0 0 0 0 if (!d->modMap->modifiermap[i]) - . . . . . . . . . continue; - . . . . . . . . . - 14 0 0 0 0 0 14 0 0 index = 0; - . . . . . . . . . do - . . . . . . . . . { - 270 1 1 162 1 0 36 1 0 keysym = XKeycodeToKeysym(d->display, - . . . . . . . . . d->modMap->modifiermap[i], index++); - . . . . . . . . . } - 48 0 0 26 0 0 0 0 0 while (!keysym && index < keysymsPerKeycode); - . . . . . . . . . - 28 0 0 14 0 0 0 0 0 if (keysym) - . . . . . . . . . { - 154 1 1 70 4 1 14 0 0 mask = maskTable[i / d->modMap->max_keypermod]; - . . . . . . . . . - 54 0 0 26 0 0 0 0 0 if (keysym == XK_Alt_L || keysym == XK_Alt_R) - . . . . . . . . . { - 8 0 0 4 0 0 2 0 0 modMask[CompModAlt] |= mask; - . . . . . . . . . } - 47 1 1 23 0 0 0 0 0 else if (keysym == XK_Meta_L || keysym == XK_Meta_R) - . . . . . . . . . { - 4 0 0 2 0 0 1 0 0 modMask[CompModMeta] |= mask; - . . . . . . . . . } - 43 0 0 21 0 0 0 0 0 else if (keysym == XK_Super_L || keysym == XK_Super_R) - . . . . . . . . . { - 4 0 0 2 0 0 1 0 0 modMask[CompModSuper] |= mask; - . . . . . . . . . } - 39 1 1 19 0 0 0 0 0 else if (keysym == XK_Hyper_L || keysym == XK_Hyper_R) - . . . . . . . . . { - 4 0 0 2 0 0 1 0 0 modMask[CompModHyper] |= mask; - . . . . . . . . . } - 18 0 0 9 0 0 0 0 0 else if (keysym == XK_Mode_switch) - . . . . . . . . . { - 5 0 0 2 0 0 1 0 0 modMask[CompModModeSwitch] |= mask; - . . . . . . . . . } - 16 0 0 8 0 0 0 0 0 else if (keysym == XK_Scroll_Lock) - . . . . . . . . . { - . . . . . . . . . modMask[CompModScrollLock] |= mask; - . . . . . . . . . } - 16 0 0 8 0 0 0 0 0 else if (keysym == XK_Num_Lock) - . . . . . . . . . { - 4 0 0 2 0 0 1 0 0 modMask[CompModNumLock] |= mask; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 25 1 1 15 0 0 1 0 0 for (i = 0; i < CompModNum; i++) - . . . . . . . . . { - 35 0 0 14 0 0 0 0 0 if (!modMask[i]) - 3 0 0 1 0 0 1 0 0 modMask[i] = CompNoMask; - . . . . . . . . . } - . . . . . . . . . - 19 1 1 6 0 0 3 0 0 if (memcmp(modMask, d->modMask, sizeof(modMask))) - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . - 11 1 1 5 0 0 4 0 0 memcpy(d->modMask, modMask, sizeof(modMask)); - . . . . . . . . . - 8 0 0 3 0 0 1 0 0 d->ignoredModMask = LockMask | - . . . . . . . . . (modMask[CompModNumLock] & ~CompNoMask) | - . . . . . . . . . (modMask[CompModScrollLock] & ~CompNoMask); - . . . . . . . . . - 6 1 1 3 0 0 1 0 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . updatePassiveGrabs(s); - . . . . . . . . . } - . . . . . . . . . } - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int virtualToRealModMask(CompDisplay * d, unsigned int modMask) - 5,548 44 4 0 0 0 4,161 17 1 { - . . . . . . . . . int i; - . . . . . . . . . -34,675 54 5 20,805 0 0 1,387 0 0 for (i = 0; i < CompModNum; i++) - . . . . . . . . . { -58,254 0 0 29,127 58 3 0 0 0 if (modMask & virtualModMask[i]) - . . . . . . . . . { - 6,264 36 3 3,132 25 2 0 0 0 if (d->modMask[i] == CompNoMask) - . . . . . . . . . return 0xFFFFFFFF; // should help on no-super-key type situations - 5,220 0 0 3,132 0 0 0 0 0 modMask &= ~virtualModMask[i]; - 5,220 0 0 4,176 0 0 0 0 0 modMask |= d->modMask[i]; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 4,161 0 0 2,774 0 0 1,387 0 0 return modMask; - 2,774 0 0 2,774 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int keycodeToModifiers(CompDisplay * d, int keycode) - . . . . . . . . . { - . . . . . . . . . unsigned int mods = 0; - . . . . . . . . . int mod, k; - . . . . . . . . . - . . . . . . . . . for (mod = 0; mod < maskTableSize; mod++) - . . . . . . . . . { --- line 1288 ---------------------------------------- --- line 1293 ---------------------------------------- - . . . . . . . . . mods |= maskTable[mod]; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . return mods; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static int doPoll(int timeout) - 1,276 275 1 0 0 0 638 0 0 { - . . . . . . . . . int rv; - . . . . . . . . . - 1,914 275 1 957 0 0 638 0 0 rv = poll(watchPollFds, nWatchFds, timeout); - 638 0 0 319 0 0 0 0 0 if (rv) - . . . . . . . . . { - . . . . . . . . . CompWatchFd *w; - . . . . . . . . . int i; - . . . . . . . . . - 994 49 0 497 53 1 213 0 0 for (i = nWatchFds - 1, w = watchFds; w; i--, w = w->next) - . . . . . . . . . { - 923 0 0 355 105 2 0 0 0 if (watchPollFds[i].revents != 0 && w->callBack) - . . . . . . . . . w->callBack(w->closure); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 319 274 1 319 0 0 0 0 0 return rv; - 638 0 0 638 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void handleTimeouts(struct timeval *tv) - 1,795 54 2 0 0 0 1,077 0 0 { - . . . . . . . . . CompTimeout *t; - . . . . . . . . . int timeDiff; - . . . . . . . . . - 8,975 203 2 2,513 27 0 1,077 0 0 timeDiff = TIMEVALDIFF(tv, &lastTimeout); - . . . . . . . . . - . . . . . . . . . /* handle clock rollback */ - 718 0 0 359 0 0 0 0 0 if (timeDiff < 0) - . . . . . . . . . timeDiff = 0; - . . . . . . . . . - 3,590 209 2 1,795 0 0 718 0 0 for (t = timeouts; t; t = t->next) - 2,154 0 0 1,436 319 2 359 0 0 t->left -= timeDiff; - . . . . . . . . . - 2,900 333 2 1,089 0 0 0 0 0 while (timeouts && timeouts->left <= 0) - . . . . . . . . . { - 8 4 2 4 0 0 4 0 0 t = timeouts; - 28 0 0 16 0 0 4 0 0 if ((*t->callBack) (t->closure)) - . . . . . . . . . { - 12 0 0 8 0 0 4 0 0 timeouts = t->next; - 12 0 0 4 0 0 4 0 0 addTimeout(t); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . timeouts = t->next; - . . . . . . . . . free(t); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 1,795 0 0 1,077 0 0 718 4 0 lastTimeout = *tv; - 1,436 10 1 1,077 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void waitForVideoSync(CompScreen * s) - 1,296 322 1 0 0 0 648 0 0 { - . . . . . . . . . unsigned int sync; - . . . . . . . . . - 1,296 0 0 648 324 1 0 0 0 if (!s->opt[COMP_SCREEN_OPTION_SYNC_TO_VBLANK].value.b) - . . . . . . . . . return; - . . . . . . . . . - 972 0 0 324 324 0 0 0 0 if (disable_vsync) - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . /* we currently can't handle sync to vblank when we have more than one - . . . . . . . . . output device */ - 1,296 0 0 648 0 0 0 0 0 if (s->nOutputDev > 1) - . . . . . . . . . return; - . . . . . . . . . - 1,296 324 0 648 324 0 0 0 0 if (s->getVideoSync) - . . . . . . . . . { - . . . . . . . . . glFlush(); - . . . . . . . . . - . . . . . . . . . (*s->getVideoSync) (&sync); - . . . . . . . . . (*s->waitVideoSync) (2, (sync + 1) % 2, &sync); - . . . . . . . . . } - 648 0 0 648 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . /* Sets up a projection matrix for global perspective - . . . . . . . . . * The M() stuff and the translation should be combined so we can store - . . . . . . . . . * the individual outputdev matrices instead of storing x,y,a,b,c,d... - . . . . . . . . . */ - . . . . . . . . . static inline void - . . . . . . . . . frustum(GLfloat x, GLfloat y, GLfloat a, GLfloat b, GLfloat c, GLfloat d) - . . . . . . . . . { --- line 1382 ---------------------------------------- --- line 1407 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . /* Calls frustum() for the current output dev, call glFrustum() if - . . . . . . . . . * we're doing local perspective, calculate multiPerspective[] if - . . . . . . . . . * needed. - . . . . . . . . . */ - . . . . . . . . . static void - . . . . . . . . . perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar, - . . . . . . . . . int output, CompScreen * s) - 9 2 2 0 0 0 7 1 1 { - . . . . . . . . . GLfloat xmin, xmax, ymin, ymax; - . . . . . . . . . GLfloat x, y, a, b, c, d; - . . . . . . . . . short int head; - . . . . . . . . . - 2 0 0 0 0 0 1 0 0 glMatrixMode(GL_PROJECTION); - 1 0 0 0 0 0 1 0 0 glLoadIdentity(); - . . . . . . . . . - 4 1 1 2 0 0 0 0 0 if (s->projectionStyle == COMP_PERSPECTIVE_GLOBAL_REAL) - . . . . . . . . . { - . . . . . . . . . frustum(multiPerspective[output].x, - . . . . . . . . . multiPerspective[output].y, - . . . . . . . . . multiPerspective[output].a, - . . . . . . . . . multiPerspective[output].b, - . . . . . . . . . multiPerspective[output].c, multiPerspective[output].d); - . . . . . . . . . glMatrixMode(GL_MODELVIEW); - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . - 13 2 2 5 1 1 3 0 0 ymax = zNear * tan(fovy * M_PI / 360.0); - 4 0 0 2 0 0 1 0 0 ymin = -ymax; - 3 1 1 2 0 0 1 0 0 xmin = ymin * aspect; - 3 0 0 2 0 0 1 0 0 xmax = ymax * aspect; - 4 0 0 2 0 0 0 0 0 if (s->projectionStyle == COMP_PERSPECTIVE_LOCAL) - . . . . . . . . . { - 13 1 1 6 0 0 1 0 0 glFrustum(xmin, xmax, ymin, ymax, zNear, zFar); - 2 0 0 1 0 0 1 0 0 s->projectionStyle = COMP_PERSPECTIVE_LOCAL_REAL; - 2 0 0 0 0 0 1 0 0 glMatrixMode(GL_MODELVIEW); - 1 0 0 0 0 0 0 0 0 return; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . for (head = 0; head < s->nOutputDev; head++) - . . . . . . . . . { - . . . . . . . . . x = (2.0 * zNear) / (xmax - xmin); - . . . . . . . . . y = (2.0 * zNear) / (ymax - ymin); - . . . . . . . . . - . . . . . . . . . --- line 1451 ---------------------------------------- --- line 1469 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . frustum(multiPerspective[output].x, - . . . . . . . . . multiPerspective[output].y, - . . . . . . . . . multiPerspective[output].a, - . . . . . . . . . multiPerspective[output].b, - . . . . . . . . . multiPerspective[output].c, multiPerspective[output].d); - . . . . . . . . . glMatrixMode(GL_MODELVIEW); - . . . . . . . . . s->projectionStyle = COMP_PERSPECTIVE_GLOBAL_REAL; - 2 1 1 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int eventLoop(void) - 7 2 2 1 0 0 3 0 0 { - . . . . . . . . . XEvent event; - . . . . . . . . . int timeDiff, i; - . . . . . . . . . struct timeval tv; - . . . . . . . . . Region tmpRegion, outputRegion; - 2 0 0 1 1 0 1 1 0 CompDisplay *display = compDisplays; - . . . . . . . . . CompScreen *s; - 1 0 0 0 0 0 1 1 1 int time, timeToNextRedraw = 0; - . . . . . . . . . CompWindow *w; - . . . . . . . . . unsigned int damageMask, mask; - . . . . . . . . . - 2 0 0 0 0 0 2 0 0 tmpRegion = XCreateRegion(); - 2 0 0 0 0 0 2 0 0 outputRegion = XCreateRegion(); - 4 1 1 2 0 0 0 0 0 if (!tmpRegion || !outputRegion) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, "%s: Couldn't create temporary regions\n", - . . . . . . . . . programName); - . . . . . . . . . return 0; - . . . . . . . . . } - . . . . . . . . . - 8 1 1 3 2 0 1 0 0 compAddWatchFd(ConnectionNumber(display->display), POLLIN, NULL, NULL); - . . . . . . . . . - . . . . . . . . . for (;;) - . . . . . . . . . { - 1,588 326 1 794 328 1 0 0 0 if (display->dirtyPluginList) - 2 1 1 1 0 0 1 0 0 updatePlugins(display); - . . . . . . . . . - 1,191 327 2 397 265 0 0 0 0 if (restartSignal) - . . . . . . . . . { - . . . . . . . . . execvp(programName, programArgv); - . . . . . . . . . return 1; - . . . . . . . . . } - 1,191 0 0 397 325 1 0 0 0 else if (shutDown) - . . . . . . . . . { - . . . . . . . . . return 0; - . . . . . . . . . } - . . . . . . . . . -34,785 331 2 13,914 28 1 6,957 0 0 while (XPending(display->display)) - . . . . . . . . . { -26,240 103 2 13,120 0 0 6,560 0 0 XNextEvent(display->display, &event); - . . . . . . . . . -27,527 99 2 13,978 162 8 6,560 0 0 switch (event.type) - . . . . . . . . . { - . . . . . . . . . case ButtonPress: - . . . . . . . . . case ButtonRelease: - 6 0 0 4 0 0 2 0 0 display->pointerX = event.xbutton.x_root; - 6 0 0 4 0 0 2 0 0 display->pointerY = event.xbutton.y_root; - 2 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case KeyPress: - . . . . . . . . . case KeyRelease: - 108 27 1 72 0 0 36 0 0 display->pointerX = event.xkey.x_root; - 108 0 0 72 0 0 36 0 0 display->pointerY = event.xkey.y_root; - 36 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case MotionNotify: - 315 42 0 210 0 0 105 0 0 display->pointerX = event.xmotion.x_root; - 315 47 0 210 0 0 105 0 0 display->pointerY = event.xmotion.y_root; - 105 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case EnterNotify: - . . . . . . . . . case LeaveNotify: - 18 6 1 12 0 0 6 0 0 display->pointerX = event.xcrossing.x_root; - 18 0 0 12 0 0 6 0 0 display->pointerY = event.xcrossing.y_root; - 6 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case ClientMessage: - 30 4 0 18 3 1 0 0 0 if (event.xclient.message_type == display->xdndPositionAtom) - . . . . . . . . . { - . . . . . . . . . display->pointerX = event.xclient.data.l[2] >> 16; - . . . . . . . . . display->pointerY = event.xclient.data.l[2] & 0xffff; - . . . . . . . . . } - . . . . . . . . . default: - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . -26,240 100 2 13,120 128 2 6,560 0 0 sn_display_process_event(display->snDisplay, &event); - . . . . . . . . . - 6,560 0 0 0 0 0 6,560 2 0 inHandleEvent = TRUE; - . . . . . . . . . -32,800 0 0 19,680 2 0 6,560 0 0 (*display->handleEvent) (display, &event); - . . . . . . . . . - 6,560 5 0 0 0 0 6,560 102 0 inHandleEvent = FALSE; - . . . . . . . . . -26,240 0 0 19,680 79 0 6,560 0 0 display->lastPointerX = display->pointerX; -26,240 0 0 19,680 0 0 6,560 0 0 display->lastPointerY = display->pointerY; - . . . . . . . . . } - . . . . . . . . . - 4,367 328 2 2,382 0 0 794 41 1 for (s = display->screens; s; s = s->next) - . . . . . . . . . { - 1,588 0 0 794 26 0 0 0 0 if (s->damageMask) - . . . . . . . . . { - 1,089 0 0 363 0 0 363 0 0 finishScreenDrawing(s); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 68 0 0 34 0 0 34 6 0 s->idle = TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 397 0 0 0 0 0 397 0 0 damageMask = 0; - 397 328 2 0 0 0 397 0 0 timeToNextRedraw = MAXSHORT; - . . . . . . . . . - 4,367 330 2 2,382 0 0 794 0 0 for (s = display->screens; s; s = s->next) - . . . . . . . . . { - 1,588 0 0 794 0 0 0 0 0 if (!s->damageMask) - . . . . . . . . . continue; - . . . . . . . . . - 726 0 0 363 0 0 0 0 0 if (!damageMask) - . . . . . . . . . { - 1,089 325 2 0 0 0 363 0 0 gettimeofday(&tv, 0); - 1,089 0 0 1,089 0 0 0 0 0 damageMask |= s->damageMask; - . . . . . . . . . } - . . . . . . . . . - 3,630 325 2 1,815 0 0 726 0 0 s->timeLeft = - . . . . . . . . . getTimeToNextRedraw(s, &tv, &s->lastRedraw, s->idle); - 1,452 0 0 1,089 0 0 0 0 0 if (s->timeLeft < timeToNextRedraw) - 1,089 0 0 726 0 0 363 0 0 timeToNextRedraw = s->timeLeft; - . . . . . . . . . } - . . . . . . . . . - 794 0 0 397 0 0 0 0 0 if (damageMask) - . . . . . . . . . { - 726 326 2 363 0 0 363 0 0 time = timeToNextRedraw; - 726 0 0 363 0 0 0 0 0 if (time) - 855 0 0 285 0 0 570 0 0 time = doPoll(time); - . . . . . . . . . - 726 0 0 363 0 0 0 0 0 if (time == 0) - . . . . . . . . . { - 975 0 0 0 0 0 325 0 0 gettimeofday(&tv, 0); - . . . . . . . . . - 975 325 2 325 0 0 0 0 0 if (timeouts) - 650 0 0 0 0 0 325 0 0 handleTimeouts(&tv); - . . . . . . . . . - 3,894 7 1 1,947 3 0 649 0 0 for (s = display->screens; s; s = s->next) - . . . . . . . . . { - 2,600 325 2 1,625 6 0 0 0 0 if (!s->damageMask || s->timeLeft > timeToNextRedraw) - . . . . . . . . . continue; - . . . . . . . . . - 650 0 0 325 0 0 325 0 0 targetScreen = s; - . . . . . . . . . - 8,125 650 4 2,275 0 0 975 0 0 timeDiff = TIMEVALDIFF(&tv, &s->lastRedraw); - . . . . . . . . . - . . . . . . . . . /* handle clock rollback */ - 650 0 0 325 0 0 0 0 0 if (timeDiff < 0) - . . . . . . . . . timeDiff = 0; - . . . . . . . . . - 650 325 2 325 0 0 325 0 0 s->stencilRef = 0; - . . . . . . . . . - 650 0 0 325 0 0 325 0 0 makeScreenCurrent(s); - . . . . . . . . . - 1,300 0 0 650 0 0 0 0 0 if (s->slowAnimations) - . . . . . . . . . { - . . . . . . . . . (*s-> - . . . . . . . . . preparePaintScreen) (s, - . . . . . . . . . s-> - . . . . . . . . . idle - . . . . . . . . . ? 2 - . . . . . . . . . : - . . . . . . . . . (timeDiff * 2) / s->redrawTime); - . . . . . . . . . } - . . . . . . . . . else - 3,932 650 3 2,616 37 0 975 0 0 (*s-> - . . . . . . . . . preparePaintScreen) (s, - . . . . . . . . . s-> - . . . . . . . . . idle - . . . . . . . . . ? s->redrawTime : timeDiff); - . . . . . . . . . - 325 1 1 0 0 0 325 4 0 IPCS_lock = TRUE; - . . . . . . . . . /* substract top most overlay window region */ - 1,300 325 1 650 649 2 0 0 0 if (s->overlayWindowCount) - . . . . . . . . . { - . . . . . . . . . for (w = s->reverseWindows; w; w = w->prev) - . . . . . . . . . { - . . . . . . . . . if (w->destroyed || w->invisible) - . . . . . . . . . continue; - . . . . . . . . . - . . . . . . . . . if (!w->redirected) - . . . . . . . . . XSubtractRegion --- line 1653 ---------------------------------------- --- line 1658 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . if (s->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK) - . . . . . . . . . { - . . . . . . . . . s->damageMask &= ~COMP_SCREEN_DAMAGE_ALL_MASK; - . . . . . . . . . s->damageMask |= COMP_SCREEN_DAMAGE_REGION_MASK; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 1,625 325 1 650 323 0 0 0 0 if (s->damageMask & COMP_SCREEN_DAMAGE_REGION_MASK) - . . . . . . . . . { - 84 0 0 56 14 0 14 0 0 XIntersectRegion(s->damage, &s->region, tmpRegion); - . . . . . . . . . - 143 16 1 81 2 0 0 0 0 if (tmpRegion->numRects == - . . . . . . . . . 1 - . . . . . . . . . && tmpRegion->rects-> - . . . . . . . . . x1 == 0 - . . . . . . . . . && tmpRegion->rects-> - . . . . . . . . . y1 == 0 - . . . . . . . . . && tmpRegion->rects-> - . . . . . . . . . x2 == s->width - . . . . . . . . . && tmpRegion->rects->y2 == s->height) - . . . . . . . . . damageScreen(s); - . . . . . . . . . } - . . . . . . . . . - 975 325 1 650 0 0 325 311 1 EMPTY_REGION(s->damage); - 975 0 0 650 0 0 325 0 0 mask = s->damageMask; - 650 0 0 325 0 0 325 0 0 s->damageMask = 0; - . . . . . . . . . - 3,570 336 2 2,271 324 0 325 0 0 for (i = 0; i < s->nOutputDev; i++) - . . . . . . . . . { - 650 0 0 325 0 0 325 325 1 targetScreen = s; - 650 0 0 325 0 0 325 0 0 targetOutput = i; - . . . . . . . . . - 1,300 0 0 650 5 0 0 0 0 if (s->projectionStyle != COMP_PERSPECTIVE_LOCAL_REAL) - 7 1 1 6 1 1 1 0 0 perspective(60.0f, 1.0f, 0.1f, 100.0f, i, s); - . . . . . . . . . - 1,300 324 0 650 0 0 0 0 0 if (s->nOutputDev > 1) - . . . . . . . . . { - . . . . . . . . . glViewport(s-> - . . . . . . . . . outputDev - . . . . . . . . . [i]. - . . . . . . . . . region. - . . . . . . . . . extents. - . . . . . . . . . x1, - . . . . . . . . . s-> --- line 1702 ---------------------------------------- --- line 1707 ---------------------------------------- - . . . . . . . . . region. - . . . . . . . . . extents. - . . . . . . . . . y2, - . . . . . . . . . s-> - . . . . . . . . . outputDev - . . . . . . . . . [i].width, s->outputDev[i].height); - . . . . . . . . . } - . . . . . . . . . - 1,300 325 1 325 0 0 0 0 0 if (mask & COMP_SCREEN_DAMAGE_ALL_MASK) - . . . . . . . . . { - 5,597 269 1 2,177 0 0 311 0 0 (*s-> - . . . . . . . . . paintScreen) (s, - . . . . . . . . . &defaultScreenPaintAttrib, - . . . . . . . . . &s-> - . . . . . . . . . outputDev - . . . . . . . . . [i]. - . . . . . . . . . region, - . . . . . . . . . i, - . . . . . . . . . PAINT_SCREEN_REGION_MASK - . . . . . . . . . | PAINT_SCREEN_FULL_MASK); - . . . . . . . . . } - 56 28 1 14 0 0 0 0 0 else if (mask & COMP_SCREEN_DAMAGE_REGION_MASK) - . . . . . . . . . { - 182 4 1 70 0 0 14 0 0 XIntersectRegion - . . . . . . . . . (tmpRegion, - . . . . . . . . . &s->outputDev[i].region, outputRegion); - 140 1 0 70 0 0 14 0 0 if (! - . . . . . . . . . (*s-> - . . . . . . . . . paintScreen) - . . . . . . . . . (s, &defaultScreenPaintAttrib, outputRegion, - . . . . . . . . . i, PAINT_SCREEN_REGION_MASK)) - . . . . . . . . . { - . . . . . . . . . (*s-> - . . . . . . . . . paintScreen) - . . . . . . . . . (s, --- line 1741 ---------------------------------------- --- line 1746 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . XUnionRegion - . . . . . . . . . (tmpRegion, - . . . . . . . . . &s->outputDev[i].region, tmpRegion); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 648 122 1 324 0 0 324 0 0 waitForVideoSync(s); - . . . . . . . . . - 1,296 0 0 324 0 0 0 0 0 if (mask & COMP_SCREEN_DAMAGE_ALL_MASK) - . . . . . . . . . { - 1,860 0 0 1,240 930 1 310 0 0 glXSwapBuffers(display->display, s->output); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . BoxPtr pBox; - . . . . . . . . . int nBox, y; - . . . . . . . . . - 42 6 1 28 28 0 14 0 0 pBox = tmpRegion->rects; - 42 0 0 28 0 0 14 0 0 nBox = tmpRegion->numRects; - . . . . . . . . . - 56 0 0 28 0 0 0 0 0 if (s->copySubBuffer) - . . . . . . . . . { - 418 14 1 260 0 0 0 0 0 while (nBox--) - . . . . . . . . . { - 1,044 6 1 464 25 0 116 0 0 y = s->height - pBox->y2; - . . . . . . . . . - 3,596 13 1 1,972 26 0 116 0 0 (*s-> - . . . . . . . . . copySubBuffer) - . . . . . . . . . (display-> - . . . . . . . . . display, - . . . . . . . . . s-> - . . . . . . . . . output, - . . . . . . . . . pBox-> - . . . . . . . . . x1, y, - . . . . . . . . . pBox-> - . . . . . . . . . x2 - pBox->x1, pBox->y2 - pBox->y1); - . . . . . . . . . - 116 0 0 116 0 0 0 0 0 pBox++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . glEnable(GL_SCISSOR_TEST); - . . . . . . . . . glDrawBuffer(GL_FRONT); - . . . . . . . . . - . . . . . . . . . while (nBox--) --- line 1793 ---------------------------------------- --- line 1823 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . glDrawBuffer(GL_BACK); - . . . . . . . . . glDisable(GL_SCISSOR_TEST); - . . . . . . . . . glFlush(); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 324 324 1 0 0 0 324 1 0 targetScreen = NULL; - 324 0 0 0 0 0 324 0 0 targetOutput = 0; - . . . . . . . . . - 1,620 270 1 972 0 0 648 324 1 s->lastRedraw = tv; - . . . . . . . . . - 324 0 0 0 0 0 324 324 0 IPCS_lock = FALSE; - . . . . . . . . . - 1,296 0 0 972 0 0 324 0 0 (*s->donePaintScreen) (s); - . . . . . . . . . /* XXX: - . . . . . . . . . * I belive the intention is for aiglx only. - . . . . . . . . . * I added the conditional, - . . . . . . . . . * this needs to be tested. - . . . . . . . . . */ - . . . . . . . . . //if (!useCow) - . . . . . . . . . // glFinish(); // patch from redhat - . . . . . . . . . // removed due to fix from upstream - . . . . . . . . . - . . . . . . . . . /* remove destroyed windows */ - 1,636 633 2 656 1 0 0 0 0 while (s->pendingDestroys) - . . . . . . . . . { - . . . . . . . . . CompWindow *w; - . . . . . . . . . - 4,684 2 1 2,808 826 0 936 0 0 for (w = s->windows; w; w = w->next) - . . . . . . . . . { - 3,744 0 0 1,872 875 0 0 0 0 if (w->destroyed) - . . . . . . . . . { - 8 0 0 4 0 0 4 0 0 addWindowDamage(w); - 8 0 0 4 0 0 4 0 0 removeWindow(w); - 4 0 0 0 0 0 0 0 0 break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 20 0 0 12 8 0 4 0 0 s->pendingDestroys--; - . . . . . . . . . } - . . . . . . . . . - 648 0 0 324 0 0 324 324 0 s->idle = FALSE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 102 18 1 34 1 0 0 0 0 if (timeouts) - . . . . . . . . . { - 136 0 0 68 18 0 0 0 0 if (timeouts->left > 0) - 102 0 0 68 0 0 34 0 0 doPoll(timeouts->left); - . . . . . . . . . - 102 0 0 0 0 0 34 0 0 gettimeofday(&tv, 0); - . . . . . . . . . - 102 16 1 0 0 0 34 0 0 handleTimeouts(&tv); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . doPoll(1000); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . return 0; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static int errors = 0; - . . . . . . . . . - . . . . . . . . . static int errorHandler(Display * dpy, XErrorEvent * e) - 124 16 4 0 0 0 93 0 0 { - . . . . . . . . . - . . . . . . . . . #ifdef DEBUG - . . . . . . . . . char str[128]; - . . . . . . . . . char *name = 0; - . . . . . . . . . int o; - . . . . . . . . . #endif - . . . . . . . . . - 93 0 0 31 6 1 31 0 0 errors++; - . . . . . . . . . - . . . . . . . . . #ifdef DEBUG - . . . . . . . . . XGetErrorDatabaseText(dpy, "XlibMessage", "XError", "", str, 128); - . . . . . . . . . fprintf(stderr, "%s", str); - . . . . . . . . . - . . . . . . . . . o = e->error_code - compDisplays->damageError; - . . . . . . . . . switch (o) - . . . . . . . . . { --- line 1910 ---------------------------------------- --- line 1940 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . XGetErrorDatabaseText(dpy, "XlibMessage", "ResourceID", "%d", str, 128); - . . . . . . . . . fprintf(stderr, str, e->resourceid); - . . . . . . . . . fprintf(stderr, "\n"); - . . . . . . . . . - . . . . . . . . . /* abort (); */ - . . . . . . . . . #endif - . . . . . . . . . - 31 0 0 0 0 0 0 0 0 return 0; - 62 0 0 62 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int compCheckForError(Display * dpy) - 2,036 24 1 0 0 0 1,018 0 0 { - . . . . . . . . . int e; - . . . . . . . . . - 1,527 0 0 509 0 0 509 0 0 XSync(dpy, FALSE); - . . . . . . . . . - 1,018 0 0 509 31 2 509 0 0 e = errors; - 509 30 2 0 0 0 509 0 0 errors = 0; - . . . . . . . . . - 509 0 0 509 0 0 0 0 0 return e; - 1,018 0 0 1,018 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . #define PING_DELAY 5000 - . . . . . . . . . - . . . . . . . . . static Bool pingTimeout(void *closure) - 28 4 1 4 0 0 12 0 0 { - 8 0 0 4 0 0 4 0 0 CompDisplay *d = closure; - . . . . . . . . . CompScreen *s; - . . . . . . . . . CompWindow *w; - . . . . . . . . . XEvent ev; - 16 4 2 8 3 0 4 0 0 int ping = d->lastPing + 1; - . . . . . . . . . - 4 0 0 0 0 0 4 0 0 ev.type = ClientMessage; - 4 0 0 0 0 0 4 0 0 ev.xclient.window = 0; - 12 0 0 8 4 0 4 0 0 ev.xclient.message_type = d->wmProtocolsAtom; - 4 4 2 0 0 0 4 0 0 ev.xclient.format = 32; - 12 0 0 8 0 0 4 0 0 ev.xclient.data.l[0] = d->wmPingAtom; - 12 0 0 4 0 0 4 0 0 ev.xclient.data.l[1] = ping; - 4 0 0 0 0 0 4 0 0 ev.xclient.data.l[2] = 0; - 4 0 0 0 0 0 4 0 0 ev.xclient.data.l[3] = 0; - 4 4 2 0 0 0 4 0 0 ev.xclient.data.l[4] = 0; - . . . . . . . . . - 44 4 2 24 0 0 8 0 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . { - 4,619 4 2 2,769 851 0 923 0 0 for (w = s->windows; w; w = w->next) - . . . . . . . . . { - 3,676 4 2 1,838 882 54 0 0 0 if (w->attrib.map_state != IsViewable) - . . . . . . . . . continue; - . . . . . . . . . - 45 0 0 18 8 1 0 0 0 if (!(w->type & CompWindowTypeNormalMask)) - . . . . . . . . . continue; - . . . . . . . . . - 5 0 0 2 1 0 0 0 0 if (w->protocols & CompWindowProtocolPingMask) - . . . . . . . . . { - 4 1 1 2 1 0 0 0 0 if (w->transientFor) - . . . . . . . . . continue; - . . . . . . . . . - 6 0 0 4 1 0 0 0 0 if (w->lastPong < d->lastPing) - . . . . . . . . . { - . . . . . . . . . if (w->alive) - . . . . . . . . . { - . . . . . . . . . w->alive = FALSE; - . . . . . . . . . if (d->opt[COMP_DISPLAY_OPTION_DIM_DEAD].value.b) - . . . . . . . . . { - . . . . . . . . . w->paint.brightness = 0xa8a8; - . . . . . . . . . w->paint.saturation = 0; --- line 2006 ---------------------------------------- --- line 2017 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . w->closeRequests = 0; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 3 1 1 2 1 0 1 0 0 ev.xclient.window = w->id; - 3 0 0 2 0 0 1 0 0 ev.xclient.data.l[2] = w->id; - . . . . . . . . . - 9 0 0 4 0 0 1 0 0 XSendEvent(d->display, w->id, FALSE, NoEventMask, &ev); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 12 0 0 8 0 0 4 0 0 d->lastPing = ping; - . . . . . . . . . - 4 0 0 0 0 0 0 0 0 return TRUE; - 20 0 0 16 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void addScreenActions(CompDisplay * d, CompScreen * s) - 5 2 2 0 0 0 3 0 0 { - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_CLOSE_WINDOW].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, &d->opt[COMP_DISPLAY_OPTION_MAIN_MENU].value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, &d->opt[COMP_DISPLAY_OPTION_RUN_DIALOG].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_MINIMIZE_WINDOW].value. - . . . . . . . . . action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW].value. - . . . . . . . . . action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW]. - . . . . . . . . . value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_SHOW_DESKTOP].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND0].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND1].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND2].value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND3].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND4].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND5].value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND6].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND7].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND8].value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND9].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND10].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_COMMAND11].value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_SLOW_ANIMATIONS].value. - . . . . . . . . . action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_LOWER_WINDOW].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RAISE_WINDOW].value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_OPACITY_INCREASE]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_OPACITY_DECREASE]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_SCREENSHOT].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT]. - . . . . . . . . . value.action); - 4 1 1 2 0 0 1 0 0 addScreenAction(s, &d->opt[COMP_DISPLAY_OPTION_WINDOW_MENU].value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d-> - . . . . . . . . . opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d-> - . . . . . . . . . opt - . . . . . . . . . [COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ]. - . . . . . . . . . value.action); - 4 1 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d-> - . . . . . . . . . opt - . . . . . . . . . [COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED]. - . . . . . . . . . value.action); - 4 0 0 2 0 0 1 0 0 addScreenAction(s, - . . . . . . . . . &d-> - . . . . . . . . . opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_FULLSCREEN]. - . . . . . . . . . value.action); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void addScreenToDisplay(CompDisplay * display, CompScreen * s) - 5 2 2 0 0 0 3 0 0 { - . . . . . . . . . CompScreen *prev; - . . . . . . . . . - 6 0 0 3 1 0 1 0 0 for (prev = display->screens; prev && prev->next; prev = prev->next); - . . . . . . . . . - 2 0 0 1 0 0 0 0 0 if (prev) - . . . . . . . . . prev->next = s; - . . . . . . . . . else - 3 1 1 2 0 0 1 0 0 display->screens = s; - . . . . . . . . . - 3 0 0 2 0 0 1 0 0 addScreenActions(display, s); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void compDisplaySetBindingFuncs(CompDisplay * display) - 3 1 1 0 0 0 2 0 0 { - . . . . . . . . . CompOption *o; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_CLOSE_WINDOW]; - 2 1 1 1 0 0 1 1 0 o->value.action.initiate = closeWin; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAIN_MENU]; - 2 0 0 1 0 0 1 1 0 o->value.action.initiate = mainMenu; - 2 1 1 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RUN_DIALOG]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = runDialog; - 2 0 0 1 0 0 1 1 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = unmaximize; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MINIMIZE_WINDOW]; - 2 0 0 1 0 0 1 1 0 o->value.action.initiate = minimize; - 2 1 1 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW]; - 2 0 0 1 0 0 1 1 0 o->value.action.initiate = maximize; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = maximizeHorizontally; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT]; - 2 0 0 1 0 0 1 1 0 o->value.action.initiate = maximizeVertically; - 2 1 1 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SHOW_DESKTOP]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = showDesktop; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - . . . . . . . . . #define COMMAND_OPTION(num) \ - . . . . . . . . . o = &display->opt[COMP_DISPLAY_OPTION_RUN_COMMAND ## num ]; \ - . . . . . . . . . o->value.action.initiate = runCommandDispatch; \ - . . . . . . . . . o->value.action.terminate = 0; \ - . . . . . . . . . - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(0); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(1); - 8 0 0 3 0 0 3 0 0 COMMAND_OPTION(2); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(3); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(4); - 8 0 0 3 0 0 3 0 0 COMMAND_OPTION(5); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(6); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(7); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(8); - 8 1 0 3 0 0 3 0 0 COMMAND_OPTION(9); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(10); - 8 1 1 3 0 0 3 0 0 COMMAND_OPTION(11); - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SLOW_ANIMATIONS]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = toggleSlowAnimations; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_LOWER_WINDOW]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = lower; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RAISE_WINDOW]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = raise; - 2 1 1 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_OPACITY_INCREASE]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = increaseOpacity; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_OPACITY_DECREASE]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = decreaseOpacity; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SATURATION_INCREASE]; - 2 1 1 1 0 0 1 0 0 o->value.action.initiate = increaseSaturation; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_SATURATION_DECREASE]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = decreaseSaturation; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_BRIGHTNESS_INCREASE]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = increaseBrightness; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_BRIGHTNESS_DECREASE]; - 2 1 1 1 0 0 1 0 0 o->value.action.initiate = decreaseBrightness; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RUN_SCREENSHOT]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = runCommandScreenshot; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = runCommandWindowScreenshot; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_WINDOW_MENU]; - 2 1 1 1 0 0 1 0 0 o->value.action.initiate = windowMenu; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = toggleMaximized; - 2 1 1 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 3 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_FULLSCREEN]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = toggleFullscreen; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ]; - 2 1 1 1 0 0 1 0 0 o->value.action.initiate = toggleMaximizedHorizontally; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = toggleMaximizedVertically; - 2 1 1 1 0 0 1 0 0 o->value.action.terminate = 0; - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 o = &display->opt[COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED]; - 2 0 0 1 0 0 1 0 0 o->value.action.initiate = shade; - 2 0 0 1 0 0 1 0 0 o->value.action.terminate = 0; - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static CompRequestFlag *addRequestFlag(CompDisplay * d, char *request) - 18 3 1 0 0 0 12 1 0 { - 15 3 1 9 0 0 3 0 0 d->nRequestFlags++; - 33 3 1 15 0 0 6 0 0 d->requestFlags = realloc(d->requestFlags, - . . . . . . . . . d->nRequestFlags * sizeof(CompRequestFlag)); - . . . . . . . . . int i; - . . . . . . . . . - 84 3 1 51 0 0 3 0 0 for (i = 0; i < 8; i++) - 264 0 0 120 0 0 24 0 0 d->requestFlags[d->nRequestFlags - 1].data[i] = 0; - 33 0 0 15 0 0 6 0 0 d->requestFlags[d->nRequestFlags - 1].name = strdup(request); - 24 0 0 12 0 0 0 0 0 return &(d->requestFlags[d->nRequestFlags - 1]); - 12 0 0 9 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static CompRequestFlag *getRequestFlag(CompDisplay * d, char *request) - 905 181 1 0 0 0 543 99 0 { - . . . . . . . . . int i; - . . . . . . . . . - 2,541 181 1 1,707 181 1 181 0 0 for (i = 0; i < d->nRequestFlags; i++) - . . . . . . . . . { - 5,159 180 1 2,345 295 0 469 0 0 if (!strcasecmp(request, d->requestFlags[i].name)) - 1,424 0 0 534 0 0 178 0 0 return &(d->requestFlags[i]); - . . . . . . . . . } - 193 0 0 187 0 0 6 0 0 return addRequestFlag(d, request); - 362 0 0 362 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool compDisplayGetRequestFlagForPlugin(CompDisplay * d, - . . . . . . . . . char *plugin, char *request) - . . . . . . . . . { - . . . . . . . . . int idx = findActivePluginIndex(plugin); - . . . . . . . . . - . . . . . . . . . if (idx < 0) - . . . . . . . . . return False; - . . . . . . . . . CompRequestFlag *f = getRequestFlag(d, request); - . . . . . . . . . - . . . . . . . . . return (f->data[idx / 8] & (1 << (idx % 8))) ? True : False; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . Bool compDisplayGetRequestFlagForAny(CompDisplay * d, char *request) - 880 176 1 0 0 0 528 0 0 { - 704 176 1 352 0 0 352 0 0 CompRequestFlag *f = getRequestFlag(d, request); - . . . . . . . . . int i; - . . . . . . . . . - 4,928 0 0 2,992 0 0 176 0 0 for (i = 0; i < 8; i++) - 8,448 0 0 4,224 0 0 0 0 0 if (f->data[i]) - . . . . . . . . . return True; - 352 176 0 176 0 0 176 0 0 return False; - 352 0 0 352 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void compDisplaySetRequestFlagForPlugin(CompDisplay * d, - . . . . . . . . . char *plugin, char *request) - 18 3 1 0 0 0 12 0 0 { - 9 0 0 3 0 0 6 0 0 int idx = findActivePluginIndex(plugin); - . . . . . . . . . - 6 0 0 3 0 0 0 0 0 if (idx < 0) - . . . . . . . . . return; - 12 0 0 6 0 0 6 0 0 CompRequestFlag *f = getRequestFlag(d, request); - . . . . . . . . . - 78 6 2 15 0 0 3 0 0 f->data[idx / 8] |= (1 << (idx % 8)); - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void compDisplayClearRequestFlagForPlugin(CompDisplay * d, - . . . . . . . . . char *plugin, char *request) - 12 2 0 0 0 0 8 0 0 { - 6 0 0 2 0 0 4 0 0 int idx = findActivePluginIndex(plugin); - . . . . . . . . . - 4 0 0 2 0 0 0 0 0 if (idx < 0) - . . . . . . . . . return; - 8 0 0 4 0 0 4 0 0 CompRequestFlag *f = getRequestFlag(d, request); - . . . . . . . . . - 54 4 2 10 0 0 2 0 0 f->data[idx / 8] &= ~(1 << (idx % 8)); - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void releaseDisplay(void) - . . . . . . . . . { - . . . . . . . . . finiPlugins(&compDisplay); - . . . . . . . . . - . . . . . . . . . while (compDisplay.screens) - . . . . . . . . . releaseScreen(compDisplay.screens); - . . . . . . . . . --- line 2346 ---------------------------------------- --- line 2349 ---------------------------------------- - . . . . . . . . . if (compDisplay.display) - . . . . . . . . . XCloseDisplay(compDisplay.display); - . . . . . . . . . - . . . . . . . . . if (compDisplay.privates) - . . . . . . . . . free(compDisplay.privates); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . Bool addDisplay(char *name, int screenNum, char **plugin, int nPlugin) - 10 2 2 1 0 0 6 0 0 { - . . . . . . . . . CompDisplay *d; - . . . . . . . . . Display *dpy; - . . . . . . . . . Window focus; - . . . . . . . . . int revertTo, i; - . . . . . . . . . int compositeMajor, compositeMinor; - . . . . . . . . . int xkbOpcode; - . . . . . . . . . - 1 0 0 0 0 0 1 0 0 d = &compDisplay; - . . . . . . . . . - 2 0 0 1 0 0 1 1 1 d->nRequestFlags = 0; - 2 1 1 1 0 0 1 0 0 d->requestFlags = 0; - . . . . . . . . . - 6 0 0 4 0 0 2 1 1 d->pointerX = d->lastPointerX = 0; - 6 1 1 4 0 0 2 0 0 d->pointerY = d->lastPointerY = 0; - . . . . . . . . . - 2 0 0 1 0 0 1 1 1 d->focusStealingLevel = FSP_NONE; - . . . . . . . . . - 8 1 1 4 0 0 4 0 0 IPCS_INITOBJ(d); - . . . . . . . . . - 3 1 1 1 1 1 0 0 0 if (displayPrivateLen) - . . . . . . . . . { - . . . . . . . . . d->privates = malloc(displayPrivateLen * sizeof(CompPrivate)); - . . . . . . . . . if (!d->privates) - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . else - 2 1 1 1 0 0 1 0 0 d->privates = 0; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 d->screenPrivateIndices = 0; - 2 0 0 1 0 0 1 0 0 d->screenPrivateLen = 0; - . . . . . . . . . - 2 1 1 1 0 0 1 1 1 d->modMap = 0; - . . . . . . . . . - 25 1 1 15 0 0 1 0 0 for (i = 0; i < CompModNum; i++) - 28 0 0 14 0 0 7 0 0 d->modMask[i] = CompNoMask; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 d->ignoredModMask = LockMask; - . . . . . . . . . - 2 0 0 1 0 0 1 1 1 d->plugin.list.type = CompOptionTypeString; - 2 0 0 1 0 0 1 0 0 d->plugin.list.nValue = 0; - 2 1 1 1 0 0 1 0 0 d->plugin.list.value = 0; - . . . . . . . . . - 2 0 0 1 0 0 1 1 1 d->textureFilter = GL_LINEAR; - 2 0 0 1 0 0 1 1 1 d->below = None; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 d->activeWindow = 0; - . . . . . . . . . - 2 1 1 1 0 0 1 1 1 d->autoRaiseHandle = 0; - 2 0 0 1 0 0 1 1 1 d->autoRaiseWindow = None; - . . . . . . . . . - 6 2 1 3 0 0 3 2 0 d->display = dpy = XOpenDisplay(name); - 4 0 0 2 0 0 0 0 0 if (!d->display) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: Couldn't open display %s\n"), - . . . . . . . . . programName, XDisplayName(name)); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 4 1 1 3 1 0 1 0 0 compDisplayInitOptions(d, plugin, nPlugin); - 2 0 0 1 0 0 1 0 0 compDisplaySetBindingFuncs(d); - . . . . . . . . . - 8 1 1 3 1 0 1 0 0 snprintf(d->displayString, 255, "DISPLAY=%s", DisplayString(dpy)); - . . . . . . . . . - . . . . . . . . . #ifdef DEBUG - . . . . . . . . . XSynchronize(dpy, TRUE); - . . . . . . . . . #endif - . . . . . . . . . - 2 0 0 0 0 0 1 0 0 XSetErrorHandler(errorHandler); - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 updateModifierMappings(d); - . . . . . . . . . - 4 1 1 1 1 1 2 1 1 d->context= beryl_settings_context_new(); - 3 0 0 2 0 0 1 0 0 beryl_settings_context_read(d->context); - . . . . . . . . . - 2 1 0 1 1 0 1 1 1 d->setDisplayOption = setDisplayOption; - 2 1 1 1 0 0 1 0 0 d->setDisplayOptionForPlugin = setDisplayOptionForPlugin; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 d->initPluginForDisplay = initPluginForDisplay; - 2 0 0 1 0 0 1 0 0 d->finiPluginForDisplay = finiPluginForDisplay; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 d->handleEvent = handleEvent; - 2 1 1 1 0 0 1 0 0 d->handleBerylEvent = handleBerylEvent; - . . . . . . . . . - 2 0 0 1 0 0 1 1 1 d->fileToImage = fileToImage; - 2 0 0 1 0 0 1 0 0 d->imageToFile = imageToFile; - . . . . . . . . . - 7 1 1 2 1 0 2 1 1 d->reloadSettingsAtom=XInternAtom(dpy,"_BERYL_SETTINGS_RELOAD",0); - . . . . . . . . . - 7 1 1 2 0 0 2 1 1 d->supportedAtom = XInternAtom(dpy, "_NET_SUPPORTED", 0); - 7 0 0 2 0 0 2 0 0 d->supportingWmCheckAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->utf8StringAtom = XInternAtom(dpy, "UTF8_STRING", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->wmNameAtom = XInternAtom(dpy, "_NET_WM_NAME", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->winTypeAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", 0); - 7 1 1 2 0 0 2 0 0 d->winTypeDesktopAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DESKTOP", 0); - 7 0 0 2 0 0 2 0 0 d->winTypeDockAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", 0); - 7 1 1 2 0 0 2 1 1 d->winTypeToolbarAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_TOOLBAR", 0); - 7 0 0 2 0 0 2 0 0 d->winTypeMenuAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_MENU", 0); - 7 1 1 2 0 0 2 0 0 d->winTypeUtilAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_UTILITY", 0); - 7 1 1 2 0 0 2 0 0 d->winTypeSplashAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_SPLASH", 0); - 7 0 0 2 0 0 2 0 0 d->winTypeDialogAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", 0); - 7 1 1 2 0 0 2 0 0 d->winTypeNormalAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_NORMAL", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->winTypeDropdownMenuAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", 0); - 7 1 1 2 0 0 2 0 0 d->winTypePopupMenuAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_POPUP_MENU", 0); - 7 1 1 2 0 0 2 1 1 d->winTypeTooltipAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_TOOLTIP", 0); - 7 0 0 2 0 0 2 0 0 d->winTypeNotificationAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_NOTIFICATION", 0); - 7 1 1 2 0 0 2 0 0 d->winTypeComboAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_COMBO", 0); - 7 0 0 2 0 0 2 0 0 d->winTypeDndAtom = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DND", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->winOpacityAtom = XInternAtom(dpy, "_NET_WM_WINDOW_OPACITY", 0); - 7 1 1 2 0 0 2 0 0 d->winBrightnessAtom = XInternAtom(dpy, "_NET_WM_WINDOW_BRIGHTNESS", 0); - 7 0 0 2 0 0 2 0 0 d->winSaturationAtom = XInternAtom(dpy, "_NET_WM_WINDOW_SATURATION", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->winActiveAtom = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 1 1 d->winDesktopAtom = XInternAtom(dpy, "_NET_WM_DESKTOP", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->workareaAtom = XInternAtom(dpy, "_NET_WORKAREA", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->desktopViewportAtom = XInternAtom(dpy, "_NET_DESKTOP_VIEWPORT", 0); - 7 0 0 2 0 0 2 0 0 d->desktopGeometryAtom = XInternAtom(dpy, "_NET_DESKTOP_GEOMETRY", 0); - 7 1 1 2 0 0 2 0 0 d->currentDesktopAtom = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", 0); - 7 1 1 2 0 0 2 0 0 d->numberOfDesktopsAtom = XInternAtom(dpy, "_NET_NUMBER_OF_DESKTOPS", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->winStateAtom = XInternAtom(dpy, "_NET_WM_STATE", 0); - 7 2 1 2 0 0 2 0 0 d->winStateModalAtom = XInternAtom(dpy, "_NET_WM_STATE_MODAL", 0); - 7 0 0 2 0 0 2 1 1 d->winStateStickyAtom = XInternAtom(dpy, "_NET_WM_STATE_STICKY", 0); - 7 1 1 2 0 0 2 0 0 d->winStateMaximizedVertAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_MAXIMIZED_VERT", 0); - 7 1 1 2 0 0 2 0 0 d->winStateMaximizedHorzAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_MAXIMIZED_HORZ", 0); - 7 0 0 2 0 0 2 0 0 d->winStateShadedAtom = XInternAtom(dpy, "_NET_WM_STATE_SHADED", 0); - 7 1 1 2 0 0 2 0 0 d->winStateSkipTaskbarAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_SKIP_TASKBAR", 0); - 7 0 0 2 0 0 2 0 0 d->winStateSkipPagerAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_SKIP_PAGER", 0); - 7 1 1 2 0 0 2 0 0 d->winStateHiddenAtom = XInternAtom(dpy, "_NET_WM_STATE_HIDDEN", 0); - 7 1 1 2 0 0 2 0 0 d->winStateFullscreenAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", 0); - 7 0 0 2 0 0 2 1 1 d->winStateAboveAtom = XInternAtom(dpy, "_NET_WM_STATE_ABOVE", 0); - 7 1 1 2 0 0 2 0 0 d->winStateBelowAtom = XInternAtom(dpy, "_NET_WM_STATE_BELOW", 0); - 7 1 1 2 0 0 2 0 0 d->winStateDemandsAttentionAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_DEMANDS_ATTENTION", 0); - 7 0 0 2 0 0 2 0 0 d->winStateDisplayModalAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_STATE_DISPLAY_MODAL", 0); - 7 1 1 2 0 0 2 0 0 d->winStateNoFocusAtom = XInternAtom(dpy, "_COMPIZ_WM_STATE_NO_FOCUS", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->winActionMoveAtom = XInternAtom(dpy, "_NET_WM_ACTION_MOVE", 0); - 7 1 1 2 0 0 2 0 0 d->winActionResizeAtom = XInternAtom(dpy, "_NET_WM_ACTION_RESIZE", 0); - 7 1 1 2 0 0 2 0 0 d->winActionStickAtom = XInternAtom(dpy, "_NET_WM_ACTION_STICK", 0); - 7 0 0 2 0 0 2 1 1 d->winActionMinimizeAtom = XInternAtom(dpy, "_NET_WM_ACTION_MINIMIZE", 0); - 7 1 1 2 0 0 2 0 0 d->winActionMaximizeHorzAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_ACTION_MAXIMIZE_HORZ", 0); - 7 0 0 2 0 0 2 0 0 d->winActionMaximizeVertAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_ACTION_MAXIMIZE_VERT", 0); - 7 1 1 2 0 0 2 0 0 d->winActionFullscreenAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_ACTION_FULLSCREEN", 0); - 7 1 1 2 0 0 2 0 0 d->winActionCloseAtom = XInternAtom(dpy, "_NET_WM_ACTION_CLOSE", 0); - 7 0 0 2 0 0 2 0 0 d->winActionShadeAtom = XInternAtom(dpy, "_NET_WM_ACTION_SHADE", 0); - 7 1 1 2 0 0 2 0 0 d->winActionChangeDesktopAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_ACTION_CHANGE_DESKTOP", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->wmAllowedActionsAtom = XInternAtom(dpy, "_NET_WM_ALLOWED_ACTIONS", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 1 1 d->wmStrutAtom = XInternAtom(dpy, "_NET_WM_STRUT", 0); - 7 1 1 2 0 0 2 0 0 d->wmStrutPartialAtom = XInternAtom(dpy, "_NET_WM_STRUT_PARTIAL", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->wmUserTimeAtom = XInternAtom(dpy, "_NET_WM_USER_TIME", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->wmIconAtom = XInternAtom(dpy, "_NET_WM_ICON", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->clientListAtom = XInternAtom(dpy, "_NET_CLIENT_LIST", 0); - 7 1 1 2 0 0 2 0 0 d->clientListStackingAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_CLIENT_LIST_STACKING", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->frameExtentsAtom = XInternAtom(dpy, "_NET_FRAME_EXTENTS", 0); - 7 0 0 2 0 0 2 0 0 d->frameWindowAtom = XInternAtom(dpy, "_NET_FRAME_WINDOW", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 1 1 d->wmStateAtom = XInternAtom(dpy, "WM_STATE", 0); - 7 1 1 2 0 0 2 0 0 d->wmChangeStateAtom = XInternAtom(dpy, "WM_CHANGE_STATE", 0); - 7 0 0 2 0 0 2 0 0 d->wmProtocolsAtom = XInternAtom(dpy, "WM_PROTOCOLS", 0); - 7 1 1 2 0 0 2 0 0 d->wmClientLeaderAtom = XInternAtom(dpy, "WM_CLIENT_LEADER", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->wmDeleteWindowAtom = XInternAtom(dpy, "WM_DELETE_WINDOW", 0); - 7 1 1 2 0 0 2 0 0 d->wmTakeFocusAtom = XInternAtom(dpy, "WM_TAKE_FOCUS", 0); - 7 1 1 2 0 0 2 0 0 d->wmPingAtom = XInternAtom(dpy, "_NET_WM_PING", 0); - 7 0 0 2 0 0 2 0 0 d->wmSyncRequestAtom = XInternAtom(dpy, "_NET_WM_SYNC_REQUEST", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 1 1 d->wmSyncRequestCounterAtom = - . . . . . . . . . XInternAtom(dpy, "_NET_WM_SYNC_REQUEST_COUNTER", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->closeWindowAtom = XInternAtom(dpy, "_NET_CLOSE_WINDOW", 0); - 7 1 1 2 0 0 2 0 0 d->wmMoveResizeAtom = XInternAtom(dpy, "_NET_WM_MOVERESIZE", 0); - 7 1 1 2 0 0 2 0 0 d->moveResizeWindowAtom = XInternAtom(dpy, "_NET_MOVERESIZE_WINDOW", 0); - 7 0 0 2 0 0 2 0 0 d->restackWindowAtom = XInternAtom(dpy, "_NET_RESTACK_WINDOW", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->showingDesktopAtom = XInternAtom(dpy, "_NET_SHOWING_DESKTOP", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->xBackgroundAtom[0] = XInternAtom(dpy, "_XSETROOT_ID", 0); - 7 1 1 2 0 0 2 0 0 d->xBackgroundAtom[1] = XInternAtom(dpy, "_XROOTPMAP_ID", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 1 1 d->toolkitActionAtom = XInternAtom(dpy, "_COMPIZ_TOOLKIT_ACTION", 0); - 7 0 0 2 0 0 2 0 0 d->toolkitActionMainMenuAtom = - . . . . . . . . . XInternAtom(dpy, "_COMPIZ_TOOLKIT_ACTION_MAIN_MENU", 0); - 7 1 1 2 0 0 2 0 0 d->toolkitActionRunDialogAtom = - . . . . . . . . . XInternAtom(dpy, "_COMPIZ_TOOLKIT_ACTION_RUN_DIALOG", 0); - 7 0 0 2 0 0 2 0 0 d->toolkitActionWindowMenuAtom = - . . . . . . . . . XInternAtom(dpy, "_COMPIZ_TOOLKIT_ACTION_WINDOW_MENU", 0); - 7 1 1 2 0 0 2 0 0 d->toolkitActionForceQuitDialogAtom = - . . . . . . . . . XInternAtom(dpy, "_COMPIZ_TOOLKIT_ACTION_FORCE_QUIT_DIALOG", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->mwmHintsAtom = XInternAtom(dpy, "_MOTIF_WM_HINTS", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->xdndAwareAtom = XInternAtom(dpy, "XdndAware", 0); - 7 1 1 2 0 0 2 0 0 d->xdndEnterAtom = XInternAtom(dpy, "XdndEnter", 0); - 7 1 1 2 0 0 2 1 1 d->xdndLeaveAtom = XInternAtom(dpy, "XdndLeave", 0); - 7 0 0 2 0 0 2 0 0 d->xdndPositionAtom = XInternAtom(dpy, "XdndPosition", 0); - 7 1 1 2 0 0 2 0 0 d->xdndStatusAtom = XInternAtom(dpy, "XdndStatus", 0); - 7 0 0 2 0 0 2 0 0 d->xdndDropAtom = XInternAtom(dpy, "XdndDrop", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->managerAtom = XInternAtom(dpy, "MANAGER", 0); - 7 1 1 2 0 0 2 0 0 d->targetsAtom = XInternAtom(dpy, "TARGETS", 0); - 7 0 0 2 0 0 2 0 0 d->multipleAtom = XInternAtom(dpy, "MULTIPLE", 0); - 7 1 1 2 0 0 2 0 0 d->timestampAtom = XInternAtom(dpy, "TIMESTAMP", 0); - 7 0 0 2 0 0 2 1 1 d->versionAtom = XInternAtom(dpy, "VERSION", 0); - 7 1 1 2 0 0 2 0 0 d->atomPairAtom = XInternAtom(dpy, "ATOM_PAIR", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->startupIdAtom = XInternAtom(dpy, "_NET_STARTUP_ID", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->vertRestoreGeometryAtom = - . . . . . . . . . XInternAtom(dpy, "_XNET_VERT_RESTORE_GEOMETRY", 0); - 7 1 1 2 0 0 2 0 0 d->horzRestoreGeometryAtom = - . . . . . . . . . XInternAtom(dpy, "_XNET_HORZ_RESTORE_GEOMETRY", 0); - . . . . . . . . . - 7 0 0 2 0 0 2 0 0 d->changeFrameWindowAtom = - . . . . . . . . . XInternAtom(dpy, "_BERYL_CHANGE_FRAME_WINDOW", 0); - . . . . . . . . . - 7 1 1 2 0 0 2 0 0 d->snDisplay = sn_display_new(dpy, NULL, NULL); - 4 0 0 2 0 0 0 0 0 if (!d->snDisplay) - . . . . . . . . . return FALSE; - . . . . . . . . . - 2 1 1 1 0 0 1 0 0 d->lastPing = 1; - . . . . . . . . . - 12 1 1 4 0 0 1 0 0 if (!XQueryExtension(dpy, - . . . . . . . . . COMPOSITE_NAME, - . . . . . . . . . &d->compositeOpcode, - . . . . . . . . . &d->compositeEvent, &d->compositeError)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: No composite extension\n"), programName); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 XCompositeQueryVersion(dpy, &compositeMajor, &compositeMinor); - 6 0 0 2 0 0 0 0 0 if (compositeMajor == 0 && compositeMinor < 2) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: Old composite extension\n"), programName); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 8 1 1 3 1 0 1 0 0 if (!XDamageQueryExtension(dpy, &d->damageEvent, &d->damageError)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: No damage extension\n"), programName); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 8 2 2 3 1 0 1 0 0 if (!XRRQueryExtension(dpy, &d->randrEvent, &d->randrError)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: No RandR extension\n"), programName); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 8 1 1 3 1 0 1 0 0 if (!XSyncQueryExtension(dpy, &d->syncEvent, &d->syncError)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: No sync extension\n"), programName); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 9 1 1 4 1 0 2 0 0 d->shapeExtension = XShapeQueryExtension(dpy, - . . . . . . . . . &d->shapeEvent, &d->shapeError); - . . . . . . . . . - 12 1 1 4 0 0 2 0 0 d->xkbExtension = XkbQueryExtension(dpy, - . . . . . . . . . &xkbOpcode, - . . . . . . . . . &d->xkbEvent, - . . . . . . . . . &d->xkbError, NULL, NULL); - 4 1 1 2 0 0 0 0 0 if (d->xkbExtension) - . . . . . . . . . { - 6 0 0 1 0 0 1 0 0 XkbSelectEvents(dpy, - . . . . . . . . . XkbUseCoreKbd, - . . . . . . . . . XkbBellNotifyMask | XkbStateNotifyMask, - . . . . . . . . . XkbAllEventsMask); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: No XKB extension\n"), programName); - . . . . . . . . . - . . . . . . . . . d->xkbEvent = d->xkbError = -1; - . . . . . . . . . } - . . . . . . . . . - 9 2 2 4 1 0 2 1 0 d->xineramaExtension = XineramaQueryExtension(dpy, - . . . . . . . . . &d->xineramaEvent, - . . . . . . . . . &d->xineramaError); - 4 0 0 2 0 0 0 0 0 if (d->xineramaExtension) - . . . . . . . . . { - . . . . . . . . . d->screenInfo = XineramaQueryScreens(dpy, &d->nScreenInfo); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 2 1 1 1 0 0 1 0 0 d->screenInfo = NULL; - 2 0 0 1 0 0 1 0 0 d->nScreenInfo = 0; - . . . . . . . . . } - . . . . . . . . . - 2 0 0 1 0 0 1 1 1 compDisplays = d; - . . . . . . . . . - 8 1 1 2 0 0 3 1 1 d->escapeKeyCode = XKeysymToKeycode(dpy, XStringToKeysym("Escape")); - 8 1 1 2 0 0 3 0 0 d->returnKeyCode = XKeysymToKeycode(dpy, XStringToKeysym("Return")); - . . . . . . . . . - . . . . . . . . . { - . . . . . . . . . XSetWindowAttributes attr; - . . . . . . . . . Atom atom; - . . . . . . . . . - 1 0 0 0 0 0 1 1 1 attr.override_redirect = TRUE; - 20 2 2 3 0 0 9 2 2 d->glIncludeInferiorsOwner = - . . . . . . . . . XCreateWindow(dpy, XRootWindow(dpy, 0), - . . . . . . . . . -100, -100, 1, 1, 0, - . . . . . . . . . CopyFromParent, CopyFromParent, - . . . . . . . . . CopyFromParent, CWOverrideRedirect, &attr); - . . . . . . . . . - 5 0 0 1 0 0 2 0 0 atom = XInternAtom(dpy, "_COMPIZ_GL_INCLUDE_INFERIORS", False); - 6 1 1 4 0 0 1 0 0 XSetSelectionOwner(dpy, atom, d->glIncludeInferiorsOwner, - . . . . . . . . . CurrentTime); - . . . . . . . . . } - . . . . . . . . . - 4 0 0 3 0 0 0 0 0 if (screenNum >= ScreenCount(dpy)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Screen %d on display \"%s\" does not " - . . . . . . . . . "exist; defaulting to manage all existing screens.\n"), - . . . . . . . . . programName, screenNum, DisplayString(dpy)); - . . . . . . . . . screenNum = -1; - . . . . . . . . . } - 4 1 1 2 0 0 1 1 0 for (i = screenNum < 0 ? 0 : screenNum; - 20 3 3 11 1 0 2 0 0 i < (screenNum < 0 ? ScreenCount(dpy) : screenNum + 1); i++) - . . . . . . . . . { - 2 1 1 0 0 0 2 0 0 Window newWmSnOwner = None, newCmSnOwner = None; - 2 0 0 0 0 0 2 1 0 Atom wmSnAtom = 0, cmSnAtom = 0; - 1 0 0 0 0 0 1 0 0 Time wmSnTimestamp = 0; - . . . . . . . . . XEvent event; - . . . . . . . . . XSetWindowAttributes attr; - . . . . . . . . . Window currentWmSnOwner, currentCmSnOwner; - . . . . . . . . . char buf[128]; - . . . . . . . . . Window rootDummy, childDummy; - . . . . . . . . . unsigned int uDummy; - . . . . . . . . . int x, y, dummy; - . . . . . . . . . - 5 1 1 1 0 0 1 0 0 sprintf(buf, "WM_S%d", i); - 5 0 0 1 0 0 2 0 0 wmSnAtom = XInternAtom(dpy, buf, 0); - . . . . . . . . . - 4 1 1 2 0 0 2 0 0 currentWmSnOwner = XGetSelectionOwner(dpy, wmSnAtom); - . . . . . . . . . - 2 0 0 1 0 0 0 0 0 if (currentWmSnOwner != None) - . . . . . . . . . { - 3 0 0 1 1 1 0 0 0 if (!replaceCurrentWm) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: Screen %d on display \"%s\" already " - . . . . . . . . . "has a window manager; try using the " - . . . . . . . . . "--replace option to replace the current " - . . . . . . . . . "window manager.\n"), programName, - . . . . . . . . . i, DisplayString(dpy)); - . . . . . . . . . - . . . . . . . . . continue; - . . . . . . . . . } - . . . . . . . . . - 4 1 1 2 0 0 1 0 0 XSelectInput(dpy, currentWmSnOwner, StructureNotifyMask); - . . . . . . . . . } - . . . . . . . . . - 5 1 1 1 0 0 1 0 0 sprintf(buf, "_NET_WM_CM_S%d", i); - 5 0 0 1 0 0 2 0 0 cmSnAtom = XInternAtom(dpy, buf, 0); - . . . . . . . . . - 4 1 1 2 0 0 2 0 0 currentCmSnOwner = XGetSelectionOwner(dpy, cmSnAtom); - . . . . . . . . . - 2 0 0 1 0 0 0 0 0 if (currentCmSnOwner != None) - . . . . . . . . . { - 3 0 0 1 0 0 0 0 0 if (!replaceCurrentWm) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: Screen %d on display \"%s\" already " - . . . . . . . . . "has a compositing manager; try using the " - . . . . . . . . . "--replace option to replace the current " - . . . . . . . . . "compositing manager .\n"), - . . . . . . . . . programName, i, DisplayString(dpy)); - . . . . . . . . . - . . . . . . . . . continue; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 1 1 1 0 0 0 1 0 0 attr.override_redirect = TRUE; - 1 0 0 0 0 0 1 0 0 attr.event_mask = PropertyChangeMask; - . . . . . . . . . - 20 2 2 4 0 0 10 1 0 newCmSnOwner = newWmSnOwner = - . . . . . . . . . XCreateWindow(dpy, XRootWindow(dpy, i), - . . . . . . . . . -100, -100, 1, 1, 0, - . . . . . . . . . CopyFromParent, CopyFromParent, - . . . . . . . . . CopyFromParent, - . . . . . . . . . CWOverrideRedirect | CWEventMask, &attr); - . . . . . . . . . - 13 1 1 6 1 0 3 0 0 XChangeProperty(dpy, - . . . . . . . . . newWmSnOwner, - . . . . . . . . . d->wmNameAtom, - . . . . . . . . . d->utf8StringAtom, 8, - . . . . . . . . . PropModeReplace, - . . . . . . . . . (unsigned char *)WMNAME, strlen(WMNAME)); - . . . . . . . . . - 5 1 1 2 0 0 1 0 0 XWindowEvent(dpy, newWmSnOwner, PropertyChangeMask, &event); - . . . . . . . . . - 2 0 0 1 0 0 1 1 0 wmSnTimestamp = event.xproperty.time; - . . . . . . . . . - 5 1 1 4 0 0 1 0 0 XSetSelectionOwner(dpy, wmSnAtom, newWmSnOwner, wmSnTimestamp); - . . . . . . . . . - 5 0 0 3 0 0 1 0 0 if (XGetSelectionOwner(dpy, wmSnAtom) != newWmSnOwner) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Could not acquire window manager " - . . . . . . . . . "selection on screen %d display \"%s\"\n"), - . . . . . . . . . programName, i, DisplayString(dpy)); - . . . . . . . . . - . . . . . . . . . XDestroyWindow(dpy, newWmSnOwner); - . . . . . . . . . - . . . . . . . . . continue; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* Send client message indicating that we are now the WM */ - 1 1 1 0 0 0 1 0 0 event.xclient.type = ClientMessage; - 4 1 1 2 0 0 2 0 0 event.xclient.window = XRootWindow(dpy, i); - 3 0 0 2 1 0 1 0 0 event.xclient.message_type = d->managerAtom; - 1 0 0 0 0 0 1 0 0 event.xclient.format = 32; - 2 0 0 1 0 0 1 0 0 event.xclient.data.l[0] = wmSnTimestamp; - 2 1 1 1 0 0 1 0 0 event.xclient.data.l[1] = wmSnAtom; - 1 0 0 0 0 0 1 0 0 event.xclient.data.l[2] = 0; - 1 0 0 0 0 0 1 0 0 event.xclient.data.l[3] = 0; - 1 0 0 0 0 0 1 0 0 event.xclient.data.l[4] = 0; - . . . . . . . . . - 10 1 1 3 0 0 2 0 0 XSendEvent(dpy, XRootWindow(dpy, i), FALSE, - . . . . . . . . . StructureNotifyMask, &event); - . . . . . . . . . - . . . . . . . . . /* Wait for old window manager to go away */ - 2 0 0 1 0 0 0 0 0 if (currentWmSnOwner != None) - . . . . . . . . . { - . . . . . . . . . do - . . . . . . . . . { - 5 1 1 2 0 0 1 0 0 XWindowEvent(dpy, currentWmSnOwner, - . . . . . . . . . StructureNotifyMask, &event); - . . . . . . . . . } - 3 0 0 1 0 0 0 0 0 while (event.type != DestroyNotify); - . . . . . . . . . } - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 compCheckForError(dpy); - . . . . . . . . . - 7 1 1 3 0 0 2 0 0 XCompositeRedirectSubwindows(dpy, XRootWindow(dpy, i), - . . . . . . . . . CompositeRedirectManual); - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 if (compCheckForError(dpy)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: Another composite manager is already " - . . . . . . . . . "running on screen: %d\n"), programName, i); - . . . . . . . . . - . . . . . . . . . continue; - . . . . . . . . . } - . . . . . . . . . - 5 1 1 4 0 0 1 0 0 XSetSelectionOwner(dpy, cmSnAtom, newCmSnOwner, wmSnTimestamp); - . . . . . . . . . - 5 0 0 3 0 0 1 0 0 if (XGetSelectionOwner(dpy, cmSnAtom) != newCmSnOwner) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: Could not acquire compositing manager " - . . . . . . . . . "selection on screen %d display \"%s\"\n"), - . . . . . . . . . programName, i, DisplayString(dpy)); - . . . . . . . . . - . . . . . . . . . continue; - . . . . . . . . . } - . . . . . . . . . - 2 2 2 1 0 0 1 0 0 XGrabServer(dpy); - . . . . . . . . . - 7 0 0 3 0 0 2 0 0 XSelectInput(dpy, XRootWindow(dpy, i), - . . . . . . . . . SubstructureRedirectMask | - . . . . . . . . . SubstructureNotifyMask | - . . . . . . . . . StructureNotifyMask | - . . . . . . . . . PropertyChangeMask | - . . . . . . . . . LeaveWindowMask | - . . . . . . . . . EnterWindowMask | - . . . . . . . . . KeyPressMask | - . . . . . . . . . KeyReleaseMask | - . . . . . . . . . ButtonPressMask | - . . . . . . . . . ButtonReleaseMask | FocusChangeMask | ExposureMask); - . . . . . . . . . - 4 0 0 1 0 0 1 0 0 if (compCheckForError(dpy)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: Another window manager is " - . . . . . . . . . "already running on screen: %d\n"), - . . . . . . . . . programName, i); - . . . . . . . . . - . . . . . . . . . XUngrabServer(dpy); - . . . . . . . . . continue; - . . . . . . . . . } - . . . . . . . . . - 9 3 2 5 0 0 1 0 0 if (!addScreen(d, i, newWmSnOwner, wmSnAtom, wmSnTimestamp)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Failed to manage screen: %d\n"), programName, i); - . . . . . . . . . } - . . . . . . . . . - 23 2 2 3 2 0 5 0 0 if (XQueryPointer(dpy, XRootWindow(dpy, i), - . . . . . . . . . &rootDummy, &childDummy, - . . . . . . . . . &x, &y, &dummy, &dummy, &uDummy)) - . . . . . . . . . { - 7 1 1 5 0 0 2 1 1 d->lastPointerX = d->pointerX = x; - 7 1 0 5 0 0 2 0 0 d->lastPointerY = d->pointerY = y; - . . . . . . . . . } - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 XUngrabServer(dpy); - . . . . . . . . . } - . . . . . . . . . - 4 0 0 2 1 0 0 0 0 if (!d->screens) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _ - . . . . . . . . . ("%s: No manageable screens found on display %s\n"), - . . . . . . . . . programName, XDisplayName(name)); - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 4 1 1 3 1 1 1 0 0 setAudibleBell(d, d->opt[COMP_DISPLAY_OPTION_AUDIBLE_BELL].value.b); - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 XGetInputFocus(dpy, &focus, &revertTo); - . . . . . . . . . - 7 0 0 2 0 0 0 0 0 if (focus == None || focus == PointerRoot) - . . . . . . . . . { - 2 0 0 1 0 0 1 0 0 focusDefaultWindow(d); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . CompWindow *w; - . . . . . . . . . - . . . . . . . . . w = findWindowAtDisplay(d, focus); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . moveInputFocusToWindow(w); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . focusDefaultWindow(d); - . . . . . . . . . } - . . . . . . . . . - 7 1 1 2 1 0 2 1 0 d->pingHandle = compAddTimeout(PING_DELAY, pingTimeout, d); - . . . . . . . . . - 3 0 0 1 1 0 0 0 0 if (!noShm) - . . . . . . . . . { - 7 1 1 1 0 0 2 1 0 d->shmInfo.shmid = shmget(IPC_PRIVATE, SHM_SIZE, IPC_CREAT | 0777); - 4 0 0 2 0 0 0 0 0 if (d->shmInfo.shmid < 0) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, _("%s: Error int SHM creation\n"), programName); - . . . . . . . . . noShm = TRUE; - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . - 8 2 2 3 0 0 2 1 0 d->shmInfo.shmaddr = (char *)shmat(d->shmInfo.shmid, 0, 0); - 4 0 0 2 0 0 0 0 0 if (d->shmInfo.shmaddr == ((char *)-1)) - . . . . . . . . . { - . . . . . . . . . shmctl(d->shmInfo.shmid, IPC_RMID, 0); - . . . . . . . . . fprintf(stderr, _("%s: Error int SHM creation\n"), programName); - . . . . . . . . . noShm = TRUE; - . . . . . . . . . return TRUE; - . . . . . . . . . } - 2 1 1 1 0 0 1 1 0 d->shmInfo.readOnly = False; - . . . . . . . . . - 4 1 1 2 0 0 1 0 0 XShmAttach(dpy, &d->shmInfo); - . . . . . . . . . } - . . . . . . . . . CompOption *option; - . . . . . . . . . int nOption; - 1 0 0 0 0 0 1 1 0 nOption=0; - 4 0 0 1 0 0 2 0 0 option = compGetDisplayOptions(d, &nOption); - 379 65 3 126 62 0 63 0 0 while (nOption--) - . . . . . . . . . { - . . . . . . . . . CompOptionValue value; - 1,054 123 1 496 108 63 434 63 0 memcpy ( &value, &option->value, sizeof(CompOptionValue)); - 682 0 0 248 91 18 62 0 0 if (beryl_settings_context_comp_get_option_value(d->context,NULL,option->name,FALSE,&value)) - . . . . . . . . . { - 434 0 0 310 63 1 62 0 0 d->setDisplayOption(d,option->name,&value); - . . . . . . . . . } - 62 62 0 62 62 0 0 0 0 option++; - . . . . . . . . . } - 2 0 0 1 0 0 1 1 0 return TRUE; - 5 0 0 4 2 1 0 0 0 } - . . . . . . . . . - . . . . . . . . . Time getCurrentTimeFromDisplay(CompDisplay * d) - . . . . . . . . . { - . . . . . . . . . XEvent event; - . . . . . . . . . - . . . . . . . . . XChangeProperty(d->display, d->screens->grabWindow, - . . . . . . . . . XA_PRIMARY, XA_STRING, 8, PropModeAppend, NULL, 0); - . . . . . . . . . XWindowEvent(d->display, d->screens->grabWindow, - . . . . . . . . . PropertyChangeMask, &event); - . . . . . . . . . - . . . . . . . . . return event.xproperty.time; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void focusDefaultWindow(CompDisplay * d) - 20 4 2 0 0 0 10 0 0 { - . . . . . . . . . CompScreen *s; - . . . . . . . . . CompWindow *w; - 5 0 0 0 0 0 5 0 0 CompWindow *focus = NULL; - . . . . . . . . . - 55 8 4 30 5 0 10 0 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . { - 5,780 4 2 3,465 976 0 1,155 0 0 for (w = s->reverseWindows; w; w = w->prev) - . . . . . . . . . { -11,450 0 0 4,580 1,121 100 0 0 0 if ((w->type & CompWindowTypeDockMask) || - . . . . . . . . . (w->state & CompWindowStateNoFocusMask)) - . . . . . . . . . continue; - . . . . . . . . . - 6,840 0 0 3,420 2 0 1,140 0 0 if ((*s->focusWindow) (w)) - . . . . . . . . . { - 10 0 0 5 0 0 0 0 0 if (focus) - . . . . . . . . . { - . . . . . . . . . if (w-> - . . . . . . . . . type & - . . . . . . . . . (CompWindowTypeNormalMask | - . . . . . . . . . CompWindowTypeDialogMask | - . . . . . . . . . CompWindowTypeModalDialogMask)) - . . . . . . . . . { - . . . . . . . . . if (w->activeNum > - . . . . . . . . . focus->activeNum - . . . . . . . . . && !w->state & CompWindowStateStickyMask) - . . . . . . . . . focus = w; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - 10 0 0 5 0 0 5 0 0 focus = w; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 10 0 0 5 0 0 0 0 0 if (focus) - . . . . . . . . . { - 30 0 0 20 5 1 0 0 0 if (focus->id != d->activeWindow) - 9 0 0 3 0 0 3 0 0 moveInputFocusToWindow(focus); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . XSetInputFocus(d->display, d->screens->root, - . . . . . . . . . RevertToPointerRoot, CurrentTime); - . . . . . . . . . } - 10 4 1 10 3 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompScreen *findScreenAtDisplay(CompDisplay * d, Window root) - 3,760 93 2 0 0 0 2,820 49 0 { - . . . . . . . . . CompScreen *s; - . . . . . . . . . - 6,410 98 3 3,282 2 0 1,094 0 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . { - 3,760 0 0 2,820 29 0 0 0 0 if (s->root == root) - 2,358 0 0 786 0 0 786 119 0 return s; - . . . . . . . . . } - . . . . . . . . . - 1,094 0 0 940 0 0 154 0 0 return 0; - 1,880 0 0 1,880 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . forEachWindowOnDisplay(CompDisplay * display, - . . . . . . . . . ForEachWindowProc proc, void *closure) - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . - . . . . . . . . . for (s = display->screens; s; s = s->next) - . . . . . . . . . forEachWindowOnScreen(s, proc, closure); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . CompWindow *findWindowAtDisplay(CompDisplay * d, Window id) - 1,390 62 4 0 0 0 834 8 0 { - 1,910 0 0 1,085 73 0 0 0 0 if (lastFoundWindow && lastFoundWindow->id == id) - . . . . . . . . . { - 591 0 0 197 0 0 197 31 0 return lastFoundWindow; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . CompWindow *w; - . . . . . . . . . - 596 9 1 309 1 0 103 0 0 for (s = d->screens; s; s = s->next) - . . . . . . . . . { - 324 0 0 162 0 0 162 21 0 w = findWindowAtScreen(s, id); - 162 0 0 81 0 0 0 0 0 if (w) - 177 0 0 59 0 0 59 0 0 return w; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 300 20 1 278 0 0 22 0 0 return 0; - 556 32 2 556 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . CompWindow *findTopLevelWindowAtDisplay(CompDisplay * d, Window id) - . . . . . . . . . { - . . . . . . . . . if (lastFoundWindow && lastFoundWindow->id == id) - . . . . . . . . . { - . . . . . . . . . return lastFoundWindow; - . . . . . . . . . } - . . . . . . . . . else --- line 3077 ---------------------------------------- --- line 3334 ---------------------------------------- - . . . . . . . . . event->xselectionclear.window, - . . . . . . . . . event->xselectionclear.selection); - . . . . . . . . . - . . . . . . . . . if (screen) - . . . . . . . . . shutDown = TRUE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void warpPointer(CompDisplay * display, int dx, int dy) - 9 2 2 1 0 0 5 0 0 { - 3 0 0 2 0 0 1 0 0 CompScreen *s = display->screens; - . . . . . . . . . XEvent event; - . . . . . . . . . - 6 1 1 4 0 0 1 0 0 display->pointerX += dx; - 6 0 0 4 0 0 1 0 0 display->pointerY += dy; - . . . . . . . . . - 6 1 1 4 0 0 0 0 0 if (display->pointerX >= s->width) - . . . . . . . . . display->pointerX = s->width - 1; - 4 1 1 2 0 0 0 0 0 else if (display->pointerX < 0) - . . . . . . . . . display->pointerX = 0; - . . . . . . . . . - 6 0 0 4 0 0 0 0 0 if (display->pointerY >= s->height) - . . . . . . . . . display->pointerY = s->height - 1; - 4 1 1 2 0 0 0 0 0 else if (display->pointerY < 0) - . . . . . . . . . display->pointerY = 0; - . . . . . . . . . - 17 2 2 8 0 0 4 0 0 XWarpPointer(display->display, - . . . . . . . . . None, s->root, 0, 0, 0, 0, display->pointerX, - . . . . . . . . . display->pointerY); - . . . . . . . . . - 4 0 0 2 0 0 1 0 0 XSync(display->display, FALSE); - . . . . . . . . . - 14 1 1 4 0 0 2 0 0 while (XCheckMaskEvent(display->display, - . . . . . . . . . LeaveWindowMask | - . . . . . . . . . EnterWindowMask | PointerMotionMask, &event)); - . . . . . . . . . - 3 0 0 1 1 0 0 0 0 if (!inHandleEvent) - . . . . . . . . . { - 4 0 0 3 1 0 1 0 0 display->lastPointerX = display->pointerX; - 4 1 1 3 0 0 1 0 0 display->lastPointerY = display->pointerY; - . . . . . . . . . } - 5 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . setDisplayAction(CompDisplay * display, - . . . . . . . . . CompOption * o, CompOptionValue * value) - 600 44 2 0 0 0 400 0 0 { - . . . . . . . . . CompScreen *s; - . . . . . . . . . - 1,100 45 2 600 65 0 200 0 0 for (s = display->screens; s; s = s->next) - 400 0 0 200 0 0 100 0 0 removeScreenAction(s, &o->value.action); - . . . . . . . . . - 1,100 43 2 600 0 0 200 0 0 for (s = display->screens; s; s = s->next) - 300 0 0 200 0 0 100 0 0 addScreenAction(s, &value->action); - . . . . . . . . . // break; - . . . . . . . . . - . . . . . . . . . /* if (s) - . . . . . . . . . { - . . . . . . . . . CompScreen *failed = s; - . . . . . . . . . - . . . . . . . . . for (s = display->screens; s && s != failed; s = s->next) - . . . . . . . . . removeScreenAction (s, &value->action); - . . . . . . . . . for (s = display->screens; s; s = s->next) - . . . . . . . . . addScreenAction (s, &o->value.action); - . . . . . . . . . printf ("Couldn't set %s\n",o->name); - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } */ - . . . . . . . . . - 500 0 0 200 0 0 100 0 0 if (compSetActionOption(o, value)) - 6 0 0 0 0 0 3 0 0 return TRUE; - . . . . . . . . . - 197 0 0 100 0 0 97 0 0 return FALSE; - 200 0 0 200 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void clearTargetOutput(CompDisplay * display, unsigned int mask) - . . . . . . . . . { - . . . . . . . . . if (targetScreen) - . . . . . . . . . clearScreenOutput(targetScreen, targetOutput, mask); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . #define HOME_IMAGEDIR ".beryl/images" - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . readImageFromFile(CompDisplay * display, - . . . . . . . . . const char *name, int *width, int *height, void **data) - 81 18 6 0 0 0 63 0 0 { - . . . . . . . . . Bool status; - . . . . . . . . . int stride; - . . . . . . . . . - 153 9 4 63 2 1 27 6 0 status = (*display->fileToImage) (display, NULL, name, width, height, - . . . . . . . . . &stride, data); - 18 0 0 9 0 0 0 0 0 if (!status) - . . . . . . . . . { - . . . . . . . . . char *home; - . . . . . . . . . - 15 0 0 0 0 0 10 1 0 home = getenv("HOME"); - 10 0 0 5 0 0 0 0 0 if (home) - . . . . . . . . . { - . . . . . . . . . char *path; - . . . . . . . . . - 115 5 2 65 0 0 15 1 0 path = malloc(strlen(home) + strlen(HOME_IMAGEDIR) + 2); - 10 0 0 5 0 0 0 0 0 if (path) - . . . . . . . . . { - 30 0 0 10 0 0 5 0 0 sprintf(path, "%s/%s", home, HOME_IMAGEDIR); - 90 5 2 40 0 0 15 0 0 status = (*display->fileToImage) (display, path, name, - . . . . . . . . . width, height, &stride, - . . . . . . . . . data); - . . . . . . . . . - 10 5 2 5 0 0 5 0 0 free(path); - . . . . . . . . . - 10 0 0 5 0 0 0 0 0 if (status) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 85 7 2 35 0 0 15 0 0 status = (*display->fileToImage) (display, IMAGEDIR, name, - . . . . . . . . . width, height, &stride, data); - . . . . . . . . . } - . . . . . . . . . - 27 4 2 18 0 0 9 0 0 return status; - 36 0 0 27 4 2 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . writeImageToFile(CompDisplay * display, - . . . . . . . . . const char *path, - . . . . . . . . . const char *name, - . . . . . . . . . const char *format, int width, int height, void *data) - . . . . . . . . . { - . . . . . . . . . return (*display->imageToFile) (display, path, name, format, width, --- line 3462 ---------------------------------------- --- line 3463 ---------------------------------------- - . . . . . . . . . height, width * 4, data); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . fileToImage(CompDisplay * display, - . . . . . . . . . const char *path, - . . . . . . . . . const char *name, - . . . . . . . . . int *width, int *height, int *stride, void **data) - 104 5 2 0 0 0 91 0 0 { - 13 0 0 0 0 0 0 0 0 return FALSE; - 26 4 1 26 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . imageToFile(CompDisplay * display, - . . . . . . . . . const char *path, - . . . . . . . . . const char *name, - . . . . . . . . . const char *format, int width, int height, int stride, void *data) - . . . . . . . . . { - . . . . . . . . . return FALSE; --- line 3481 ---------------------------------------- - --------------------------------------------------------------------------------- --- User-annotated source: ipcs.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 47 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . Bool IPCS_lock = FALSE; - . . . . . . . . . - . . . . . . . . . #define CHECK_LOCK if (IPCS_lock) { fprintf(stderr,"[IPCS]: Unable to change values during paint operations!\n"); return; } - . . . . . . . . . #define CHECK_LOCK_ERR if (IPCS_lock) { fprintf(stderr,"[IPCS]: Unable to change values during paint operations!\n"); return -1; } - . . . . . . . . . #define UNPACK_ATOM int type=(*atoms)[valueAtom].type, pos=(*atoms)[valueAtom].pos - . . . . . . . . . - . . . . . . . . . static void IPCSresize(unsigned int *size, unsigned char **data, int pos) - 1,548 15 2 0 0 0 1,032 5 0 { - 1,290 0 0 774 0 0 0 0 0 if (pos <= *size) - . . . . . . . . . return; - 1,920 0 0 960 0 0 480 0 0 *data = realloc(*data, pos); - 5,784 10 1 1,680 0 0 1,224 0 0 bzero((*data) + (*size), pos - (*size)); - 720 0 0 480 0 0 240 0 0 *size = pos; - 516 7 1 516 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int IPCS_GetType(char *type) - . . . . . . . . . { - . . . . . . . . . int i; - . . . . . . . . . - . . . . . . . . . for (i = 0; i < (sizeof(IPCSTypes) / sizeof(IPCS_Type)); i++) - . . . . . . . . . { - . . . . . . . . . if (!strcasecmp(type, IPCSTypes[i].name)) - . . . . . . . . . return i; - . . . . . . . . . } - . . . . . . . . . return 0; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . int IPCS_GetAtom(IPCS_OBJ, int type, char *name, Bool create) - 23,100 260 2 0 0 0 18,480 1,096 0 { - . . . . . . . . . int i; - . . . . . . . . . - . . . . . . . . . //look for existing atom - 49,134 260 3 28,906 1,290 156 2,310 0 0 for (i = 0; i < *atom_count; i++) - . . . . . . . . . { - 90,841 213 2 48,145 1,072 222 2,090 345 0 if ((*atoms)[i].type == type && !strcasecmp((*atoms)[i].name, name)) - 6,135 0 0 2,045 0 0 2,045 0 0 return i; - . . . . . . . . . } - . . . . . . . . . //no existing atom - 530 0 0 265 0 0 0 0 0 if (create) - . . . . . . . . . { - 732 0 0 244 21 1 0 0 0 CHECK_LOCK_ERR; - 2,928 11 3 1,220 0 0 488 0 0 *atoms = realloc(*atoms, sizeof(IPCS_Atom) * (*atom_count + 1)); - 2,440 7 3 1,220 0 0 488 0 0 (*atoms)[*atom_count].name = strdup(name); - 2,196 0 0 1,220 0 0 244 0 0 (*atoms)[*atom_count].type = type; - 976 7 3 488 0 0 0 0 0 if (*atom_count > 0) - 192 1 0 90 4 4 6 0 0 (*atoms)[*atom_count].pos = - . . . . . . . . . (*atoms)[*atom_count - 1].pos + - . . . . . . . . . IPCSTypes[(*atoms)[*atom_count - 1].type].size + 1; - . . . . . . . . . else - 1,904 14 4 952 0 0 238 0 0 (*atoms)[*atom_count].pos = 0; - 1,220 1 0 732 0 0 244 0 0 *atom_count = *atom_count + 1; - 1,220 0 0 488 0 0 244 0 0 return *atom_count - 1; - . . . . . . . . . } - 2,331 44 1 2,310 0 0 21 0 0 return -1; - 9,240 0 0 6,930 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . // is the value set? - . . . . . . . . . Bool IPCS_IsSet(IPCS_OBJ, int valueAtom) - 14,070 184 1 0 0 0 12,060 552 0 { - 4,020 0 0 2,010 0 0 0 0 0 if (valueAtom < 0) - . . . . . . . . . return FALSE; - 32,160 21 1 16,080 0 0 4,020 0 0 UNPACK_ATOM; - 2,010 0 0 0 0 0 2,010 0 0 type = 0; // compiler warning stupidity - 10,050 0 0 6,030 0 0 0 0 0 if (pos >= (*size)) - . . . . . . . . . return FALSE; - 12,060 14 1 6,030 0 0 2,010 0 0 Bool *block = (Bool *) ((*data) + pos); - . . . . . . . . . - 8,040 0 0 6,030 998 0 2,010 0 0 return (*block); - 4,020 0 0 4,020 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool IPCS_IsSetN(IPCS_OBJ, int type, char *name) - . . . . . . . . . { - . . . . . . . . . return IPCS_IsSet(size, data, atom_count, atoms, - . . . . . . . . . IPCS_GetAtom(size, data, atom_count, atoms, type, - . . . . . . . . . name, FALSE)); - . . . . . . . . . } - . . . . . . . . . --- line 124 ---------------------------------------- --- line 213 ---------------------------------------- - . . . . . . . . . ctype IPCS_Get ## itype ## ND (IPCS_OBJ,char * name , ctype def) \ - . . . . . . . . . { \ - . . . . . . . . . return IPCS_Get ## itype ## D (size,data,atom_count,atoms, \ - . . . . . . . . . IPCS_GetAtom (size,data,atom_count,atoms, ipcs_type, name, FALSE), \ - . . . . . . . . . def); \ - . . . . . . . . . } \ - . . . . . . . . . - . . . . . . . . . - 52,872 2,770 23 22,536 1,331 3 11,257 717 3 IPCS_GEN_FUNCTIONS(Bool, Bool, IPCS_BOOL) - . . . . . . . . . IPCS_GEN_FUNCTIONS(unsigned char, UChar, IPCS_UCHAR) - 66 5 5 28 0 0 14 0 0 IPCS_GEN_FUNCTIONS(int, Int, IPCS_INT) - . . . . . . . . . IPCS_GEN_FUNCTIONS(char, Char, IPCS_CHAR) - . . . . . . . . . IPCS_GEN_FUNCTIONS(unsigned int, UInt, IPCS_UINT) - . . . . . . . . . IPCS_GEN_FUNCTIONS(short, Short, IPCS_SHORT) - . . . . . . . . . IPCS_GEN_FUNCTIONS(unsigned short, UShort, IPCS_USHORT) - . . . . . . . . . IPCS_GEN_FUNCTIONS(long, Long, IPCS_LONG) - . . . . . . . . . IPCS_GEN_FUNCTIONS(unsigned long, ULong, IPCS_ULONG) - 231 20 10 99 1 0 49 0 0 IPCS_GEN_FUNCTIONS(float, Float, IPCS_FLOAT) - . . . . . . . . . IPCS_GEN_FUNCTIONS(double, Double, IPCS_DOUBLE) - . . . . . . . . . IPCS_GEN_FUNCTIONS(char *, CPtr, IPCS_CPTR) -162,516 4,934 12 68,618 0 0 39,724 0 0 IPCS_GEN_FUNCTIONS(void *, VPtr, IPCS_VPTR) - --------------------------------------------------------------------------------- --- User-annotated source: settings-dump.c --------------------------------------------------------------------------------- - No information has been collected for settings-dump.c - --------------------------------------------------------------------------------- --- User-annotated source: window.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 46 ---------------------------------------- - . . . . . . . . . typedef struct - . . . . . . . . . { - . . . . . . . . . unsigned long flags; - . . . . . . . . . unsigned long functions; - . . . . . . . . . unsigned long decorations; - . . . . . . . . . } MwmHints; - . . . . . . . . . - . . . . . . . . . static int reallocWindowPrivates(int size, void *closure) - 30 5 2 0 0 0 18 0 0 { - 12 0 0 6 0 0 6 0 0 CompScreen *s = (CompScreen *) closure; - . . . . . . . . . CompWindow *w; - . . . . . . . . . void *privates; - . . . . . . . . . - 6,636 5 2 3,978 1,320 281 1,326 0 0 for (w = s->windows; w; w = w->next) - . . . . . . . . . { - 9,240 0 0 3,960 1,320 306 2,640 0 0 privates = realloc(w->privates, size * sizeof(CompPrivate)); - 2,640 0 0 1,320 0 0 0 0 0 if (!privates) - . . . . . . . . . return FALSE; - . . . . . . . . . - 3,960 0 0 2,640 0 0 1,320 0 0 w->privates = (CompPrivate *) privates; - . . . . . . . . . } - . . . . . . . . . - 12 0 0 6 0 0 6 0 0 return TRUE; - 12 0 0 12 1 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int allocateWindowPrivateIndex(CompScreen * screen) - 24 6 2 0 0 0 12 0 0 { - 42 6 2 18 0 0 6 0 0 return allocatePrivateIndex(&screen->windowPrivateLen, - . . . . . . . . . &screen->windowPrivateIndices, - . . . . . . . . . reallocWindowPrivates, (void *)screen); - 12 0 0 12 1 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void freeWindowPrivateIndex(CompScreen * screen, int index) - . . . . . . . . . { - . . . . . . . . . freePrivateIndex(screen->windowPrivateLen, - . . . . . . . . . screen->windowPrivateIndices, index); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static Bool isAncestorTo(CompWindow * transient, CompWindow * ancestor) - 1,300 4 2 0 0 0 780 0 0 { - 1,040 0 0 520 6 0 0 0 0 if (transient->transientFor) - . . . . . . . . . { - . . . . . . . . . if (transient->transientFor == ancestor->id) - . . . . . . . . . return TRUE; - . . . . . . . . . - . . . . . . . . . transient = findWindowAtScreen(transient->screen, - . . . . . . . . . transient->transientFor); - . . . . . . . . . if (transient) - . . . . . . . . . return isAncestorTo(transient, ancestor); - . . . . . . . . . } - . . . . . . . . . - 520 4 2 260 0 0 260 4 0 return FALSE; - 520 3 1 520 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void recalcNormalHints(CompWindow * window) - 1,026 4 2 0 0 0 684 0 0 { - . . . . . . . . . int maxSize; - . . . . . . . . . - 1,368 0 0 1,026 84 1 342 0 0 maxSize = window->screen->maxTextureSize; - 1,368 0 0 1,026 1 0 0 0 0 maxSize -= window->serverBorderWidth * 2; - . . . . . . . . . - 1,368 0 0 1,026 0 0 342 0 0 window->sizeHints.x = window->serverX; - 1,368 5 3 1,026 0 0 342 0 0 window->sizeHints.y = window->serverY; - 1,368 0 0 1,026 0 0 342 68 52 window->sizeHints.width = window->serverWidth; - 1,368 0 0 1,026 0 0 342 0 0 window->sizeHints.height = window->serverHeight; - . . . . . . . . . - 1,710 6 3 684 0 0 0 0 0 if (window->sizeHints.flags & PMinSize) - . . . . . . . . . { - 64 0 0 48 0 0 16 0 0 window->sizeHints.base_width = window->sizeHints.min_width; - 80 0 0 48 0 0 16 0 0 window->sizeHints.base_height = window->sizeHints.min_height; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 652 7 3 326 0 0 326 1 0 window->sizeHints.base_width = 0; - 652 0 0 326 0 0 326 0 0 window->sizeHints.base_height = 0; - . . . . . . . . . } - . . . . . . . . . - 2,052 0 0 1,026 0 0 342 0 0 window->sizeHints.flags |= PBaseSize; - . . . . . . . . . - 1,710 5 3 684 0 0 0 0 0 if (window->sizeHints.flags & PBaseSize) - . . . . . . . . . { - 1,368 0 0 1,026 0 0 342 0 0 window->sizeHints.min_width = window->sizeHints.base_width; - 1,710 0 0 1,026 0 0 342 0 0 window->sizeHints.min_height = window->sizeHints.base_height; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . window->sizeHints.min_width = 0; - . . . . . . . . . window->sizeHints.min_height = 0; - . . . . . . . . . } - 2,052 5 3 1,026 0 0 342 0 0 window->sizeHints.flags |= PMinSize; - . . . . . . . . . - 1,710 0 0 684 0 0 0 0 0 if (!(window->sizeHints.flags & PMaxSize)) - . . . . . . . . . { - 684 5 3 342 0 0 342 0 0 window->sizeHints.max_width = 65535; - 684 0 0 342 0 0 342 0 0 window->sizeHints.max_height = 65535; - 2,052 0 0 1,026 0 0 342 0 0 window->sizeHints.flags |= PMaxSize; - . . . . . . . . . } - . . . . . . . . . - 2,052 5 3 1,368 0 0 0 0 0 if (window->sizeHints.max_width < window->sizeHints.min_width) - . . . . . . . . . window->sizeHints.max_width = window->sizeHints.min_width; - . . . . . . . . . - 2,052 0 0 1,368 0 0 0 0 0 if (window->sizeHints.max_height < window->sizeHints.min_height) - . . . . . . . . . window->sizeHints.max_height = window->sizeHints.min_height; - . . . . . . . . . - 1,368 5 3 684 0 0 0 0 0 if (window->sizeHints.min_width < 1) - 652 0 0 326 0 0 326 0 0 window->sizeHints.min_width = 1; - . . . . . . . . . - 1,368 0 0 684 0 0 0 0 0 if (window->sizeHints.max_width < 1) - . . . . . . . . . window->sizeHints.max_width = 1; - . . . . . . . . . - 1,368 5 3 684 0 0 0 0 0 if (window->sizeHints.min_height < 1) - 652 0 0 326 0 0 326 0 0 window->sizeHints.min_height = 1; - . . . . . . . . . - 1,368 0 0 684 0 0 0 0 0 if (window->sizeHints.max_height < 1) - . . . . . . . . . window->sizeHints.max_height = 1; - . . . . . . . . . - 1,368 10 2 1,026 0 0 0 0 0 if (window->sizeHints.max_width > maxSize) - 1,026 0 0 684 0 0 342 0 0 window->sizeHints.max_width = maxSize; - . . . . . . . . . - 1,368 0 0 1,026 0 0 0 0 0 if (window->sizeHints.max_height > maxSize) - 1,026 0 0 684 0 0 342 0 0 window->sizeHints.max_height = maxSize; - . . . . . . . . . - 1,368 0 0 1,026 0 0 0 0 0 if (window->sizeHints.min_width > maxSize) - . . . . . . . . . window->sizeHints.min_width = maxSize; - . . . . . . . . . - 1,368 21 3 1,026 0 0 0 0 0 if (window->sizeHints.min_height > maxSize) - . . . . . . . . . window->sizeHints.min_height = maxSize; - . . . . . . . . . - 1,368 0 0 1,026 0 0 0 0 0 if (window->sizeHints.base_width > maxSize) - . . . . . . . . . window->sizeHints.base_width = maxSize; - . . . . . . . . . - 1,368 21 3 1,026 0 0 0 0 0 if (window->sizeHints.base_height > maxSize) - . . . . . . . . . window->sizeHints.base_height = maxSize; - . . . . . . . . . - 1,710 0 0 684 0 0 0 0 0 if (window->sizeHints.flags & PResizeInc) - . . . . . . . . . { - . . . . . . . . . if (window->sizeHints.width_inc == 0) - . . . . . . . . . window->sizeHints.width_inc = 1; - . . . . . . . . . - . . . . . . . . . if (window->sizeHints.height_inc == 0) - . . . . . . . . . window->sizeHints.height_inc = 1; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 684 19 2 342 0 0 342 0 0 window->sizeHints.width_inc = 1; - 684 19 3 342 0 0 342 0 0 window->sizeHints.height_inc = 1; - 2,052 0 0 1,026 0 0 342 0 0 window->sizeHints.flags |= PResizeInc; - . . . . . . . . . } - . . . . . . . . . - 1,710 0 0 684 0 0 0 0 0 if (window->sizeHints.flags & PAspect) - . . . . . . . . . { - . . . . . . . . . /* don't divide by 0 */ - . . . . . . . . . if (window->sizeHints.min_aspect.y < 1) - . . . . . . . . . window->sizeHints.min_aspect.y = 1; - . . . . . . . . . - . . . . . . . . . if (window->sizeHints.max_aspect.y < 1) - . . . . . . . . . window->sizeHints.max_aspect.y = 1; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 684 26 6 342 0 0 342 0 0 window->sizeHints.min_aspect.x = 1; - 684 0 0 342 0 0 342 0 0 window->sizeHints.min_aspect.y = 65535; - 684 0 0 342 0 0 342 0 0 window->sizeHints.max_aspect.x = 65535; - 684 0 0 342 0 0 342 0 0 window->sizeHints.max_aspect.y = 1; - 2,052 7 3 1,026 0 0 342 0 0 window->sizeHints.flags |= PAspect; - . . . . . . . . . } - . . . . . . . . . - 1,710 0 0 684 0 0 0 0 0 if (!(window->sizeHints.flags & PWinGravity)) - . . . . . . . . . { - 518 0 0 259 0 0 259 0 0 window->sizeHints.win_gravity = NorthWestGravity; - 1,554 20 2 777 0 0 259 0 0 window->sizeHints.flags |= PWinGravity; - . . . . . . . . . } - 684 0 0 684 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void updateNormalHints(CompWindow * w) - 420 1 0 0 0 0 210 0 0 { - . . . . . . . . . Status status; - . . . . . . . . . long supplied; - . . . . . . . . . - 1,155 10 2 735 1 0 210 0 0 status = XGetWMNormalHints(w->screen->display->display, w->id, - . . . . . . . . . &w->sizeHints, &supplied); - . . . . . . . . . - 210 0 0 105 0 0 0 0 0 if (!status) - 38 0 0 19 0 0 19 1 0 w->sizeHints.flags = 0; - . . . . . . . . . - 210 0 0 105 0 0 105 0 0 recalcNormalHints(w); - 210 0 0 210 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void windowClearUrgentHint(CompWindow * w) - 32 5 1 0 0 0 16 0 0 { - . . . . . . . . . XWMHints *hints; - . . . . . . . . . - 64 6 2 48 1 0 16 1 0 hints = XGetWMHints(w->screen->display->display, w->id); - 16 0 0 8 0 0 0 0 0 if (hints) - . . . . . . . . . { - 48 0 0 24 0 0 8 0 0 hints->flags &= ~XUrgencyHint; - 64 7 2 56 4 0 8 0 0 XSetWMHints(w->screen->display->display, w->id, hints); - 16 0 0 8 0 0 8 0 0 XFree(hints); - . . . . . . . . . } - 48 0 0 24 2 0 8 0 0 w->state &= ~CompWindowStateDemandsAttentionMask; - 40 7 2 32 1 0 8 0 0 (*w->screen->windowStateChangeNotify) (w); - 64 0 0 56 0 0 8 0 0 setWindowState(w->screen->display, w->state, w->id); - 16 0 0 16 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void updateWmHints(CompWindow * w) - 452 106 1 0 0 0 226 0 0 { - . . . . . . . . . XWMHints *hints; - . . . . . . . . . - 904 13 3 678 0 0 226 1 0 hints = XGetWMHints(w->screen->display->display, w->id); - 226 0 0 113 0 0 0 0 0 if (hints) - . . . . . . . . . { - 455 0 0 182 0 0 0 0 0 if (hints->flags & InputHint) - 364 0 0 273 0 0 91 6 0 w->inputHint = hints->input; - . . . . . . . . . - 182 7 1 91 0 0 91 0 0 XFree(hints); - . . . . . . . . . } - 226 0 0 226 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void updateWindowClassHints(CompWindow * w) - 900 6 1 0 0 0 450 0 0 { - . . . . . . . . . XClassHint classHint; - . . . . . . . . . int status; - . . . . . . . . . - 900 0 0 450 10 0 0 0 0 if (w->resName) - . . . . . . . . . { - . . . . . . . . . free(w->resName); - . . . . . . . . . w->resName = NULL; - . . . . . . . . . } - . . . . . . . . . - 900 6 2 450 0 0 0 0 0 if (w->resClass) - . . . . . . . . . { - . . . . . . . . . free(w->resClass); - . . . . . . . . . w->resClass = NULL; - . . . . . . . . . } - . . . . . . . . . - 2,025 6 2 1,350 1 0 450 0 0 status = XGetClassHint(w->screen->display->display, w->id, &classHint); - 450 0 0 225 0 0 0 0 0 if (status) - . . . . . . . . . { - 276 0 0 92 0 0 0 0 0 if (classHint.res_name) - . . . . . . . . . { - 460 0 0 184 0 0 184 0 0 w->resName = strdup(classHint.res_name); - 184 0 0 92 0 0 92 0 0 XFree(classHint.res_name); - . . . . . . . . . } - . . . . . . . . . - 276 6 2 92 0 0 0 0 0 if (classHint.res_class) - . . . . . . . . . { - 460 0 0 184 0 0 184 0 0 w->resClass = strdup(classHint.res_class); - 184 0 0 92 0 0 92 0 0 XFree(classHint.res_class); - . . . . . . . . . } - . . . . . . . . . } - 450 3 0 450 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void updateTransientHint(CompWindow * w) - 416 0 0 0 0 0 208 0 0 { - . . . . . . . . . Window transientFor; - . . . . . . . . . Status status; - . . . . . . . . . - 208 9 2 104 0 0 104 0 0 w->transientFor = None; - . . . . . . . . . - 936 0 0 624 0 0 208 0 0 status = XGetTransientForHint(w->screen->display->display, - . . . . . . . . . w->id, &transientFor); - . . . . . . . . . - 208 0 0 104 0 0 0 0 0 if (status) - . . . . . . . . . { - . . . . . . . . . CompWindow *ancestor; - . . . . . . . . . - 15 0 0 9 0 0 6 0 0 ancestor = findWindowAtScreen(w->screen, transientFor); - 6 0 0 3 0 0 0 0 0 if (!ancestor) - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . /* protect against circular transient dependencies */ - 20 0 0 10 0 0 2 0 0 if (transientFor == w->id || isAncestorTo(ancestor, w)) - . . . . . . . . . return; - . . . . . . . . . - 6 0 0 4 0 0 2 0 0 w->transientFor = transientFor; - . . . . . . . . . } - 208 9 2 208 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Window getClientLeaderOfAncestor(CompWindow * w) - 20 3 2 0 0 0 10 0 0 { - 20 0 0 10 0 0 0 0 0 if (w->transientFor) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtScreen(w->screen, w->transientFor); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . if (w->clientLeader) - . . . . . . . . . return w->clientLeader; - . . . . . . . . . - . . . . . . . . . return getClientLeaderOfAncestor(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 10 0 0 5 0 0 5 0 0 return None; - 10 0 0 10 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Window getClientLeader(CompWindow * w) - 416 16 4 0 0 0 208 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - . . . . . . . . . - 2,704 6 2 1,040 1 0 832 0 0 result = XGetWindowProperty(w->screen->display->display, w->id, - . . . . . . . . . w->screen->display->wmClientLeaderAtom, - . . . . . . . . . 0L, 1L, False, XA_WINDOW, &actual, - . . . . . . . . . &format, &n, &left, &data); - . . . . . . . . . - 823 9 2 309 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - . . . . . . . . . Window win; - . . . . . . . . . - 404 0 0 202 0 0 101 0 0 memcpy(&win, data, sizeof(Window)); - 202 0 0 101 0 0 101 0 0 XFree((void *)data); - . . . . . . . . . - 303 0 0 101 0 0 0 0 0 if (win) - 297 0 0 99 0 0 99 0 0 return win; - . . . . . . . . . } - . . . . . . . . . - 119 104 1 109 0 0 10 0 0 return getClientLeaderOfAncestor(w); - 208 0 0 208 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . char *getStartupId(CompWindow * w) - 24 1 1 0 0 0 12 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - . . . . . . . . . - 198 12 4 84 1 0 48 0 0 result = XGetWindowProperty(w->screen->display->display, w->id, - . . . . . . . . . w->screen->display->startupIdAtom, - . . . . . . . . . 0L, 1024L, False, - . . . . . . . . . w->screen->display->utf8StringAtom, - . . . . . . . . . &actual, &format, &n, &left, &data); - . . . . . . . . . - 33 1 1 13 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - . . . . . . . . . char *id; - . . . . . . . . . - 4 0 0 1 0 0 2 0 0 id = strdup((char *)data); - 2 0 0 1 0 0 1 0 0 XFree((void *)data); - . . . . . . . . . - 3 0 0 1 0 0 1 0 0 return id; - . . . . . . . . . } - . . . . . . . . . - 11 5 0 6 0 0 5 0 0 return NULL; - 12 0 0 12 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int getWmState(CompDisplay * display, Window id) - 510 105 3 0 0 0 306 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - 102 0 0 0 0 0 102 0 0 unsigned long state = NormalState; - . . . . . . . . . - 2,550 7 2 714 0 0 816 0 0 result = XGetWindowProperty(display->display, id, - . . . . . . . . . display->wmStateAtom, 0L, 2L, FALSE, - . . . . . . . . . display->wmStateAtom, &actual, &format, - . . . . . . . . . &n, &left, &data); - . . . . . . . . . - 513 59 0 205 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - 4 0 0 2 0 0 1 0 0 memcpy(&state, data, sizeof(unsigned long)); - 2 0 0 1 0 0 1 0 0 XFree((void *)data); - . . . . . . . . . } - . . . . . . . . . - 102 0 0 102 0 0 0 0 0 return state; - 204 0 0 204 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void setWmState(CompDisplay * display, int state, Window id) - 42 10 6 0 0 0 28 0 0 { - . . . . . . . . . unsigned long data[2]; - . . . . . . . . . - 21 0 0 7 0 0 7 0 0 data[0] = state; - 7 0 0 0 0 0 7 0 0 data[1] = None; - . . . . . . . . . - 105 3 1 49 4 1 21 0 0 XChangeProperty(display->display, id, - . . . . . . . . . display->wmStateAtom, display->wmStateAtom, - . . . . . . . . . 32, PropModeReplace, (unsigned char *)data, 2); - 14 0 0 14 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int windowStateMask(CompDisplay * display, Atom state) - 144 3 2 0 0 0 108 0 0 { - 144 0 0 108 0 0 0 0 0 if (state == display->winStateModalAtom) - 6 0 0 0 0 0 3 0 0 return CompWindowStateModalMask; - 132 5 3 99 7 1 0 0 0 else if (state == display->winStateStickyAtom) - 8 0 0 0 0 0 4 0 0 return CompWindowStateStickyMask; - 116 0 0 87 0 0 0 0 0 else if (state == display->winStateMaximizedVertAtom) - . . . . . . . . . return CompWindowStateMaximizedVertMask; - 116 5 3 87 0 0 0 0 0 else if (state == display->winStateMaximizedHorzAtom) - 4 0 0 0 0 0 2 0 0 return CompWindowStateMaximizedHorzMask; - 108 0 0 81 0 0 0 0 0 else if (state == display->winStateShadedAtom) - . . . . . . . . . return CompWindowStateShadedMask; - 108 8 3 81 0 0 0 0 0 else if (state == display->winStateSkipTaskbarAtom) - 12 0 0 0 0 0 6 0 0 return CompWindowStateSkipTaskbarMask; - 84 0 0 63 0 0 0 0 0 else if (state == display->winStateSkipPagerAtom) - 14 0 0 0 0 0 7 0 0 return CompWindowStateSkipPagerMask; - 56 7 2 42 0 0 0 0 0 else if (state == display->winStateHiddenAtom) - 6 0 0 0 0 0 3 0 0 return CompWindowStateHiddenMask; - 44 0 0 33 0 0 0 0 0 else if (state == display->winStateFullscreenAtom) - . . . . . . . . . return CompWindowStateFullscreenMask; - 44 6 2 33 2 1 0 0 0 else if (state == display->winStateAboveAtom) - 12 0 0 0 0 0 6 0 0 return CompWindowStateAboveMask; - 20 0 0 15 0 0 0 0 0 else if (state == display->winStateBelowAtom) - . . . . . . . . . return CompWindowStateBelowMask; - 20 0 0 15 0 0 0 0 0 else if (state == display->winStateDemandsAttentionAtom) - . . . . . . . . . return CompWindowStateDemandsAttentionMask; - 20 0 0 15 0 0 0 0 0 else if (state == display->winStateDisplayModalAtom) - . . . . . . . . . return CompWindowStateDisplayModalMask; - 20 0 0 15 0 0 0 0 0 else if (state == display->winStateNoFocusAtom) - . . . . . . . . . return CompWindowStateNoFocusMask; - . . . . . . . . . - 41 11 2 36 0 0 5 0 0 return 0; - 72 0 0 72 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int getWindowState(CompDisplay * display, Window id) - 1,145 11 2 0 0 0 687 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - 229 0 0 0 0 0 229 0 0 unsigned int state = 0; - . . . . . . . . . - 4,809 91 2 1,145 91 0 1,832 6 0 result = XGetWindowProperty(display->display, id, display->winStateAtom, - . . . . . . . . . 0L, 1024L, FALSE, XA_ATOM, &actual, &format, - . . . . . . . . . &n, &left, &data); - . . . . . . . . . - 1,187 7 3 472 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - 28 0 0 14 0 0 14 0 0 Atom *a = (Atom *) data; - . . . . . . . . . - 314 9 2 100 0 0 50 0 0 while (n--) - 216 0 0 180 0 0 36 0 0 state |= windowStateMask(display, *a++); - . . . . . . . . . - 28 0 0 14 0 0 14 0 0 XFree((void *)data); - . . . . . . . . . } - . . . . . . . . . - 229 80 0 229 0 0 0 0 0 return state; - 458 0 0 458 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void setWindowState(CompDisplay * display, unsigned int state, Window id) - 48 5 1 0 0 0 32 0 0 { - . . . . . . . . . Atom data[32]; - 8 6 1 0 0 0 8 0 0 int i = 0; - . . . . . . . . . - 32 0 0 8 0 0 0 0 0 if (state & CompWindowStateModalMask) - . . . . . . . . . data[i++] = display->winStateModalAtom; - 32 0 0 8 0 0 0 0 0 if (state & CompWindowStateStickyMask) - 12 2 0 8 2 0 2 0 0 data[i++] = display->winStateStickyAtom; - 32 5 2 8 0 0 0 0 0 if (state & CompWindowStateMaximizedVertMask) - . . . . . . . . . data[i++] = display->winStateMaximizedVertAtom; - 32 7 1 8 0 0 0 0 0 if (state & CompWindowStateMaximizedHorzMask) - 12 0 0 8 0 0 2 0 0 data[i++] = display->winStateMaximizedHorzAtom; - 32 7 2 8 0 0 0 0 0 if (state & CompWindowStateShadedMask) - . . . . . . . . . data[i++] = display->winStateShadedAtom; - 32 0 0 8 0 0 0 0 0 if (state & CompWindowStateSkipTaskbarMask) - 12 2 0 8 0 0 2 0 0 data[i++] = display->winStateSkipTaskbarAtom; - 32 4 2 8 0 0 0 0 0 if (state & CompWindowStateSkipPagerMask) - 48 0 0 32 5 1 8 0 0 data[i++] = display->winStateSkipPagerAtom; - 32 7 1 8 0 0 0 0 0 if (state & CompWindowStateHiddenMask) - . . . . . . . . . data[i++] = display->winStateHiddenAtom; - 32 0 0 8 0 0 0 0 0 if (state & CompWindowStateFullscreenMask) - . . . . . . . . . data[i++] = display->winStateFullscreenAtom; - 32 7 1 8 0 0 0 0 0 if (state & CompWindowStateAboveMask) - 12 4 0 8 2 0 2 0 0 data[i++] = display->winStateAboveAtom; - 32 5 1 8 0 0 0 0 0 if (state & CompWindowStateBelowMask) - . . . . . . . . . data[i++] = display->winStateBelowAtom; - 32 6 1 8 0 0 0 0 0 if (state & CompWindowStateDemandsAttentionMask) - . . . . . . . . . data[i++] = display->winStateDemandsAttentionAtom; - 32 0 0 8 0 0 0 0 0 if (state & CompWindowStateDisplayModalMask) - . . . . . . . . . data[i++] = display->winStateDisplayModalAtom; - 32 7 1 8 0 0 0 0 0 if (state & CompWindowStateNoFocusMask) - . . . . . . . . . data[i++] = display->winStateNoFocusAtom; - . . . . . . . . . - 120 12 3 48 7 0 24 0 0 XChangeProperty(display->display, id, display->winStateAtom, - . . . . . . . . . XA_ATOM, 32, PropModeReplace, (unsigned char *)data, i); - 16 0 0 16 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void - . . . . . . . . . setWindowActions(CompDisplay * display, unsigned int actions, Window id) - 606 6 1 0 0 0 404 0 0 { - . . . . . . . . . Atom data[32]; - 101 0 0 0 0 0 101 0 0 int i = 0; - . . . . . . . . . - 404 84 2 101 0 0 0 0 0 if (actions & CompWindowActionMoveMask) - 606 0 0 404 12 0 101 0 0 data[i++] = display->winActionMoveAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionResizeMask) - 606 8 2 404 0 0 101 0 0 data[i++] = display->winActionResizeAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionStickMask) - 606 6 2 404 0 0 101 0 0 data[i++] = display->winActionStickAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionMinimizeMask) - 606 0 0 404 9 2 101 0 0 data[i++] = display->winActionMinimizeAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionMaximizeHorzMask) - 606 5 2 404 0 0 101 0 0 data[i++] = display->winActionMaximizeHorzAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionMaximizeVertMask) - 606 8 2 404 0 0 101 0 0 data[i++] = display->winActionMaximizeVertAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionFullscreenMask) - 606 0 0 404 0 0 101 0 0 data[i++] = display->winActionFullscreenAtom; - 404 3 2 101 0 0 0 0 0 if (actions & CompWindowActionCloseMask) - 606 0 0 404 0 0 101 0 0 data[i++] = display->winActionCloseAtom; - 404 0 0 101 0 0 0 0 0 if (actions & CompWindowActionShadeMask) - . . . . . . . . . data[i++] = display->winActionShadeAtom; - 404 8 2 101 0 0 0 0 0 if (actions & CompWindowActionChangeDesktopMask) - 606 8 2 404 0 0 101 0 0 data[i++] = display->winActionChangeDesktopAtom; - . . . . . . . . . - 1,515 0 0 606 0 0 303 0 0 XChangeProperty(display->display, id, - . . . . . . . . . display->wmAllowedActionsAtom, XA_ATOM, 32, - . . . . . . . . . PropModeReplace, (unsigned char *)data, i); - 202 0 0 202 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void recalcWindowActions(CompWindow * w) - 844 10 3 0 0 0 422 0 0 { - 211 0 0 0 0 0 211 0 0 unsigned int actions = 0; - . . . . . . . . . - 2,727 85 3 1,465 1 0 211 0 0 switch (w->type) - . . . . . . . . . { - . . . . . . . . . case CompWindowTypeFullscreenMask: - . . . . . . . . . case CompWindowTypeNormalMask: - . . . . . . . . . case CompWindowTypeDialogMask: - . . . . . . . . . case CompWindowTypeModalDialogMask: - . . . . . . . . . case CompWindowTypeMenuMask: - 203 0 0 0 0 0 203 0 0 actions = - . . . . . . . . . CompWindowActionMaximizeHorzMask | - . . . . . . . . . CompWindowActionMaximizeVertMask | - . . . . . . . . . CompWindowActionFullscreenMask | - . . . . . . . . . CompWindowActionMoveMask | - . . . . . . . . . CompWindowActionResizeMask | - . . . . . . . . . CompWindowActionStickMask | - . . . . . . . . . CompWindowActionMinimizeMask | - . . . . . . . . . CompWindowActionCloseMask | CompWindowActionChangeDesktopMask; - 812 7 1 406 2 0 0 0 0 if (w->input.top) - . . . . . . . . . actions |= CompWindowActionShadeMask; - . . . . . . . . . break; - . . . . . . . . . case CompWindowTypeUtilMask: - . . . . . . . . . case CompWindowTypeToolbarMask: - . . . . . . . . . actions = - . . . . . . . . . CompWindowActionMoveMask | - . . . . . . . . . CompWindowActionResizeMask | - . . . . . . . . . CompWindowActionStickMask | --- line 584 ---------------------------------------- --- line 585 ---------------------------------------- - . . . . . . . . . CompWindowActionCloseMask | CompWindowActionChangeDesktopMask; - . . . . . . . . . if (w->input.top) - . . . . . . . . . actions |= CompWindowActionShadeMask; - . . . . . . . . . break; - . . . . . . . . . default: - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . - 1,266 11 5 844 2 0 0 0 0 if (w->sizeHints.min_width == w->sizeHints.max_width && - . . . . . . . . . w->sizeHints.min_height == w->sizeHints.max_height) - . . . . . . . . . actions &= ~(CompWindowActionResizeMask | - . . . . . . . . . CompWindowActionMaximizeHorzMask | - . . . . . . . . . CompWindowActionMaximizeVertMask | - . . . . . . . . . CompWindowActionFullscreenMask); - . . . . . . . . . - 1,266 0 0 422 1 0 0 0 0 if (!(w->mwmFunc & MwmFuncAll)) - . . . . . . . . . { - . . . . . . . . . if (!(w->mwmFunc & MwmFuncResize)) - . . . . . . . . . actions &= ~(CompWindowActionResizeMask | - . . . . . . . . . CompWindowActionMaximizeHorzMask | - . . . . . . . . . CompWindowActionMaximizeVertMask | - . . . . . . . . . CompWindowActionFullscreenMask); - . . . . . . . . . - . . . . . . . . . if (!(w->mwmFunc & MwmFuncMove)) --- line 608 ---------------------------------------- --- line 613 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . if (!(w->mwmFunc & MwmFuncIconify)) - . . . . . . . . . actions &= ~CompWindowActionMinimizeMask; - . . . . . . . . . - . . . . . . . . . if (!(w->mwmFunc & MwmFuncClose)) - . . . . . . . . . actions &= ~CompWindowActionCloseMask; - . . . . . . . . . } - . . . . . . . . . - 844 11 3 633 0 0 0 0 0 if (actions != w->actions) - . . . . . . . . . { - 303 0 0 202 0 0 101 0 0 w->actions = actions; - 707 8 1 606 0 0 101 0 0 setWindowActions(w->screen->display, actions, w->id); - . . . . . . . . . } - 422 2 2 422 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int constrainWindowState(unsigned int state, unsigned int actions) - . . . . . . . . . { - . . . . . . . . . if (!(actions & CompWindowActionMaximizeHorzMask)) - . . . . . . . . . state &= ~CompWindowStateMaximizedHorzMask; - . . . . . . . . . - . . . . . . . . . if (!(actions & CompWindowActionMaximizeVertMask)) - . . . . . . . . . state &= ~CompWindowStateMaximizedVertMask; --- line 634 ---------------------------------------- --- line 639 ---------------------------------------- - . . . . . . . . . if (!(actions & CompWindowActionFullscreenMask)) - . . . . . . . . . state &= ~CompWindowStateFullscreenMask; - . . . . . . . . . - . . . . . . . . . return state; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . - . . . . . . . . . unsigned int getWindowType(CompDisplay * display, Window id) - 1,185 8 3 0 0 0 711 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - . . . . . . . . . - 4,977 94 6 1,185 3 1 1,896 12 0 result = XGetWindowProperty(display->display, id, display->winTypeAtom, - . . . . . . . . . 0L, 1L, FALSE, XA_ATOM, &actual, &format, - . . . . . . . . . &n, &left, &data); - . . . . . . . . . - 1,446 0 0 561 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - . . . . . . . . . Atom a; - . . . . . . . . . - 356 5 2 178 0 0 89 0 0 memcpy(&a, data, sizeof(Atom)); - 178 0 0 89 0 0 89 0 0 XFree((void *)data); - . . . . . . . . . - 445 0 0 267 7 1 0 0 0 if (a == display->winTypeNormalAtom) - 154 0 0 0 0 0 77 0 0 return CompWindowTypeNormalMask; - 60 0 0 36 0 0 0 0 0 else if (a == display->winTypeMenuAtom) - . . . . . . . . . return CompWindowTypeMenuMask; - 60 4 1 36 0 0 0 0 0 else if (a == display->winTypeDesktopAtom) - 2 0 0 0 0 0 1 0 0 return CompWindowTypeDesktopMask; - 55 0 0 33 0 0 0 0 0 else if (a == display->winTypeDockAtom) - 4 2 0 0 0 0 2 0 0 return CompWindowTypeDockMask; - 45 9 1 27 0 0 0 0 0 else if (a == display->winTypeToolbarAtom) - . . . . . . . . . return CompWindowTypeToolbarMask; - 45 0 0 27 0 0 0 0 0 else if (a == display->winTypeUtilAtom) - . . . . . . . . . return CompWindowTypeUtilMask; - 45 2 1 27 0 0 0 0 0 else if (a == display->winTypeSplashAtom) - . . . . . . . . . return CompWindowTypeSplashMask; - 45 0 0 27 0 0 0 0 0 else if (a == display->winTypeDialogAtom) - 6 0 0 0 0 0 3 0 0 return CompWindowTypeDialogMask; - 30 2 1 18 0 0 0 0 0 else if (a == display->winTypeDropdownMenuAtom) - . . . . . . . . . return CompWindowTypeDropdownMenuMask; - 30 0 0 18 0 0 0 0 0 else if (a == display->winTypePopupMenuAtom) - . . . . . . . . . return CompWindowTypePopupMenuMask; - 30 2 1 18 4 0 0 0 0 else if (a == display->winTypeTooltipAtom) - 2 0 0 0 0 0 1 0 0 return CompWindowTypeTooltipMask; - 25 0 0 15 0 0 0 0 0 else if (a == display->winTypeNotificationAtom) - . . . . . . . . . return CompWindowTypeNotificationMask; - 25 1 1 15 0 0 0 0 0 else if (a == display->winTypeComboAtom) - . . . . . . . . . return CompWindowTypeComboMask; - 25 0 0 15 0 0 0 0 0 else if (a == display->winTypeDndAtom) - . . . . . . . . . return CompWindowTypeDndMask; - . . . . . . . . . } - . . . . . . . . . - 390 12 3 237 0 0 153 1 0 return CompWindowTypeUnknownMask; - 474 0 0 474 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void recalcWindowType(CompWindow * w) - 952 0 0 0 0 0 476 0 0 { - . . . . . . . . . unsigned int type; - . . . . . . . . . - 714 0 0 476 1 0 238 0 0 type = w->wmType; - . . . . . . . . . - 1,368 0 0 684 1 0 0 0 0 if (!w->attrib.override_redirect - . . . . . . . . . && w->wmType == CompWindowTypeUnknownMask) - 23 6 0 0 0 0 23 0 0 type = CompWindowTypeNormalMask; - . . . . . . . . . - 1,190 5 2 476 0 0 0 0 0 if (w->state & CompWindowStateFullscreenMask) - . . . . . . . . . type = CompWindowTypeFullscreenMask; - 1,190 0 0 714 145 2 0 0 0 if(w->screen->opt[COMP_SCREEN_OPTION_LEGACY_MAXIMIZE_FIX].value.b) - . . . . . . . . . { - . . . . . . . . . /* Some code to make Wine and legacy applications work. */ - . . . . . . . . . if (w->width == w->screen->width && w->height == w->screen->height - . . . . . . . . . && !(w->type & CompWindowTypeFullscreenMask) - . . . . . . . . . && !(type & CompWindowTypeDesktopMask)) - . . . . . . . . . type = CompWindowTypeFullscreenMask; - . . . . . . . . . } - 476 18 3 238 0 0 0 0 0 if (type == CompWindowTypeNormalMask) - . . . . . . . . . { - 400 0 0 200 0 0 0 0 0 if (w->attrib.override_redirect) - 2 0 0 0 0 0 2 0 0 type = CompWindowTypeUnknownMask; // menu fix hack - 400 0 0 200 0 0 0 0 0 if (w->transientFor) - . . . . . . . . . type = CompWindowTypeDialogMask; - . . . . . . . . . } - . . . . . . . . . - 486 12 3 242 0 0 0 0 0 if (type == CompWindowTypeDockMask - . . . . . . . . . && (w->state & CompWindowStateBelowMask)) - . . . . . . . . . type = CompWindowTypeNormalMask; - . . . . . . . . . - 1,457 0 0 440 0 0 0 0 0 if ((type & (CompWindowTypeNormalMask | CompWindowTypeDialogMask)) - . . . . . . . . . && (w->state & CompWindowStateModalMask)) - 3 0 0 0 0 0 3 0 0 type = CompWindowTypeModalDialogMask; - . . . . . . . . . - 952 9 3 714 0 0 0 0 0 if (type != w->type) - . . . . . . . . . { - 315 0 0 210 0 0 105 0 0 w->type = type; - 210 0 0 105 0 0 105 0 0 recalcWindowActions(w); - . . . . . . . . . } - 476 0 0 476 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . getMwmHints(CompDisplay * display, - . . . . . . . . . Window id, unsigned int *func, unsigned int *decor) - 728 0 0 0 0 0 520 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . MwmHints *mwmHints; - . . . . . . . . . - 208 6 2 104 0 0 104 0 0 *func = MwmFuncAll; - 208 0 0 104 0 0 104 0 0 *decor = MwmDecorAll; - . . . . . . . . . - 2,600 113 4 728 11 0 832 0 0 result = XGetWindowProperty(display->display, id, display->mwmHintsAtom, - . . . . . . . . . 0L, 20L, FALSE, display->mwmHintsAtom, - . . . . . . . . . &actual, &format, &n, &left, - . . . . . . . . . (unsigned char **)&mwmHints); - . . . . . . . . . - 538 0 0 214 0 0 0 0 0 if (result == Success && n && mwmHints) - . . . . . . . . . { - 18 0 0 6 0 0 0 0 0 if (n >= PropMotifWmHintElements) - . . . . . . . . . { - 30 0 0 12 0 0 0 0 0 if (mwmHints->flags & MwmHintsDecorations) - 15 0 0 9 0 0 3 0 0 *decor = mwmHints->decorations; - . . . . . . . . . - 30 0 0 12 0 0 0 0 0 if (mwmHints->flags & MwmHintsFunctions) - . . . . . . . . . *func = mwmHints->functions; - . . . . . . . . . } - . . . . . . . . . - 12 0 0 6 0 0 6 0 0 XFree(mwmHints); - . . . . . . . . . } - 208 0 0 208 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int getProtocols(CompDisplay * display, Window id) - 1,185 112 3 0 0 0 711 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . Atom *protocol; - 237 229 3 0 0 0 237 0 0 unsigned int protocols = 0; - . . . . . . . . . - 5,451 105 3 1,185 19 0 1,896 0 0 result = XGetWindowProperty(display->display, id, - . . . . . . . . . display->wmProtocolsAtom, 0L, 20L, FALSE, - . . . . . . . . . XA_ATOM, &actual, &format, &n, &left, - . . . . . . . . . (unsigned char **)&protocol); - . . . . . . . . . - 1,455 8 3 564 0 0 0 0 0 if (result == Success && n && protocol) - . . . . . . . . . { - . . . . . . . . . int i; - . . . . . . . . . - 2,336 46 1 1,030 0 0 92 0 0 for (i = 0; i < n; i++) - . . . . . . . . . { - 3,102 7 2 1,410 0 0 0 0 0 if (protocol[i] == display->wmDeleteWindowAtom) - 184 0 0 92 0 0 0 0 0 protocols |= CompWindowProtocolDeleteMask; - 2,090 0 0 950 0 0 0 0 0 else if (protocol[i] == display->wmTakeFocusAtom) - 184 0 0 92 0 0 0 0 0 protocols |= CompWindowProtocolTakeFocusMask; - 1,078 72 2 490 0 0 0 0 0 else if (protocol[i] == display->wmPingAtom) - 184 0 0 92 0 0 0 0 0 protocols |= CompWindowProtocolPingMask; - 66 0 0 30 0 0 0 0 0 else if (protocol[i] == display->wmSyncRequestAtom) - 3 0 0 3 0 0 0 0 0 protocols |= CompWindowProtocolSyncRequestMask; - . . . . . . . . . } - . . . . . . . . . - 184 0 0 92 0 0 92 0 0 XFree(protocol); - . . . . . . . . . } - . . . . . . . . . - 237 6 2 237 0 0 0 0 0 return protocols; - 474 0 0 474 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned int - . . . . . . . . . getWindowProp(CompDisplay * display, - . . . . . . . . . Window id, Atom property, unsigned int defaultValue) - 707 4 2 0 0 0 505 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - . . . . . . . . . - 2,020 7 2 404 0 0 808 0 0 result = XGetWindowProperty(display->display, id, property, - . . . . . . . . . 0L, 1L, FALSE, XA_CARDINAL, &actual, - . . . . . . . . . &format, &n, &left, &data); - . . . . . . . . . - 508 1 0 203 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - . . . . . . . . . unsigned long value; - . . . . . . . . . - 4 0 0 2 0 0 1 0 0 memcpy(&value, data, sizeof(unsigned long)); - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 XFree(data); - . . . . . . . . . - 3 0 0 1 0 0 1 0 0 return (unsigned int)value; - . . . . . . . . . } - . . . . . . . . . - 301 4 0 201 0 0 100 0 0 return defaultValue; - 202 0 0 202 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . setWindowProp(CompDisplay * display, - . . . . . . . . . Window id, Atom property, unsigned int value) - 21 5 4 0 0 0 15 1 0 { - 6 0 0 3 0 0 3 0 0 unsigned long data = value; - . . . . . . . . . - 36 1 1 12 0 0 9 0 0 XChangeProperty(display->display, id, property, - . . . . . . . . . XA_CARDINAL, 32, PropModeReplace, - . . . . . . . . . (unsigned char *)&data, 1); - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . unsigned short - . . . . . . . . . getWindowProp32(CompDisplay * display, - . . . . . . . . . Window id, Atom property, unsigned short defaultValue) - 2,163 11 1 0 0 0 1,545 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - . . . . . . . . . unsigned char *data; - . . . . . . . . . - 6,180 106 4 1,236 0 0 2,472 0 0 result = XGetWindowProperty(display->display, id, property, - . . . . . . . . . 0L, 1L, FALSE, XA_CARDINAL, &actual, - . . . . . . . . . &format, &n, &left, &data); - . . . . . . . . . - 1,545 0 0 618 0 0 0 0 0 if (result == Success && n && data) - . . . . . . . . . { - . . . . . . . . . CARD32 value; - . . . . . . . . . - . . . . . . . . . memcpy(&value, data, sizeof(CARD32)); - . . . . . . . . . - . . . . . . . . . XFree(data); - . . . . . . . . . - . . . . . . . . . return value >> 16; - . . . . . . . . . } - . . . . . . . . . - 927 9 2 618 0 0 309 0 0 return defaultValue; - 618 0 0 618 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . setWindowProp32(CompDisplay * display, - . . . . . . . . . Window id, Atom property, unsigned short value) - . . . . . . . . . { - . . . . . . . . . CARD32 value32; - . . . . . . . . . - . . . . . . . . . value32 = value << 16 | value; --- line 878 ---------------------------------------- --- line 1028 ---------------------------------------- - . . . . . . . . . XChangeProperty(w->screen->display->display, w->id, - . . . . . . . . . w->screen->display->horzRestoreGeometryAtom, - . . . . . . . . . XA_CARDINAL, 32, PropModeReplace, - . . . . . . . . . (unsigned char *)buffer, 2); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . setWindowFrameExtents(CompWindow * w, CompWindowExtents *input) - 1,225 114 5 0 0 0 735 0 0 { - 5,880 15 4 3,920 56 3 0 0 0 if (input->left != w->input.left || - . . . . . . . . . input->right != w->input.right || - . . . . . . . . . input->top != w->input.top || input->bottom != w->input.bottom) - . . . . . . . . . { - . . . . . . . . . unsigned long data[4]; - . . . . . . . . . int x, y; - . . . . . . . . . int vx, vy; - . . . . . . . . . int head = screenGetOutputDevForWindow(w); - . . . . . . . . . int mask = 0; --- line 1045 ---------------------------------------- --- line 1093 ---------------------------------------- - . . . . . . . . . XConfigureWindow(w->screen->display->display, w->id, mask, &xwc); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . XChangeProperty(w->screen->display->display, w->id, - . . . . . . . . . w->screen->display->frameExtentsAtom, - . . . . . . . . . XA_CARDINAL, 32, PropModeReplace, - . . . . . . . . . (unsigned char *)data, 4); - . . . . . . . . . } - 490 16 4 490 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . updateWindowOutputExtents (CompWindow *w) - 8 0 0 0 0 0 4 0 0 { - . . . . . . . . . CompWindowExtents output; - . . . . . . . . . - 12 0 0 8 2 0 2 0 0 (*w->screen->getOutputExtentsForWindow) (w, &output); - . . . . . . . . . - 10 2 2 6 0 0 0 0 0 if (output.left != w->output.left || - . . . . . . . . . output.right != w->output.right || - . . . . . . . . . output.top != w->output.top || - . . . . . . . . . output.bottom != w->output.bottom) - . . . . . . . . . { - 10 2 2 6 0 0 4 0 0 w->output = output; - . . . . . . . . . - 8 0 0 4 2 2 0 0 0 if (w->setupComplete) - 10 0 0 8 0 0 2 0 0 (*w->screen->windowResizeNotify) (w); - . . . . . . . . . } - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void setWindowMatrix(CompWindow * w) - 9 4 2 0 0 0 6 0 0 { - 27 0 0 18 0 0 9 0 0 w->matrix = w->texture->matrix; - 39 2 1 21 0 0 3 0 0 w->matrix.x0 -= (w->attrib.x * w->matrix.xx); - 39 0 0 21 0 0 3 0 0 w->matrix.y0 -= (w->attrib.y * w->matrix.yy); - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . /* FIXME: Error handeling is Work in progress as of - . . . . . . . . . * r2008 (ish). - . . . . . . . . . */ - . . . . . . . . . void bindWindow(CompWindow * w) - 12 5 2 0 0 0 6 0 0 { - . . . . . . . . . //can't bind destroyed windows - 12 0 0 6 0 0 0 0 0 if (w->id == 1) - . . . . . . . . . return; - . . . . . . . . . - 6 0 0 3 0 0 3 0 0 redirectWindow(w); - . . . . . . . . . - 12 0 0 6 0 0 0 0 0 if (!w->pixmap) - . . . . . . . . . { - . . . . . . . . . Status status; - . . . . . . . . . XWindowAttributes attr; - . . . . . . . . . - . . . . . . . . . /* We have to grab the server here to make sure that window - . . . . . . . . . is mapped when getting the window pixmap */ - 15 3 1 12 2 1 3 0 0 XGrabServer(w->screen->display->display); - 27 0 0 18 0 0 6 0 0 status = XGetWindowAttributes(w->screen->display->display, w->id, - . . . . . . . . . &attr); - 6 3 1 3 0 0 0 0 0 if (!status) - . . . . . . . . . fprintf(stderr, "core: bindWindow(): " - . . . . . . . . . "XGetWindowAttributes() returned non-success." - . . . . . . . . . "Window: 0x%X\n", (unsigned int)w->id); - 9 0 0 3 0 0 0 0 0 if (attr.map_state != IsViewable) - . . . . . . . . . { - . . . . . . . . . XUngrabServer(w->screen->display->display); - . . . . . . . . . finiTexture(w->screen, w->texture); - . . . . . . . . . w->mapNum = 0; - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . - 30 6 2 21 0 0 6 0 0 w->pixmap = - . . . . . . . . . XCompositeNameWindowPixmap(w->screen->display->display, - . . . . . . . . . w->id); - . . . . . . . . . - 15 3 1 12 0 0 3 0 0 XUngrabServer(w->screen->display->display); - . . . . . . . . . } - . . . . . . . . . - 60 3 1 36 1 1 3 0 0 if (!bindPixmapToTexture(w->screen, w->texture, w->pixmap, - . . . . . . . . . w->width, w->height, w->attrib.depth)) - . . . . . . . . . { - . . . . . . . . . fprintf(stderr, - . . . . . . . . . _("%s: Couldn't bind redirected window 0x%x to " - . . . . . . . . . "texture\n"), programName, (int)w->id); - . . . . . . . . . } - . . . . . . . . . - 6 3 1 3 0 0 3 0 0 setWindowMatrix(w); - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void releaseWindow(CompWindow * w) - 16 2 0 0 0 0 8 0 0 { - 16 0 0 8 4 0 0 0 0 if (w->pixmap) - . . . . . . . . . { - . . . . . . . . . CompTexture *texture; - . . . . . . . . . - . . . . . . . . . texture = createTexture(w->screen); - . . . . . . . . . if (texture) - . . . . . . . . . { - . . . . . . . . . destroyTexture(w->screen, w->texture); - . . . . . . . . . --- line 1190 ---------------------------------------- --- line 1193 ---------------------------------------- - . . . . . . . . . if (texture->mode == TEXTURE_MODE_COPY) - . . . . . . . . . texture->mode = TEXTURE_MODE_COPY_DAMAGE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . XFreePixmap(w->screen->display->display, w->pixmap); - . . . . . . . . . - . . . . . . . . . w->pixmap = None; - . . . . . . . . . } - 8 0 0 8 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void freeWindow(CompWindow * w) - 16 4 2 0 0 0 8 0 0 { - 8 0 0 4 0 0 4 0 0 releaseWindow(w); - . . . . . . . . . - 16 0 0 8 4 0 0 0 0 if (w->syncAlarm) - . . . . . . . . . XSyncDestroyAlarm(w->screen->display->display, w->syncAlarm); - . . . . . . . . . - 16 2 1 8 2 0 0 0 0 if (w->syncWaitHandle) - . . . . . . . . . compRemoveTimeout(w->syncWaitHandle); - . . . . . . . . . - 20 0 0 16 0 0 4 0 0 destroyTexture(w->screen, w->texture); - . . . . . . . . . - 16 2 1 8 2 0 0 0 0 if (w->frame && !w->frameLock) - . . . . . . . . . XDestroyWindow(w->screen->display->display, w->frame); - . . . . . . . . . - 16 0 0 8 2 0 0 0 0 if (w->clip) - 12 2 1 8 0 0 4 0 0 XDestroyRegion(w->clip); - . . . . . . . . . - 16 0 0 8 1 0 0 0 0 if (w->region) - 12 0 0 8 0 0 4 0 0 XDestroyRegion(w->region); - . . . . . . . . . - 16 0 0 8 0 0 0 0 0 if (w->privates) - 12 2 1 8 0 0 4 0 0 free(w->privates); - . . . . . . . . . - 16 0 0 8 2 0 0 0 0 if (w->sizeDamage) - . . . . . . . . . free(w->damageRects); - . . . . . . . . . - 16 0 0 8 0 0 0 0 0 if (w->vertices) - . . . . . . . . . free(w->vertices); - . . . . . . . . . - 16 2 1 8 0 0 0 0 0 if (w->indices) - . . . . . . . . . free(w->indices); - . . . . . . . . . - 12 0 0 8 4 0 0 0 0 if (lastFoundWindow == w) - . . . . . . . . . lastFoundWindow = 0; - . . . . . . . . . - 12 2 1 8 0 0 0 0 0 if (lastDamagedWindow == w) - . . . . . . . . . lastDamagedWindow = 0; - . . . . . . . . . - 16 0 0 8 4 0 0 0 0 if (w->struts) - . . . . . . . . . free(w->struts); - . . . . . . . . . - 16 2 1 8 2 0 0 0 0 if (w->icon) - . . . . . . . . . freeWindowIcons(w); - . . . . . . . . . - 16 0 0 8 4 0 0 0 0 if (w->startupId) - . . . . . . . . . free(w->startupId); - . . . . . . . . . - 16 2 1 8 2 0 0 0 0 if (w->resName) - 3 0 0 2 0 0 1 0 0 free(w->resName); - . . . . . . . . . - 16 0 0 8 0 0 0 0 0 if (w->resClass) - 3 0 0 2 0 0 1 0 0 free(w->resClass); - . . . . . . . . . - 56 2 1 32 0 0 8 0 0 IPCS_FREEOBJ(w); - . . . . . . . . . - 8 0 0 4 0 0 4 0 0 free(w); - 8 0 0 8 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . damageTransformedWindowRect(CompWindow * w, - . . . . . . . . . float xScale, - . . . . . . . . . float yScale, - . . . . . . . . . float xTranslate, float yTranslate, BoxPtr rect) - . . . . . . . . . { - . . . . . . . . . REGION reg; --- line 1268 ---------------------------------------- --- line 1287 ---------------------------------------- - . . . . . . . . . reg.extents.x2 += w->attrib.x + w->attrib.border_width; - . . . . . . . . . reg.extents.y2 += w->attrib.y + w->attrib.border_width; - . . . . . . . . . - . . . . . . . . . damageScreenRegion(w->screen, ®); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void damageWindowOutputExtents(CompWindow * w) - 24 3 3 0 0 0 12 0 0 { - 36 3 3 18 1 0 0 0 0 if (w->screen->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK) - . . . . . . . . . return; - . . . . . . . . . - 24 0 0 12 0 0 0 0 0 if (w->shaded || (w->attrib.map_state == IsViewable && w->damaged)) - . . . . . . . . . { - . . . . . . . . . REGION reg; - . . . . . . . . . - 6 1 1 0 0 0 2 0 0 reg.rects = ®.extents; - 6 0 0 2 0 0 4 0 0 reg.numRects = reg.size = 1; - . . . . . . . . . - . . . . . . . . . /* top */ - 18 0 0 8 0 0 2 0 0 reg.extents.x1 = w->attrib.x - w->output.left; - 18 1 1 8 0 0 2 0 0 reg.extents.y1 = w->attrib.y - w->output.top; - 20 0 0 12 0 0 2 0 0 reg.extents.x2 = w->attrib.x + w->width + w->output.right; - 6 1 1 4 0 0 2 0 0 reg.extents.y2 = w->attrib.y; - . . . . . . . . . - 16 0 0 8 0 0 0 0 0 if (reg.extents.x1 < reg.extents.x2 - . . . . . . . . . && reg.extents.y1 < reg.extents.y2) - 8 0 0 4 0 0 2 0 0 damageScreenRegion(w->screen, ®); - . . . . . . . . . - . . . . . . . . . /* bottom */ - 14 1 1 8 0 0 2 0 0 reg.extents.y1 = w->attrib.y + w->height; - 12 0 0 6 0 0 2 0 0 reg.extents.y2 = reg.extents.y1 + w->output.bottom; - . . . . . . . . . - 16 0 0 8 0 0 0 0 0 if (reg.extents.x1 < reg.extents.x2 - . . . . . . . . . && reg.extents.y1 < reg.extents.y2) - 8 1 1 4 0 0 2 0 0 damageScreenRegion(w->screen, ®); - . . . . . . . . . - . . . . . . . . . /* left */ - 18 0 0 8 0 0 2 0 0 reg.extents.x1 = w->attrib.x - w->output.left; - 6 0 0 4 0 0 2 0 0 reg.extents.y1 = w->attrib.y; - 6 1 1 4 0 0 2 0 0 reg.extents.x2 = w->attrib.x; - 14 0 0 8 0 0 2 0 0 reg.extents.y2 = w->attrib.y + w->height; - . . . . . . . . . - 16 0 0 8 0 0 0 0 0 if (reg.extents.x1 < reg.extents.x2 - . . . . . . . . . && reg.extents.y1 < reg.extents.y2) - 8 1 1 4 0 0 2 0 0 damageScreenRegion(w->screen, ®); - . . . . . . . . . - . . . . . . . . . /* right */ - 14 0 0 8 0 0 2 0 0 reg.extents.x1 = w->attrib.x + w->width; - 12 0 0 6 0 0 2 0 0 reg.extents.x2 = reg.extents.x1 + w->output.right; - . . . . . . . . . - 16 1 0 8 0 0 0 0 0 if (reg.extents.x1 < reg.extents.x2 - . . . . . . . . . && reg.extents.y1 < reg.extents.y2) - 8 0 0 4 0 0 2 0 0 damageScreenRegion(w->screen, ®); - . . . . . . . . . } - 12 1 1 12 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool damageWindowRect(CompWindow * w, Bool initial, BoxPtr rect) -30,690 8 2 0 0 0 24,552 2 0 { - 6,138 0 0 0 0 0 0 0 0 return FALSE; -12,276 0 0 12,276 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void addWindowDamageRect(CompWindow * w, BoxPtr rect) - 360 3 1 0 0 0 216 0 0 { - . . . . . . . . . REGION region; - . . . . . . . . . - 432 0 0 216 0 0 0 0 0 if (w->screen->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK) - . . . . . . . . . return; - . . . . . . . . . - 216 0 0 144 0 0 72 0 0 region.extents = *rect; - . . . . . . . . . - 720 3 1 288 15 0 72 1 0 if (!(*w->screen->damageWindowRect) (w, FALSE, ®ion.extents)) - . . . . . . . . . { - 720 0 0 360 0 0 72 0 0 region.extents.x1 += w->attrib.x + w->attrib.border_width; - 720 3 1 360 0 0 72 0 0 region.extents.y1 += w->attrib.y + w->attrib.border_width; - 720 0 0 360 0 0 72 0 0 region.extents.x2 += w->attrib.x + w->attrib.border_width; - 720 5 1 360 0 0 72 0 0 region.extents.y2 += w->attrib.y + w->attrib.border_width; - . . . . . . . . . - 216 0 0 0 0 0 72 0 0 region.rects = ®ion.extents; - 216 0 0 72 0 0 144 0 0 region.numRects = region.size = 1; - . . . . . . . . . - 288 1 0 144 0 0 72 0 0 damageScreenRegion(w->screen, ®ion); - . . . . . . . . . } - 144 0 0 144 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . getOutputExtentsForWindow (CompWindow *w, CompWindowExtents *output) - 8 2 1 0 0 0 6 0 0 { - 4 0 0 2 0 0 2 0 0 output->left = 0; - 4 0 0 2 0 0 2 0 0 output->right = 0; - 4 0 0 2 0 0 2 0 0 output->top = 0; - 4 0 0 2 0 0 2 0 0 output->bottom = 0; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void addWindowDamage(CompWindow * w) - 364 23 4 0 0 0 182 0 0 { - 546 0 0 273 41 0 0 0 0 if (w->screen->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK) - . . . . . . . . . return; - . . . . . . . . . - 884 7 1 442 50 0 0 0 0 if (w->shaded || (w->attrib.map_state == IsViewable && w->damaged)) - . . . . . . . . . { - . . . . . . . . . BoxRec box; - . . . . . . . . . - 710 0 0 284 35 0 71 0 0 box.x1 = -w->output.left - w->attrib.border_width; - 710 3 1 284 0 0 71 0 0 box.y1 = -w->output.top - w->attrib.border_width; - 497 0 0 284 18 0 71 0 0 box.x2 = w->width + w->output.right; - 497 2 0 284 0 0 71 0 0 box.y2 = w->height + w->output.bottom; - . . . . . . . . . - 213 0 0 71 0 0 71 0 0 addWindowDamageRect(w, &box); - . . . . . . . . . } - 182 7 2 182 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void updateWindowRegion(CompWindow * w) - 148 2 1 0 0 0 74 0 0 { - . . . . . . . . . REGION rect; - 37 0 0 0 0 0 37 0 0 XRectangle r, *rects, *shapeRects = 0; - 37 0 0 0 0 0 37 0 0 int i, n = 0; - . . . . . . . . . - 111 5 2 74 0 0 37 24 0 EMPTY_REGION(w->region); - . . . . . . . . . - 222 0 0 148 1 0 0 0 0 if (w->screen->display->shapeExtension) - . . . . . . . . . { - . . . . . . . . . int order; - . . . . . . . . . - 444 5 2 222 0 0 74 0 0 shapeRects = - . . . . . . . . . XShapeGetRectangles(w->screen->display->display, w->id, - . . . . . . . . . ShapeBounding, &n, &order); - . . . . . . . . . } - . . . . . . . . . - 111 0 0 37 0 0 0 0 0 if (n < 2) - . . . . . . . . . { - 8 0 0 4 0 0 2 0 0 r.x = -w->attrib.border_width; - 8 0 0 4 0 0 2 0 0 r.y = -w->attrib.border_width; - 6 0 0 4 1 0 2 0 0 r.width = w->width; - 6 2 1 4 0 0 2 0 0 r.height = w->height; - . . . . . . . . . - 4 0 0 0 0 0 2 0 0 rects = &r; - 4 0 0 0 0 0 2 0 0 n = 1; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 70 3 1 35 0 0 35 0 0 rects = shapeRects; - . . . . . . . . . } - . . . . . . . . . - 111 0 0 0 0 0 37 12 0 rect.rects = &rect.extents; - 111 5 2 37 0 0 74 0 0 rect.numRects = rect.size = 1; - . . . . . . . . . - 1,033 8 3 710 0 0 37 0 0 for (i = 0; i < n; i++) - . . . . . . . . . { - 2,120 0 0 1,060 13 0 212 0 0 rect.extents.x1 = rects[i].x + w->attrib.border_width; - 2,120 5 2 1,060 0 0 212 0 0 rect.extents.y1 = rects[i].y + w->attrib.border_width; - 1,908 0 0 848 0 0 212 0 0 rect.extents.x2 = rect.extents.x1 + rects[i].width; - 1,908 5 2 848 0 0 212 0 0 rect.extents.y2 = rect.extents.y1 + rects[i].height; - . . . . . . . . . - 636 0 0 212 0 0 0 0 0 if (rect.extents.x1 < 0) - . . . . . . . . . rect.extents.x1 = 0; - 636 0 0 212 0 0 0 0 0 if (rect.extents.y1 < 0) - . . . . . . . . . rect.extents.y1 = 0; - 1,272 0 0 636 13 0 0 0 0 if (rect.extents.x2 > w->width) - . . . . . . . . . rect.extents.x2 = w->width; - 1,272 5 2 636 0 0 0 0 0 if (rect.extents.y2 > w->height) - . . . . . . . . . rect.extents.y2 = w->height; - . . . . . . . . . - 1,696 5 2 848 0 0 0 0 0 if (rect.extents.y1 < rect.extents.y2 && - . . . . . . . . . rect.extents.x1 < rect.extents.x2) - . . . . . . . . . { - 1,272 0 0 636 0 0 212 0 0 rect.extents.x1 += w->attrib.x; - 1,272 0 0 636 0 0 212 0 0 rect.extents.y1 += w->attrib.y; - 1,272 0 0 636 0 0 212 0 0 rect.extents.x2 += w->attrib.x; - 1,272 0 0 636 0 0 212 0 0 rect.extents.y2 += w->attrib.y; - . . . . . . . . . - 1,272 0 0 848 0 0 212 0 0 XUnionRegion(&rect, w->region, w->region); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 74 0 0 37 0 0 0 0 0 if (shapeRects) - 74 0 0 37 0 0 37 0 0 XFree(shapeRects); - 74 0 0 74 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool updateWindowStruts(CompWindow * w) - 416 6 1 0 0 0 208 0 0 { - . . . . . . . . . Atom actual; - . . . . . . . . . int result, format; - . . . . . . . . . unsigned long n, left; - 104 0 0 0 0 0 104 0 0 unsigned long *struts = NULL; - . . . . . . . . . Bool hasOld, hasNew; - . . . . . . . . . CompStruts old, new; - . . . . . . . . . - . . . . . . . . . #define MIN_EMPTY 76 - . . . . . . . . . - 416 9 2 208 8 0 0 0 0 if (w->struts) - . . . . . . . . . { - . . . . . . . . . hasOld = TRUE; - . . . . . . . . . - . . . . . . . . . old.left = w->struts->left; - . . . . . . . . . old.right = w->struts->right; - . . . . . . . . . old.top = w->struts->top; - . . . . . . . . . old.bottom = w->struts->bottom; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 104 9 2 0 0 0 104 0 0 hasOld = FALSE; - . . . . . . . . . } - . . . . . . . . . - 104 0 0 0 0 0 104 0 0 hasNew = FALSE; - . . . . . . . . . - 104 0 0 0 0 0 104 0 0 new.left.x = 0; - 104 9 2 0 0 0 104 0 0 new.left.y = 0; - 104 0 0 0 0 0 104 0 0 new.left.width = 0; - 416 0 0 312 1 0 104 0 0 new.left.height = w->screen->height; - . . . . . . . . . - 416 0 0 312 0 0 104 0 0 new.right.x = w->screen->width; - 104 7 2 0 0 0 104 0 0 new.right.y = 0; - 104 0 0 0 0 0 104 0 0 new.right.width = 0; - 416 0 0 312 0 0 104 0 0 new.right.height = w->screen->height; - . . . . . . . . . - 104 0 0 0 0 0 104 0 0 new.top.x = 0; - 104 0 0 0 0 0 104 0 0 new.top.y = 0; - 416 9 2 312 0 0 104 0 0 new.top.width = w->screen->width; - 104 0 0 0 0 0 104 0 0 new.top.height = 0; - . . . . . . . . . - 104 0 0 0 0 0 104 0 0 new.bottom.x = 0; - 416 0 0 312 0 0 104 0 0 new.bottom.y = w->screen->height; - 416 0 0 312 0 0 104 0 0 new.bottom.width = w->screen->width; - 104 7 2 0 0 0 104 0 0 new.bottom.height = 0; - . . . . . . . . . - 3,016 15 4 1,040 9 0 832 0 0 result = XGetWindowProperty(w->screen->display->display, w->id, - . . . . . . . . . w->screen->display->wmStrutPartialAtom, - . . . . . . . . . 0L, 12L, FALSE, XA_CARDINAL, &actual, - . . . . . . . . . &format, &n, &left, - . . . . . . . . . (unsigned char **)&struts); - . . . . . . . . . - 523 0 0 209 0 0 0 0 0 if (result == Success && n && struts) - . . . . . . . . . { - 3 1 1 1 0 0 0 0 0 if (n == 12) - . . . . . . . . . { - . . . . . . . . . int gap; - . . . . . . . . . - 1 0 0 0 0 0 1 0 0 hasNew = TRUE; - . . . . . . . . . - 14 0 0 7 0 0 1 0 0 gap = w->screen->width - struts[0] - struts[1]; - 1 0 0 1 0 0 0 0 0 gap -= MIN_EMPTY; - . . . . . . . . . - 9 2 2 5 0 0 3 0 0 new.left.width = (int)struts[0] + MIN(0, gap / 2); - 10 1 1 5 0 0 3 0 0 new.right.width = (int)struts[1] + MIN(0, gap / 2); - . . . . . . . . . - 15 0 0 7 0 0 1 0 0 gap = w->screen->height - struts[2] - struts[3]; - 1 0 0 1 0 0 0 0 0 gap -= MIN_EMPTY; - . . . . . . . . . - 10 2 2 5 0 0 3 0 0 new.top.height = (int)struts[2] + MIN(0, gap / 2); - 10 1 1 5 0 0 3 0 0 new.bottom.height = (int)struts[3] + MIN(0, gap / 2); - . . . . . . . . . - 9 0 0 4 0 0 1 0 0 new.right.x = w->screen->width - new.right.width; - 9 1 1 4 0 0 1 0 0 new.bottom.y = w->screen->height - new.bottom.height; - . . . . . . . . . - 4 0 0 2 0 0 1 0 0 new.left.y = struts[4]; - 10 1 1 3 0 0 1 0 0 new.left.height = struts[5] - new.left.y + 1; - 4 0 0 2 0 0 1 0 0 new.right.y = struts[6]; - 10 1 1 3 0 0 1 0 0 new.right.height = struts[7] - new.right.y + 1; - . . . . . . . . . - 4 0 0 2 0 0 1 0 0 new.top.x = struts[8]; - 10 1 1 3 0 0 1 0 0 new.top.width = struts[9] - new.top.x + 1; - 4 0 0 2 0 0 1 0 0 new.bottom.x = struts[10]; - 10 0 0 3 0 0 1 0 0 new.bottom.width = struts[11] - new.bottom.x + 1; - . . . . . . . . . } - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 XFree(struts); - . . . . . . . . . } - . . . . . . . . . - 208 13 2 104 0 0 0 0 0 if (!hasNew) - . . . . . . . . . { - 2,987 99 4 1,030 0 0 824 0 0 result = XGetWindowProperty(w->screen->display->display, w->id, - . . . . . . . . . w->screen->display->wmStrutAtom, 0L, - . . . . . . . . . 4L, FALSE, XA_CARDINAL, &actual, - . . . . . . . . . &format, &n, &left, - . . . . . . . . . (unsigned char **)&struts); - . . . . . . . . . - 515 0 0 206 0 0 0 0 0 if (result == Success && n && struts) - . . . . . . . . . { - . . . . . . . . . if (n == 4) - . . . . . . . . . { - . . . . . . . . . int gap; - . . . . . . . . . - . . . . . . . . . hasNew = TRUE; - . . . . . . . . . - . . . . . . . . . gap = w->screen->width - struts[0] - struts[1]; --- line 1572 ---------------------------------------- --- line 1587 ---------------------------------------- - . . . . . . . . . new.top.y = 0; - . . . . . . . . . new.bottom.y = w->screen->height - new.bottom.height; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . XFree(struts); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 208 104 2 104 0 0 0 0 0 if (hasNew) - . . . . . . . . . { - . . . . . . . . . int strutX1, strutY1, strutX2, strutY2; - . . . . . . . . . int x1, y1, x2, y2; - . . . . . . . . . int i; - . . . . . . . . . - . . . . . . . . . /* applications expect us to clip struts to xinerama edges */ - 8 0 0 5 0 0 1 0 0 for (i = 0; i < w->screen->display->nScreenInfo; i++) - . . . . . . . . . { - . . . . . . . . . x1 = w->screen->display->screenInfo[i].x_org; - . . . . . . . . . y1 = w->screen->display->screenInfo[i].y_org; - . . . . . . . . . x2 = x1 + w->screen->display->screenInfo[i].width; - . . . . . . . . . y2 = y1 + w->screen->display->screenInfo[i].height; - . . . . . . . . . - . . . . . . . . . strutX1 = new.left.x; - . . . . . . . . . strutX2 = strutX1 + new.left.width; --- line 1610 ---------------------------------------- --- line 1639 ---------------------------------------- - . . . . . . . . . if (strutY1 > y1 && strutY1 <= y2) - . . . . . . . . . { - . . . . . . . . . new.bottom.y = strutY1; - . . . . . . . . . new.bottom.height = y2 - strutY1; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 518 5 2 311 0 0 0 0 0 if (hasOld != hasNew || (hasNew && hasOld && - . . . . . . . . . memcmp (&new, &old, sizeof(CompStruts)))) - . . . . . . . . . { - 2 1 1 1 0 0 0 0 0 if (hasNew) - . . . . . . . . . { - 4 0 0 2 0 0 0 0 0 if (!w->struts) - 5 1 1 1 0 0 2 0 0 w->struts = malloc(sizeof(CompStruts)); - . . . . . . . . . - 11 0 0 6 0 0 4 0 0 *w->struts = new; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . free(w->struts); - . . . . . . . . . w->struts = NULL; - . . . . . . . . . } - . . . . . . . . . - 2 0 0 0 0 0 1 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . - 207 9 2 104 0 0 103 0 0 return FALSE; - 208 0 0 208 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void setDefaultWindowAttributes(XWindowAttributes * wa) - 6 1 1 0 0 0 4 0 0 { - 4 0 0 2 0 0 2 2 1 wa->x = 0; - 4 0 0 2 0 0 2 0 0 wa->y = 0; - 4 0 0 2 0 0 2 0 0 wa->width = 1; - 4 0 0 2 0 0 2 0 0 wa->height = 1; - 4 2 1 2 0 0 2 0 0 wa->border_width = 0; - 4 0 0 2 0 0 2 0 0 wa->depth = 0; - 4 0 0 2 0 0 2 0 0 wa->visual = NULL; - 4 0 0 2 0 0 2 0 0 wa->root = None; - 4 0 0 2 0 0 2 0 0 wa->class = InputOnly; - 4 0 0 2 0 0 2 0 0 wa->bit_gravity = NorthWestGravity; - 4 2 1 2 0 0 2 0 0 wa->win_gravity = NorthWestGravity; - 4 0 0 2 0 0 2 0 0 wa->backing_store = NotUseful; - 4 0 0 2 0 0 2 0 0 wa->backing_planes = 0; - 4 0 0 2 0 0 2 2 1 wa->backing_pixel = 0; - 4 0 0 2 0 0 2 0 0 wa->save_under = FALSE; - 4 2 1 2 0 0 2 0 0 wa->colormap = None; - 4 0 0 2 0 0 2 0 0 wa->map_installed = FALSE; - 4 0 0 2 0 0 2 0 0 wa->map_state = IsUnviewable; - 4 0 0 2 0 0 2 0 0 wa->all_event_masks = 0; - 4 0 0 2 0 0 2 0 0 wa->your_event_mask = 0; - 4 0 0 2 0 0 2 0 0 wa->do_not_propagate_mask = 0; - 4 0 0 2 0 0 2 0 0 wa->override_redirect = TRUE; - 4 0 0 2 0 0 2 2 1 wa->screen = NULL; - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void addWindow(CompScreen * screen, Window id, Window aboveId) - 1,422 13 3 0 0 0 948 1 0 { - . . . . . . . . . CompWindow *w; - . . . . . . . . . - 711 0 0 0 0 0 474 3 0 w = (CompWindow *) malloc(sizeof(CompWindow)); - 474 94 3 237 0 0 0 0 0 if (!w) - . . . . . . . . . return; - 1,896 20 3 948 0 0 948 109 91 IPCS_INITOBJ(w); - . . . . . . . . . - 474 0 0 237 0 0 237 65 51 w->next = NULL; - 474 0 0 237 0 0 237 56 47 w->prev = NULL; - . . . . . . . . . - 474 0 0 237 0 0 237 106 88 w->mapNum = 0; - 474 0 0 237 0 0 237 0 0 w->activeNum = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->frame = None; - 474 18 3 237 0 0 237 0 0 w->frameLock = FALSE; - 474 0 0 237 0 0 237 0 0 w->isFrameWin = FALSE; - . . . . . . . . . - 474 0 0 237 0 0 237 235 191 w->placed = FALSE; - 474 0 0 237 0 0 237 0 0 w->minimized = FALSE; - 474 0 0 237 0 0 237 0 0 w->inShowDesktopMode = FALSE; - 474 18 2 237 0 0 237 0 0 w->shaded = FALSE; - 474 0 0 237 0 0 237 57 48 w->hidden = FALSE; - . . . . . . . . . - . . . . . . . . . // optional variables - 474 0 0 237 0 0 237 0 0 w->texCoordSize = 2; // default: only S and T (no R or Q coordinate) - 474 0 0 237 0 0 237 0 0 w->indexCount = 0; - . . . . . . . . . - 474 12 3 237 0 0 237 0 0 w->desktop = 0xffffffff; - . . . . . . . . . - 1,185 0 0 711 7 0 237 59 48 w->initialViewportX = screen->x; - 1,185 0 0 711 0 0 237 0 0 w->initialViewportY = screen->y; - . . . . . . . . . - 474 0 0 237 0 0 237 52 43 w->pendingUnmaps = 0; - 474 12 3 237 0 0 237 0 0 w->pendingMaps = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->startupId = NULL; - 474 0 0 237 0 0 237 68 52 w->resName = NULL; - 474 0 0 237 0 0 237 0 0 w->resClass = NULL; - . . . . . . . . . - 1,185 8 3 474 0 0 474 236 191 w->texture = createTexture(screen); - 948 0 0 474 0 0 0 0 0 if (!w->texture) - . . . . . . . . . { - . . . . . . . . . free(w); - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . // we get damage events for windows - 1,185 0 0 711 0 0 0 0 0 if (w->texture->mode == TEXTURE_MODE_COPY) - . . . . . . . . . w->texture->mode = TEXTURE_MODE_COPY_DAMAGE; - . . . . . . . . . - 711 99 3 474 0 0 237 0 0 w->screen = screen; - 474 0 0 237 0 0 237 0 0 w->pixmap = None; - 474 0 0 237 0 0 237 68 52 w->destroyed = FALSE; - 474 0 0 237 0 0 237 0 0 w->damaged = FALSE; - 474 12 3 237 0 0 237 0 0 w->redirected = TRUE; - 474 0 0 237 0 0 237 0 0 w->managed = FALSE; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->destroyRefCnt = 1; - 474 0 0 237 0 0 237 0 0 w->unmapRefCnt = 1; - . . . . . . . . . - 474 12 2 237 0 0 237 59 48 w->group = NULL; - . . . . . . . . . - 474 0 0 237 0 0 237 236 191 w->damageRects = 0; - 474 0 0 237 0 0 237 0 0 w->sizeDamage = 0; - 474 0 0 237 0 0 237 0 0 w->nDamage = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->vertices = 0; - 474 11 3 237 0 0 237 0 0 w->vertexSize = 0; - 474 0 0 237 0 0 237 0 0 w->indices = 0; - 474 0 0 237 0 0 237 0 0 w->indexSize = 0; - 474 0 0 237 0 0 237 0 0 w->vCount = 0; - . . . . . . . . . - 474 113 3 237 0 0 237 236 191 w->struts = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 68 52 w->icon = 0; - 474 0 0 237 0 0 237 0 0 w->nIcon = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 109 91 w->input.left = 0; - 474 8 3 237 0 0 237 0 0 w->input.right = 0; - 474 0 0 237 0 0 237 0 0 w->input.top = 0; - 474 0 0 237 0 0 237 0 0 w->input.bottom = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->output.left = 0; - 474 0 0 237 0 0 237 0 0 w->output.right = 0; - 474 8 3 237 0 0 237 0 0 w->output.top = 0; - 474 0 0 237 0 0 237 0 0 w->output.bottom = 0; - . . . . . . . . . - 1,422 0 0 948 0 0 474 0 0 w->paint.opacity = w->opacity = OPAQUE; - 1,422 9 3 948 0 0 474 0 0 w->paint.brightness = w->brightness = 0xffff; - 1,422 0 0 948 0 0 474 0 0 w->paint.saturation = w->saturation = COLOR; - 711 8 3 237 0 0 237 0 0 w->paint.xScale = 1.0f; - 711 0 0 237 0 0 237 0 0 w->paint.yScale = 1.0f; - 711 0 0 237 0 0 237 0 0 w->paint.xTranslate = 0.0f; - 711 0 0 237 0 0 237 0 0 w->paint.yTranslate = 0.0f; - . . . . . . . . . - 1,896 12 3 1,185 0 0 711 0 0 w->lastPaint = w->paint; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->alive = TRUE; - . . . . . . . . . - 474 12 3 237 0 0 237 52 43 w->mwmDecor = MwmDecorAll; - 474 0 0 237 0 0 237 0 0 w->mwmFunc = MwmFuncAll; - . . . . . . . . . - 474 0 0 237 0 0 237 235 191 w->syncAlarm = None; - 474 0 0 237 0 0 237 59 48 w->syncCounter = 0; - 474 12 3 237 0 0 237 0 0 w->syncWaitHandle = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->closeRequests = 0; - 474 0 0 237 0 0 237 0 0 w->lastCloseRequestTime = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->wasMaximizedHorz = FALSE; - 474 0 0 237 0 0 237 0 0 w->wasMaximizedVert = FALSE; - 474 18 2 237 0 0 237 0 0 w->setupComplete = FALSE; - . . . . . . . . . - 948 0 0 474 0 0 0 0 0 if (screen->windowPrivateLen) - . . . . . . . . . { - 136 0 0 51 0 0 34 0 0 w->privates = malloc(screen->windowPrivateLen * sizeof(CompPrivate)); - 68 9 2 34 0 0 0 0 0 if (!w->privates) - . . . . . . . . . { - . . . . . . . . . destroyTexture(screen, w->texture); - . . . . . . . . . free(w); - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - 440 3 1 220 0 0 220 0 0 w->privates = 0; - . . . . . . . . . - 948 10 3 237 0 0 474 116 96 w->region = XCreateRegion(); - 948 0 0 474 0 0 0 0 0 if (!w->region) - . . . . . . . . . { - . . . . . . . . . freeWindow(w); - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . - 948 0 0 237 0 0 474 0 0 w->clip = XCreateRegion(); - 948 9 3 474 0 0 0 0 0 if (!w->clip) - . . . . . . . . . { - . . . . . . . . . freeWindow(w); - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* Failure means that window has been destroyed. We still have to add the - . . . . . . . . . window to the window list as we might get configure requests which - . . . . . . . . . require us to stack other windows relative to it. Setting some default - . . . . . . . . . values if this is the case. */ - 2,133 0 0 1,185 2 0 237 0 0 if (!XGetWindowAttributes(screen->display->display, id, &w->attrib)) - 6 2 0 2 1 0 2 0 0 setDefaultWindowAttributes(&w->attrib); - . . . . . . . . . - 948 10 2 711 0 0 237 58 47 w->serverWidth = w->attrib.width; - 948 0 0 711 0 0 237 0 0 w->serverHeight = w->attrib.height; - 948 0 0 711 0 0 237 0 0 w->serverBorderWidth = w->attrib.border_width; - . . . . . . . . . - 1,896 106 3 1,185 0 0 237 1 0 w->width = w->attrib.width + w->attrib.border_width * 2; - 1,896 0 0 1,185 0 0 237 0 0 w->height = w->attrib.height + w->attrib.border_width * 2; - . . . . . . . . . - 474 115 2 237 0 0 237 109 91 w->sizeHints.flags = 0; - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 recalcNormalHints(w); - . . . . . . . . . - 474 0 0 237 0 0 237 0 0 w->transientFor = None; - 474 0 0 237 0 0 237 0 0 w->clientLeader = None; - . . . . . . . . . - 948 0 0 711 0 0 237 0 0 w->serverX = w->attrib.x; - 948 228 3 711 0 0 237 0 0 w->serverY = w->attrib.y; - . . . . . . . . . - 474 0 0 237 0 0 237 1 0 w->syncWait = FALSE; - 948 0 0 711 0 0 237 0 0 w->syncX = w->attrib.x; - 948 0 0 711 0 0 237 0 0 w->syncY = w->attrib.y; - 948 106 3 711 0 0 237 0 0 w->syncWidth = w->attrib.width; - 948 0 0 711 0 0 237 0 0 w->syncHeight = w->attrib.height; - 948 0 0 711 0 0 237 1 0 w->syncBorderWidth = w->attrib.border_width; - . . . . . . . . . - 474 0 0 237 0 0 237 1 0 w->saveMask = 0; - . . . . . . . . . - 1,422 10 2 948 3 0 237 0 0 XSelectInput(screen->display->display, id, - . . . . . . . . . PropertyChangeMask | EnterWindowMask | FocusChangeMask); - . . . . . . . . . - 711 0 0 474 0 0 237 0 0 w->id = id; - . . . . . . . . . - 3,318 11 3 1,185 0 0 1,185 0 0 XGrabButton(screen->display->display, AnyButton, - . . . . . . . . . AnyModifier, w->id, TRUE, ButtonPressMask | - . . . . . . . . . ButtonReleaseMask | ButtonMotionMask, - . . . . . . . . . GrabModeSync, GrabModeSync, None, None); - . . . . . . . . . - 474 75 3 237 0 0 237 0 0 w->inputHint = TRUE; - 1,659 0 0 711 0 0 237 0 0 w->alpha = (w->attrib.depth == 32); - 474 0 0 237 0 0 237 1 0 w->wmType = 0; - 474 0 0 237 0 0 237 0 0 w->state = 0; - 474 77 3 237 0 0 237 0 0 w->actions = 0; - 474 0 0 237 0 0 237 0 0 w->protocols = 0; - 474 0 0 237 0 0 237 0 0 w->type = CompWindowTypeUnknownMask; - 1,185 0 0 948 18 0 237 1 0 w->lastPong = screen->display->lastPing; - . . . . . . . . . - 1,185 8 3 711 2 0 0 0 0 if (screen->display->shapeExtension) - 1,422 0 0 948 0 0 237 0 0 XShapeSelectInput(screen->display->display, id, ShapeNotifyMask); - . . . . . . . . . - 948 0 0 711 1 0 237 0 0 insertWindowIntoScreen(screen, w, aboveId); - . . . . . . . . . - 711 11 2 474 91 0 237 16 0 EMPTY_REGION(w->region); - . . . . . . . . . - 948 0 0 474 13 0 0 0 0 if (w->attrib.class != InputOnly) - . . . . . . . . . { - . . . . . . . . . REGION rect; - . . . . . . . . . - 675 0 0 0 0 0 225 0 0 rect.rects = &rect.extents; - 675 0 0 225 0 0 450 6 0 rect.numRects = rect.size = 1; - . . . . . . . . . - 675 0 0 450 4 0 225 0 0 rect.extents.x1 = w->attrib.x; - 675 8 2 450 0 0 225 0 0 rect.extents.y1 = w->attrib.y; - 1,575 0 0 900 0 0 225 0 0 rect.extents.x2 = w->attrib.x + w->width; - 1,575 0 0 900 0 0 225 0 0 rect.extents.y2 = w->attrib.y + w->height; - . . . . . . . . . - 1,350 10 2 900 0 0 225 0 0 XUnionRegion(&rect, w->region, w->region); - . . . . . . . . . - 2,025 8 2 1,125 0 0 450 0 0 w->damage = XDamageCreate(screen->display->display, id, - . . . . . . . . . XDamageReportRawRectangles); - . . . . . . . . . - . . . . . . . . . /* need to check for DisplayModal state on all windows */ - 2,025 0 0 1,350 0 0 450 2 0 w->state = getWindowState(w->screen->display, w->id); - . . . . . . . . . - 1,800 13 1 675 0 0 225 24 0 w->wasMaximizedHorz = - . . . . . . . . . (w->state & CompWindowStateMaximizedHorzMask) ? True : False; - 1,800 0 0 675 0 0 225 3 0 w->wasMaximizedVert = - . . . . . . . . . (w->state & CompWindowStateMaximizedVertMask) ? True : False; - . . . . . . . . . - 675 0 0 225 0 0 225 0 0 updateWindowClassHints(w); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 24 11 2 12 0 0 12 2 0 w->damage = None; - 24 11 2 12 0 0 12 0 0 w->attrib.map_state = IsUnmapped; - . . . . . . . . . } - . . . . . . . . . - 474 16 1 237 0 0 237 5 0 w->invisible = TRUE; - . . . . . . . . . - 2,133 0 0 1,422 1 0 474 1 0 w->wmType = getWindowType(w->screen->display, w->id); - 2,133 11 3 1,422 1 0 474 0 0 w->protocols = getProtocols(w->screen->display, w->id); - . . . . . . . . . - 948 0 0 474 17 0 0 0 0 if (!w->attrib.override_redirect) - . . . . . . . . . { - 208 0 0 104 0 0 104 0 0 updateNormalHints(w); - 208 88 2 104 0 0 104 0 0 updateWindowStruts(w); - 208 0 0 104 0 0 104 0 0 updateWmHints(w); - 208 0 0 104 0 0 104 0 0 updateTransientHint(w); - . . . . . . . . . - 520 0 0 208 0 0 208 0 0 w->clientLeader = getClientLeader(w); - 416 0 0 208 0 0 0 0 0 if (!w->clientLeader) - 25 1 1 10 0 0 10 0 0 w->startupId = getStartupId(w); - . . . . . . . . . - 208 4 1 104 0 0 104 0 0 recalcWindowType(w); - . . . . . . . . . - 1,040 89 2 728 0 0 104 0 0 getMwmHints(w->screen->display, w->id, &w->mwmFunc, &w->mwmDecor); - . . . . . . . . . - 208 0 0 104 0 0 104 0 0 recalcWindowActions(w); - . . . . . . . . . - 520 0 0 208 0 0 0 0 0 if (!(w->type & (CompWindowTypeDesktopMask | CompWindowTypeDockMask))) - . . . . . . . . . { - . . . . . . . . . unsigned int desktop; - . . . . . . . . . - 1,414 6 2 1,212 0 0 202 0 0 desktop = getWindowProp(w->screen->display, w->id, - . . . . . . . . . w->screen->display-> - . . . . . . . . . winDesktopAtom, - . . . . . . . . . w->screen->currentDesktop); - 505 0 0 404 0 0 0 0 0 if (desktop < w->screen->nDesktop) - 300 0 0 200 0 0 100 3 0 w->desktop = desktop; - . . . . . . . . . - 505 13 2 202 0 0 0 0 0 if (!(w->type & CompWindowTypeDesktopMask)) - 1,414 101 1 1,010 46 0 202 2 0 w->opacity = - . . . . . . . . . getWindowProp32(w->screen->display, - . . . . . . . . . w->id, - . . . . . . . . . w->screen->display-> - . . . . . . . . . winOpacityAtom, OPAQUE); - . . . . . . . . . } - . . . . . . . . . - 1,456 105 3 1,040 2 1 208 0 0 w->brightness = - . . . . . . . . . getWindowProp32(w->screen->display, w->id, - . . . . . . . . . w->screen->display->winBrightnessAtom, - . . . . . . . . . BRIGHT); - . . . . . . . . . - 416 0 0 208 0 0 0 0 0 if (w->alive) - . . . . . . . . . { - 416 0 0 312 0 0 104 0 0 w->paint.opacity = w->opacity; - 416 8 2 312 0 0 104 0 0 w->paint.brightness = w->brightness; - . . . . . . . . . } - . . . . . . . . . - 520 0 0 312 12 0 0 0 0 if (w->screen->canDoSaturated) - . . . . . . . . . { - 1,456 65 1 1,040 0 0 208 0 0 w->saturation = - . . . . . . . . . getWindowProp32(w->screen->display, w->id, - . . . . . . . . . w->screen->display-> - . . . . . . . . . winSaturationAtom, COLOR); - 416 0 0 208 0 0 0 0 0 if (w->alive) - 520 0 0 312 0 0 104 0 0 w->paint.saturation = w->saturation; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 266 2 2 133 0 0 133 0 0 recalcWindowType(w); - . . . . . . . . . } - . . . . . . . . . - 948 11 3 474 1 0 0 0 0 if (w->attrib.map_state == IsViewable) - . . . . . . . . . { - 4 0 0 2 0 0 2 0 0 w->attrib.map_state = IsUnmapped; - . . . . . . . . . - 8 0 0 4 0 0 0 0 0 if (!w->attrib.override_redirect) - . . . . . . . . . { - 4 0 0 2 0 0 2 0 0 w->managed = TRUE; - . . . . . . . . . - 10 4 1 4 0 0 0 0 0 if (w-> - . . . . . . . . . wmType & (CompWindowTypeDockMask | CompWindowTypeDesktopMask)) - 6 0 0 2 0 0 2 0 0 setDesktopForWindow(w, 0xffffffff); - . . . . . . . . . - 8 0 0 4 0 0 0 0 0 if (w->desktop != 0xffffffff) - . . . . . . . . . w->desktop = w->screen->currentDesktop; - . . . . . . . . . - 24 1 1 22 0 0 2 0 0 setWindowProp(w->screen->display, w->id, - . . . . . . . . . w->screen->display->winDesktopAtom, w->desktop); - . . . . . . . . . } - 10 1 1 6 0 0 2 0 0 w->pendingMaps++; - . . . . . . . . . - 4 0 0 2 0 0 2 0 0 mapWindow(w); - . . . . . . . . . - 8 0 0 2 1 0 2 0 0 updateWindowAttributes(w, FALSE); - . . . . . . . . . } - 940 4 2 470 0 0 0 0 0 else if (!w->attrib.override_redirect) - . . . . . . . . . { - 714 7 2 408 0 0 102 0 0 if (getWmState(screen->display, w->id) == IconicState) - . . . . . . . . . { - . . . . . . . . . w->managed = TRUE; - . . . . . . . . . - . . . . . . . . . if (w->state & CompWindowStateHiddenMask) - . . . . . . . . . { - . . . . . . . . . if (w->state & CompWindowStateShadedMask) - . . . . . . . . . w->shaded = TRUE; - . . . . . . . . . else - . . . . . . . . . w->minimized = TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 474 7 3 237 0 0 237 0 0 windowInitPlugins(w); - . . . . . . . . . - 948 0 0 474 4 0 0 0 0 if (w->shaded) - . . . . . . . . . resizeWindow(w, - . . . . . . . . . w->attrib.x, w->attrib.y, - . . . . . . . . . w->attrib.width, ++w->attrib.height - 1, - . . . . . . . . . w->attrib.border_width); - . . . . . . . . . - 474 88 3 237 0 0 237 7 0 w->setupComplete = True; - 948 0 0 474 0 0 237 0 0 setWindowFrameExtents(w, &w->input); - 474 0 0 474 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void removeWindow(CompWindow * w) - 16 2 0 0 0 0 8 0 0 { - 16 0 0 12 0 0 4 0 0 unhookWindowFromScreen(w->screen, w); - . . . . . . . . . - 16 2 1 8 3 0 0 0 0 if (w->attrib.map_state == IsViewable && w->damaged) - . . . . . . . . . { - . . . . . . . . . if (w->type == CompWindowTypeDesktopMask) - . . . . . . . . . w->screen->desktopWindowCount--; - . . . . . . . . . - . . . . . . . . . if (w->struts) - . . . . . . . . . updateWorkareaForScreen(w->screen); - . . . . . . . . . } - . . . . . . . . . - 12 2 1 8 0 0 4 0 0 updateClientListForScreen(w->screen); - . . . . . . . . . - 16 0 0 8 4 0 0 0 0 if (!w->redirected) - . . . . . . . . . { - . . . . . . . . . w->screen->overlayWindowCount--; - . . . . . . . . . if (w->screen->overlayWindowCount < 1) - . . . . . . . . . showOutputWindow (w->screen); - . . . . . . . . . } - . . . . . . . . . - 8 0 0 4 0 0 4 0 0 windowFiniPlugins(w); - . . . . . . . . . - 8 0 0 4 0 0 4 0 0 freeWindow(w); - 8 0 0 8 4 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void destroyWindow(CompWindow * w) - 28 7 2 0 0 0 14 0 0 { - 28 0 0 21 0 0 7 0 0 CompWindow *fw = w->screen->windows; - . . . . . . . . . - 8,241 4 1 4,939 427 0 1,644 0 0 for (; fw; fw = fw->next) - 9,864 0 0 6,576 917 0 0 0 0 if (fw->frame == w->id) - . . . . . . . . . { - . . . . . . . . . fw->frame = None; - . . . . . . . . . fw->frameLock = FALSE; - . . . . . . . . . CompWindowExtents fe; - . . . . . . . . . - . . . . . . . . . fe.top = fe.bottom = fe.left = fe.right = 0; - . . . . . . . . . setWindowFrameExtents(fw, &fe); - . . . . . . . . . } - 14 4 1 7 0 0 7 0 0 w->id = 1; - 14 0 0 7 0 0 7 0 0 w->mapNum = 0; - . . . . . . . . . - 35 0 0 21 6 0 7 0 0 w->destroyRefCnt--; - 28 0 0 14 0 0 0 0 0 if (w->destroyRefCnt) - . . . . . . . . . return; - . . . . . . . . . - 16 1 0 8 2 0 0 0 0 if (!w->destroyed) - . . . . . . . . . { - 8 0 0 4 0 0 4 0 0 w->destroyed = TRUE; - 20 0 0 12 2 0 4 0 0 w->screen->pendingDestroys++; - . . . . . . . . . } - 14 3 1 14 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void sendConfigureNotify(CompWindow * w) - . . . . . . . . . { - . . . . . . . . . XConfigureEvent xev; - . . . . . . . . . - . . . . . . . . . xev.type = ConfigureNotify; - . . . . . . . . . xev.event = w->id; - . . . . . . . . . xev.window = w->id; --- line 2109 ---------------------------------------- --- line 2148 ---------------------------------------- - . . . . . . . . . xev.override_redirect = w->attrib.override_redirect; - . . . . . . . . . - . . . . . . . . . XSendEvent(w->screen->display->display, w->id, FALSE, - . . . . . . . . . StructureNotifyMask, (XEvent *) & xev); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void mapWindow(CompWindow * w) - 44 5 3 0 0 0 22 0 0 { - 44 0 0 22 4 0 0 0 0 if (w->attrib.map_state == IsViewable) - . . . . . . . . . return; - . . . . . . . . . - 55 5 3 33 7 0 11 0 0 w->pendingMaps--; - . . . . . . . . . - 77 0 0 44 10 0 22 0 0 w->mapNum = w->screen->mapNum++; - . . . . . . . . . - 44 0 0 22 4 0 0 0 0 if (w->attrib.class == InputOnly) - . . . . . . . . . return; - . . . . . . . . . - 6 3 2 3 0 0 3 0 0 w->unmapRefCnt = 1; - . . . . . . . . . - 6 0 0 3 0 0 3 0 0 w->attrib.map_state = IsViewable; - . . . . . . . . . - 12 0 0 6 0 0 0 0 0 if (!w->attrib.override_redirect) - 21 3 2 15 0 0 3 0 0 setWmState(w->screen->display, NormalState, w->id); - . . . . . . . . . - 6 0 0 3 0 0 3 0 0 w->invisible = TRUE; - 6 0 0 3 0 0 3 0 0 w->damaged = FALSE; - 6 0 0 3 0 0 3 0 0 w->alive = TRUE; - . . . . . . . . . - 18 3 2 15 2 0 3 0 0 w->lastPong = w->screen->display->lastPing; - . . . . . . . . . - 6 0 0 3 0 0 3 0 0 updateWindowRegion(w); - 6 0 0 3 2 0 3 0 0 updateWindowSize(w); - . . . . . . . . . - 12 0 0 6 0 0 0 0 0 if (w->frame) - . . . . . . . . . XMapWindow(w->screen->display->display, w->frame); - . . . . . . . . . - 12 3 2 6 2 0 0 0 0 if (w->struts) - 3 0 0 2 0 0 1 0 0 updateWorkareaForScreen(w->screen); - . . . . . . . . . - 9 0 0 6 0 0 3 0 0 updateClientListForScreen(w->screen); - . . . . . . . . . - 15 0 0 6 1 0 0 0 0 if (w->type & CompWindowTypeDesktopMask) - 5 1 1 3 0 0 1 0 0 w->screen->desktopWindowCount++; - . . . . . . . . . - 15 2 1 6 1 0 0 0 0 if (w->protocols & CompWindowProtocolSyncRequestMask) - . . . . . . . . . { - . . . . . . . . . /* override_redirect windows and _NET_WM_SYNC_REQUEST - . . . . . . . . . protocol is causing issues. Avoid sending sync requests to - . . . . . . . . . override_redirect windows until this is solved. */ - . . . . . . . . . if (!w->attrib.override_redirect) - . . . . . . . . . { - . . . . . . . . . sendSyncRequest(w); - . . . . . . . . . sendConfigureNotify(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 12 3 2 6 0 0 0 0 0 if (!w->attrib.override_redirect) - . . . . . . . . . { - . . . . . . . . . /* been shaded */ - 12 0 0 6 0 0 0 0 0 if (!w->height) - . . . . . . . . . resizeWindow(w, - . . . . . . . . . w->attrib.x, w->attrib.y, - . . . . . . . . . w->attrib.width, - . . . . . . . . . ++w->attrib.height - 1, w->attrib.border_width); - . . . . . . . . . } - 12 3 2 9 1 0 3 0 0 CompWindow *fw = w->screen->windows; - . . . . . . . . . - 6 3 1 3 0 0 3 0 0 w->isFrameWin = FALSE; - 1,179 0 0 705 67 0 234 0 0 for (; fw; fw = fw->next) - 1,404 0 0 936 139 0 0 0 0 if (fw->frame == w->id) - . . . . . . . . . w->isFrameWin = TRUE; - 22 2 0 22 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void unmapWindow(CompWindow * w) - 48 11 4 0 0 0 24 0 0 { - 48 0 0 24 1 0 0 0 0 if (w->mapNum) - . . . . . . . . . { - 16 0 0 8 0 0 0 0 0 if (w->frame && !w->shaded) - . . . . . . . . . XUnmapWindow(w->screen->display->display, w->frame); - . . . . . . . . . - 8 2 0 4 0 0 4 0 0 w->mapNum = 0; - . . . . . . . . . } - . . . . . . . . . - 60 4 1 36 3 0 12 0 0 w->unmapRefCnt--; - 48 0 0 24 0 0 0 0 0 if (w->unmapRefCnt > 0) - . . . . . . . . . return; - . . . . . . . . . - 20 2 2 10 3 0 0 0 0 if (w->attrib.map_state != IsViewable) - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . if (w->type == CompWindowTypeDesktopMask) - . . . . . . . . . w->screen->desktopWindowCount--; - . . . . . . . . . - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . - . . . . . . . . . w->attrib.map_state = IsUnmapped; --- line 2245 ---------------------------------------- --- line 2253 ---------------------------------------- - . . . . . . . . . w->attrib.x, w->attrib.y, - . . . . . . . . . w->attrib.width, ++w->attrib.height - 1, - . . . . . . . . . w->attrib.border_width); - . . . . . . . . . - . . . . . . . . . if (w->struts) - . . . . . . . . . updateWorkareaForScreen(w->screen); - . . . . . . . . . - . . . . . . . . . updateClientListForScreen(w->screen); - 24 3 1 24 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static int restackWindow(CompWindow * w, Window aboveId) - 85 6 2 0 0 0 51 0 0 { - 68 0 0 34 3 0 0 0 0 if (w->prev) - . . . . . . . . . { - 119 0 0 85 1 0 0 0 0 if (aboveId && aboveId == w->prev->id) - 16 0 0 0 0 0 8 0 0 return 0; - . . . . . . . . . } - . . . . . . . . . else if (aboveId == None) - . . . . . . . . . return 0; - . . . . . . . . . - 36 0 0 27 0 0 9 0 0 unhookWindowFromScreen(w->screen, w); - 45 0 0 36 0 0 9 0 0 insertWindowIntoScreen(w->screen, w, aboveId); - . . . . . . . . . - 27 0 0 18 0 0 9 0 0 updateClientListForScreen(w->screen); - . . . . . . . . . - 26 0 0 17 0 0 9 0 0 return 1; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . resizeWindow(CompWindow * w, - . . . . . . . . . int x, int y, int width, int height, int borderWidth) - 153 6 4 0 0 0 119 2 0 { - 204 3 2 153 5 0 0 0 0 if (w->attrib.width != width || - . . . . . . . . . w->attrib.height != height || w->attrib.border_width != borderWidth) - . . . . . . . . . { - . . . . . . . . . unsigned int pw, ph, actualWidth, actualHeight, ui; - . . . . . . . . . Pixmap pixmap = None; - . . . . . . . . . Window root; - . . . . . . . . . Status result; - . . . . . . . . . int i; - . . . . . . . . . --- line 2293 ---------------------------------------- --- line 2335 ---------------------------------------- - . . . . . . . . . (*w->screen->windowResizeNotify) (w); - . . . . . . . . . - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . - . . . . . . . . . w->invisible = WINDOW_INVISIBLE(w); - . . . . . . . . . - . . . . . . . . . updateFrameWindow(w); - . . . . . . . . . } - 136 3 2 102 0 0 0 0 0 else if (w->attrib.x != x || w->attrib.y != y) - . . . . . . . . . { - . . . . . . . . . int dx, dy; - . . . . . . . . . - . . . . . . . . . dx = x - w->attrib.x; - . . . . . . . . . dy = y - w->attrib.y; - . . . . . . . . . - . . . . . . . . . moveWindow(w, dx, dy, TRUE, TRUE); - . . . . . . . . . - . . . . . . . . . if (w->frame) - . . . . . . . . . XMoveWindow (w->screen->display->display, w->frame, - . . . . . . . . . w->attrib.x - w->input.left, - . . . . . . . . . w->attrib.y - w->input.top); - . . . . . . . . . } - . . . . . . . . . - 34 3 2 17 0 0 17 0 0 return TRUE; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void syncValueIncrement(XSyncValue * value) - . . . . . . . . . { - . . . . . . . . . XSyncValue one; - . . . . . . . . . int overflow; - . . . . . . . . . - . . . . . . . . . XSyncIntToValue(&one, 1); - . . . . . . . . . XSyncValueAdd(value, *value, one, &overflow); --- line 2367 ---------------------------------------- --- line 2475 ---------------------------------------- - . . . . . . . . . w->syncHeight = w->serverHeight; - . . . . . . . . . w->syncBorderWidth = w->serverBorderWidth; - . . . . . . . . . - . . . . . . . . . if (!w->syncWaitHandle) - . . . . . . . . . w->syncWaitHandle = compAddTimeout(1000, syncWaitTimeout, w); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void configureWindow(CompWindow * w, XConfigureEvent * ce) - 85 2 2 0 0 0 51 0 0 { - 68 0 0 34 12 0 0 0 0 if (w->syncWait) - . . . . . . . . . { - . . . . . . . . . w->syncX = ce->x; - . . . . . . . . . w->syncY = ce->y; - . . . . . . . . . w->syncWidth = ce->width; - . . . . . . . . . w->syncHeight = ce->height; - . . . . . . . . . w->syncBorderWidth = ce->border_width; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 68 4 2 34 13 0 0 0 0 if (ce->override_redirect) - . . . . . . . . . { - 60 0 0 45 13 0 15 11 0 w->serverX = ce->x; - 60 0 0 45 0 0 15 0 0 w->serverY = ce->y; - 60 2 0 45 0 0 15 0 0 w->serverWidth = ce->width; - 60 0 0 45 0 0 15 0 0 w->serverHeight = ce->height; - 60 0 0 45 0 0 15 0 0 w->serverBorderWidth = ce->border_width; - . . . . . . . . . } - . . . . . . . . . - 306 6 4 187 0 0 17 0 0 resizeWindow(w, ce->x, ce->y, ce->width, ce->height, - . . . . . . . . . ce->border_width); - . . . . . . . . . } - . . . . . . . . . - 68 0 0 51 0 0 17 3 0 w->attrib.override_redirect = ce->override_redirect; - . . . . . . . . . - 102 4 2 51 0 0 17 0 0 if (restackWindow(w, ce->above)) - 18 0 0 9 0 0 9 0 0 addWindowDamage(w); - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void circulateWindow(CompWindow * w, XCirculateEvent * ce) - . . . . . . . . . { - . . . . . . . . . Window newAboveId; - . . . . . . . . . - . . . . . . . . . if (ce->place == PlaceOnTop) - . . . . . . . . . newAboveId = getTopWindow(w->screen); - . . . . . . . . . else - . . . . . . . . . newAboveId = 0; - . . . . . . . . . - . . . . . . . . . if (restackWindow(w, newAboveId)) - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void moveWindow(CompWindow * w, int dx, int dy, Bool damage, Bool immediate) - 8 1 1 0 0 0 6 0 0 { - 4 1 1 2 0 0 0 0 0 if (dx || dy) - . . . . . . . . . { - . . . . . . . . . if (damage) - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . - . . . . . . . . . w->attrib.x += dx; - . . . . . . . . . w->attrib.y += dy; - . . . . . . . . . - . . . . . . . . . XOffsetRegion(w->region, dx, dy); --- line 2536 ---------------------------------------- --- line 2539 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . w->invisible = WINDOW_INVISIBLE(w); - . . . . . . . . . - . . . . . . . . . (*w->screen->windowMoveNotify) (w, dx, dy, immediate); - . . . . . . . . . - . . . . . . . . . if (damage) - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - 2 1 1 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void syncWindowPosition(CompWindow * w) - 4 0 0 0 0 0 2 0 0 { - 4 1 1 3 0 0 1 0 0 w->serverX = w->attrib.x; - 4 0 0 3 0 0 1 0 0 w->serverY = w->attrib.y; - . . . . . . . . . - 11 0 0 10 2 0 1 0 0 XMoveWindow(w->screen->display->display, w->id, w->attrib.x, w->attrib.y); - . . . . . . . . . - 4 1 1 2 0 0 0 0 0 if (w->frame && !w->frameLock) - . . . . . . . . . XMoveWindow(w->screen->display->display, w->frame, - . . . . . . . . . w->serverX - w->input.left, - . . . . . . . . . w->serverY - w->input.top); - . . . . . . . . . - 22 2 2 9 3 1 3 0 0 if (w->resName && strncmp(w->resName, "sun-awt-X11", 11) == 0) - . . . . . . . . . sendConfigureNotify(w); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool focusWindow(CompWindow * w) - 4,560 8 3 0 0 0 2,280 0 0 { - 6,520 0 0 3,260 1,198 0 0 0 0 if (w->attrib.override_redirect || !w->managed) - 2,270 0 0 0 0 0 1,135 0 0 return FALSE; - . . . . . . . . . - 20 0 0 5 0 0 5 1 0 if (!onCurrentDesktop(w)) - . . . . . . . . . return FALSE; - . . . . . . . . . - 45 4 2 20 0 0 0 0 0 if (!w->shaded && (w->state & CompWindowStateHiddenMask)) - . . . . . . . . . return FALSE; - . . . . . . . . . - 140 4 2 90 19 0 0 0 0 if (w->attrib.x + w->width <= 0 || - . . . . . . . . . w->attrib.y + w->height <= 0 || - . . . . . . . . . w->attrib.x >= w->screen->width || w->attrib.y >= w->screen->height) - . . . . . . . . . return FALSE; - . . . . . . . . . - 1,145 4 1 1,140 0 0 5 0 0 return TRUE; - 2,280 0 0 2,280 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void windowResizeNotify(CompWindow * w) - 6 2 1 0 0 0 4 0 0 { - 4 0 0 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void windowMoveNotify(CompWindow * w, int dx, int dy, Bool immediate) - . . . . . . . . . { - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . windowGrabNotify(CompWindow * w, - . . . . . . . . . int x, int y, unsigned int state, unsigned int mask) --- line 2594 ---------------------------------------- --- line 2595 ---------------------------------------- - . . . . . . . . . { - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void windowUngrabNotify(CompWindow * w) - . . . . . . . . . { - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void windowStateChangeNotify(CompWindow * w) - 24 6 1 0 0 0 16 0 0 { - 16 0 0 16 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool isGroupTransient(CompWindow * w, Window clientLeader) - 1,980 3 1 0 0 0 1,485 0 0 { - 990 0 0 495 0 0 0 0 0 if (!clientLeader) - . . . . . . . . . return FALSE; - . . . . . . . . . - 2,008 6 2 1,010 6 0 0 0 0 if (w->transientFor == None || w->transientFor == w->screen->root) - . . . . . . . . . { - 2,455 3 2 982 472 0 0 0 0 if (w->type & (CompWindowTypeDialogMask | - . . . . . . . . . CompWindowTypeModalDialogMask)) - . . . . . . . . . { - 8 0 0 6 0 0 0 0 0 if (w->clientLeader == clientLeader) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 990 0 0 495 0 0 495 1 0 return FALSE; - 990 0 0 990 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static CompWindow *getModalTransient(CompWindow * window) - 20 3 0 0 0 0 10 0 0 { - . . . . . . . . . CompWindow *w, *modalTransient; - . . . . . . . . . - 10 5 2 5 0 0 5 0 0 modalTransient = window; - . . . . . . . . . - 5,785 4 2 3,470 314 0 1,155 0 0 for (w = window->screen->reverseWindows; w; w = w->prev) - . . . . . . . . . { - 8,030 0 0 4,590 883 0 0 0 0 if (w == modalTransient || w->mapNum == 0) - . . . . . . . . . continue; - . . . . . . . . . - 162 0 0 108 26 0 0 0 0 if (w->transientFor == modalTransient->id) - . . . . . . . . . { - . . . . . . . . . if (w->state & CompWindowStateModalMask) - . . . . . . . . . { - . . . . . . . . . modalTransient = w; - . . . . . . . . . w = window->screen->reverseWindows; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 15 3 2 10 0 0 0 0 0 if (modalTransient == window) - . . . . . . . . . { - . . . . . . . . . /* don't look for group transients with modal state if current window - . . . . . . . . . has modal state */ - 25 0 0 10 2 0 0 0 0 if (window->state & CompWindowStateModalMask) - . . . . . . . . . return NULL; - . . . . . . . . . - 5,785 3 2 3,470 163 0 1,155 0 0 for (w = window->screen->reverseWindows; w; w = w->prev) - . . . . . . . . . { - 8,030 3 2 4,590 371 0 0 0 0 if (w == modalTransient || w->mapNum == 0) - . . . . . . . . . continue; - . . . . . . . . . - 135 0 0 54 0 0 27 0 0 if (isAncestorTo(modalTransient, w)) - . . . . . . . . . continue; - . . . . . . . . . - 162 0 0 81 0 0 27 0 0 if (isGroupTransient(w, modalTransient->clientLeader)) - . . . . . . . . . { - . . . . . . . . . if (w->state & CompWindowStateModalMask) - . . . . . . . . . { - . . . . . . . . . modalTransient = w; - . . . . . . . . . w = getModalTransient(w); - . . . . . . . . . if (w) - . . . . . . . . . modalTransient = w; - . . . . . . . . . - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 15 0 0 10 0 0 0 0 0 if (modalTransient == window) - 5 0 0 0 0 0 5 0 0 modalTransient = NULL; - . . . . . . . . . - 15 0 0 10 0 0 5 0 0 return modalTransient; - 10 0 0 10 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void moveInputFocusToWindow(CompWindow * w) - 35 6 4 5 5 0 15 1 0 { - 15 0 0 10 0 0 5 0 0 CompScreen *s = w->screen; - 15 0 0 10 0 0 5 0 0 CompDisplay *d = s->display; - . . . . . . . . . CompWindow *modalTransient; - . . . . . . . . . - 15 0 0 5 0 0 10 3 0 modalTransient = getModalTransient(w); - 10 3 2 5 0 0 0 0 0 if (modalTransient) - . . . . . . . . . w = modalTransient; - . . . . . . . . . - 25 0 0 10 2 0 0 0 0 if (w->state & CompWindowStateHiddenMask) - . . . . . . . . . { - . . . . . . . . . XSetInputFocus(d->display, w->frame, RevertToPointerRoot, - . . . . . . . . . CurrentTime); - . . . . . . . . . XChangeProperty(d->display, s->root, d->winActiveAtom, - . . . . . . . . . XA_WINDOW, 32, PropModeReplace, - . . . . . . . . . (unsigned char *)&w->id, 1); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 20 6 4 10 0 0 0 0 0 if (w->inputHint) - . . . . . . . . . { - 40 0 0 20 3 0 5 0 0 XSetInputFocus(d->display, w->id, - . . . . . . . . . RevertToPointerRoot, CurrentTime); - . . . . . . . . . } - . . . . . . . . . else if (w->protocols & CompWindowProtocolTakeFocusMask) - . . . . . . . . . { - . . . . . . . . . XEvent ev; - . . . . . . . . . - . . . . . . . . . ev.type = ClientMessage; - . . . . . . . . . ev.xclient.window = w->id; --- line 2711 ---------------------------------------- --- line 2729 ---------------------------------------- - . . . . . . . . . if (isAncestorTo(w, ancestor)) - . . . . . . . . . { - . . . . . . . . . moveInputFocusToWindow(ancestor); - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 25 4 2 20 2 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . stackLayerCheck(CompWindow * w, Window clientLeader, CompWindow * below) - . . . . . . . . . { - . . . . . . . . . if (w->transientFor == below->id) - . . . . . . . . . return TRUE; - . . . . . . . . . - . . . . . . . . . if (isAncestorTo(below, w)) --- line 2745 ---------------------------------------- --- line 2762 ---------------------------------------- - . . . . . . . . . { - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static Bool avoidStackingRelativeTo(CompWindow * w) - 1,374 3 2 0 0 0 916 0 0 { - 1,832 0 0 916 437 0 0 0 0 if (w->attrib.override_redirect) - 524 1 1 0 0 0 262 0 0 return TRUE; - . . . . . . . . . - 1,568 1 1 784 284 45 0 0 0 if (!w->shaded && !w->pendingMaps) - . . . . . . . . . { - 804 0 0 402 95 0 0 0 0 if (w->attrib.map_state != IsViewable || w->mapNum == 0) - 382 0 0 0 0 0 191 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . - 463 0 0 458 0 0 5 0 0 return FALSE; - 916 0 0 916 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . /* goes through the stack, top-down until we find a window we should - . . . . . . . . . stack above, normal windows can be stacked above fullscreen windows - . . . . . . . . . if aboveFs is TRUE. */ - . . . . . . . . . static CompWindow *findSiblingBelow(CompWindow * w, Bool aboveFs) - 20 3 2 0 0 0 12 0 0 { - . . . . . . . . . CompWindow *below; - 12 0 0 8 1 1 4 0 0 Window clientLeader = w->clientLeader; - 12 0 0 8 0 0 4 0 0 unsigned int type = w->type; - . . . . . . . . . unsigned int belowMask; - . . . . . . . . . - 8 3 2 4 0 0 0 0 0 if (aboveFs) - 2 0 0 0 0 0 1 0 0 belowMask = CompWindowTypeDockMask; - . . . . . . . . . else - 3 0 0 0 0 0 3 0 0 belowMask = CompWindowTypeDockMask | CompWindowTypeFullscreenMask; - . . . . . . . . . - . . . . . . . . . /* normal stacking of fullscreen windows with below state */ - 16 0 0 4 0 0 0 0 0 if ((type & CompWindowTypeFullscreenMask) && - . . . . . . . . . (w->state & CompWindowStateBelowMask)) - . . . . . . . . . type = CompWindowTypeNormalMask; - . . . . . . . . . - 36 4 2 16 0 0 4 0 0 if (w->transientFor || isGroupTransient(w, clientLeader)) - . . . . . . . . . clientLeader = None; - . . . . . . . . . - 2,323 4 2 1,393 270 0 463 0 0 for (below = w->screen->reverseWindows; below; below = below->prev) - . . . . . . . . . { - 3,218 3 2 1,382 0 0 458 0 0 if (below == w || avoidStackingRelativeTo(below)) - . . . . . . . . . continue; - . . . . . . . . . - . . . . . . . . . /* always above desktop windows */ - 25 0 0 10 4 0 0 0 0 if (below->type & CompWindowTypeDesktopMask) - 9 0 0 3 0 0 3 0 0 return below; - . . . . . . . . . - . . . . . . . . . /* always above ancestor */ - 10 1 1 4 0 0 2 0 0 if (isAncestorTo(w, below)) - . . . . . . . . . return below; - . . . . . . . . . - 18 0 0 8 0 0 2 0 0 switch (type) - . . . . . . . . . { - . . . . . . . . . case CompWindowTypeDesktopMask: - . . . . . . . . . /* desktop window layer */ - . . . . . . . . . break; - . . . . . . . . . case CompWindowTypeFullscreenMask: - . . . . . . . . . case CompWindowTypeDockMask: - . . . . . . . . . /* fullscreen and dock layer */ - . . . . . . . . . if (below->type & (CompWindowTypeFullscreenMask | --- line 2827 ---------------------------------------- --- line 2832 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . return below; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . default: - . . . . . . . . . /* fullscreen and normal layer */ - 10 1 1 6 0 0 0 0 0 if (!(below->type & belowMask)) - . . . . . . . . . { - . . . . . . . . . if (stackLayerCheck(w, clientLeader, below)) - . . . . . . . . . return below; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 5 0 0 4 0 0 1 0 0 return NULL; - 8 4 2 8 1 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . /* goes through the stack, top-down and returns the lowest window we - . . . . . . . . . can stack above. */ - . . . . . . . . . static CompWindow *findLowestSiblingBelow(CompWindow * w) - . . . . . . . . . { - . . . . . . . . . CompWindow *below, *lowest = w->screen->reverseWindows; - . . . . . . . . . Window clientLeader = w->clientLeader; - . . . . . . . . . unsigned int type = w->type; --- line 2858 ---------------------------------------- --- line 3017 ---------------------------------------- - . . . . . . . . . w->saveWc.height=MAXSHORT; - . . . . . . . . . } */ - . . . . . . . . . - . . . . . . . . . w->saveMask |= m; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static int - . . . . . . . . . restoreWindowGeometry(CompWindow * w, XWindowChanges * xwc, int mask) - 35 8 4 0 0 0 28 0 0 { - 28 0 0 21 3 1 7 0 0 int m = mask & w->saveMask; - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (m & CWX) - . . . . . . . . . { - . . . . . . . . . xwc->x = w->saveWc.x; - . . . . . . . . . if (xwc->x == MAXSHORT) - . . . . . . . . . xwc->x = w->attrib.x + 5; - . . . . . . . . . } - . . . . . . . . . - 28 4 2 7 0 0 0 0 0 if (m & CWY) - . . . . . . . . . { - . . . . . . . . . xwc->y = w->saveWc.y; - . . . . . . . . . if (xwc->y == MAXSHORT) - . . . . . . . . . xwc->y = w->attrib.y + 5; - . . . . . . . . . } - . . . . . . . . . - 28 4 2 7 0 0 0 0 0 if (m & CWWidth) - . . . . . . . . . { - . . . . . . . . . xwc->width = w->saveWc.width; - . . . . . . . . . if (xwc->width == MAXSHORT) - . . . . . . . . . xwc->width = w->serverWidth - 10; - . . . . . . . . . } - . . . . . . . . . - 28 3 2 7 0 0 0 0 0 if (m & CWHeight) - . . . . . . . . . { - . . . . . . . . . xwc->height = w->saveWc.height; - . . . . . . . . . if (xwc->height == MAXSHORT) - . . . . . . . . . xwc->height = w->serverHeight - 10; - . . . . . . . . . } - . . . . . . . . . - 28 3 2 7 0 0 0 0 0 if (m & CWBorderWidth) - . . . . . . . . . xwc->border_width = w->saveWc.border_width; - . . . . . . . . . - 49 0 0 28 0 0 7 0 0 w->saveMask &= ~mask; - . . . . . . . . . - 7 0 0 7 0 0 0 0 0 return m; - 14 0 0 14 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . configureXWindow(CompWindow * w, unsigned int valueMask, XWindowChanges * xwc) - 42 9 4 0 0 0 28 0 0 { - . . . . . . . . . XWindowChanges frameXwc; - . . . . . . . . . unsigned int frameValueMask; - . . . . . . . . . - 21 0 0 7 0 0 7 0 0 frameValueMask = valueMask & (CWX | CWY | CWSibling | CWStackMode); - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (valueMask & (CWSibling | CWStackMode)) - . . . . . . . . . { - 12 0 0 3 0 0 0 0 0 if (valueMask & CWSibling) - 9 0 0 6 0 0 3 0 0 frameXwc.sibling = xwc->sibling; - . . . . . . . . . - 12 2 2 3 0 0 0 0 0 if (valueMask & CWStackMode) - 9 0 0 6 0 0 3 0 0 frameXwc.stack_mode = xwc->stack_mode; - . . . . . . . . . } - . . . . . . . . . - 28 3 1 7 0 0 0 0 0 if (valueMask & CWX) - 4 0 0 3 0 0 1 0 0 w->serverX = xwc->x; - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (valueMask & CWY) - 4 0 0 3 0 0 1 0 0 w->serverY = xwc->y; - . . . . . . . . . - 28 4 3 7 0 0 0 0 0 if (valueMask & CWWidth) - 16 0 0 12 0 0 4 1 0 w->serverWidth = xwc->width; - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (valueMask & CWHeight) - 16 0 0 12 0 0 4 0 0 w->serverHeight = xwc->height; - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (valueMask & CWBorderWidth) - . . . . . . . . . w->serverBorderWidth = xwc->border_width; - . . . . . . . . . - 63 6 3 56 4 0 7 0 0 XConfigureWindow(w->screen->display->display, w->id, valueMask, xwc); - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (frameValueMask & CWX) - 8 1 1 4 1 1 1 0 0 frameXwc.x = xwc->x - w->input.left; - . . . . . . . . . - 28 4 2 7 0 0 0 0 0 if (frameValueMask & CWY) - 8 0 0 4 0 0 1 0 0 frameXwc.y = xwc->y - w->input.top; - . . . . . . . . . - 28 3 1 14 0 0 0 0 0 if (w->frame && frameValueMask) - . . . . . . . . . XConfigureWindow(w->screen->display->display, w->frame, - . . . . . . . . . frameValueMask, &frameXwc); - 14 0 0 14 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . stackTransients(CompWindow * w, CompWindow * avoid, XWindowChanges * xwc) - 18 4 3 0 0 0 12 0 0 { - . . . . . . . . . CompWindow *t; - 9 0 0 6 0 0 3 0 0 Window clientLeader = w->clientLeader; - . . . . . . . . . - 27 0 0 12 0 0 3 0 0 if (w->transientFor || isGroupTransient(w, clientLeader)) - . . . . . . . . . clientLeader = None; - . . . . . . . . . - 2,326 7 6 1,395 388 0 464 0 0 for (t = w->screen->reverseWindows; t; t = t->prev) - . . . . . . . . . { - 2,757 0 0 1,838 0 0 0 0 0 if (t == w || t == avoid) - . . . . . . . . . continue; - . . . . . . . . . - 5,038 2 2 2,748 438 161 458 0 0 if (t->transientFor == w->id || isGroupTransient(t, clientLeader)) - . . . . . . . . . { - . . . . . . . . . if (!stackTransients(t, avoid, xwc)) - . . . . . . . . . return FALSE; - . . . . . . . . . - . . . . . . . . . if (xwc->sibling == t->id) - . . . . . . . . . return FALSE; - . . . . . . . . . - . . . . . . . . . if (t->mapNum || t->pendingMaps) - . . . . . . . . . configureXWindow(t, CWSibling | CWStackMode, xwc); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 6 0 0 3 0 0 3 0 0 return TRUE; - 6 0 0 6 1 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void stackAncestors(CompWindow * w, XWindowChanges * xwc) - 15 0 0 0 0 0 9 0 0 { - 12 2 2 6 0 0 0 0 0 if (w->transientFor && xwc->sibling != w->transientFor) - . . . . . . . . . { - . . . . . . . . . CompWindow *ancestor; - . . . . . . . . . - . . . . . . . . . ancestor = findWindowAtScreen(w->screen, w->transientFor); - . . . . . . . . . if (ancestor) - . . . . . . . . . { - . . . . . . . . . if (!stackTransients(ancestor, w, xwc)) - . . . . . . . . . return; --- line 3149 ---------------------------------------- --- line 3152 ---------------------------------------- - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . if (ancestor->mapNum || ancestor->pendingMaps) - . . . . . . . . . configureXWindow(ancestor, CWSibling | CWStackMode, xwc); - . . . . . . . . . - . . . . . . . . . stackAncestors(ancestor, xwc); - . . . . . . . . . } - . . . . . . . . . } - 18 6 4 9 0 0 3 0 0 else if (isGroupTransient(w, w->clientLeader)) - . . . . . . . . . { - . . . . . . . . . CompWindow *a; - . . . . . . . . . - . . . . . . . . . for (a = w->screen->reverseWindows; a; a = a->prev) - . . . . . . . . . { - . . . . . . . . . if (a->clientLeader == w->clientLeader && - . . . . . . . . . a->transientFor == None && - . . . . . . . . . !isGroupTransient(a, w->clientLeader)) --- line 3168 ---------------------------------------- --- line 3176 ---------------------------------------- - . . . . . . . . . if (a->type & CompWindowTypeDesktopMask) - . . . . . . . . . continue; - . . . . . . . . . - . . . . . . . . . if (a->mapNum || a->pendingMaps) - . . . . . . . . . configureXWindow(a, CWSibling | CWStackMode, xwc); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 6 2 2 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . int restoreVertRestoreData(CompWindow * w, XWindowChanges * xwc) - . . . . . . . . . { - . . . . . . . . . Atom type; - . . . . . . . . . int fmt; - . . . . . . . . . unsigned long nitems, exbyte; - . . . . . . . . . long int *data; - . . . . . . . . . --- line 3192 ---------------------------------------- --- line 3236 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static int - . . . . . . . . . addWindowSizeChanges(CompWindow * w, - . . . . . . . . . XWindowChanges * xwc, - . . . . . . . . . int oldX, - . . . . . . . . . int oldY, - . . . . . . . . . int oldWidth, int oldHeight, int oldBorderWidth) - 63 8 4 0 0 0 49 0 0 { - 7 0 0 0 0 0 7 0 0 int mask = 0; - . . . . . . . . . int x, y; - . . . . . . . . . int vx, vy; - . . . . . . . . . int head; - . . . . . . . . . XRectangle outputRect, workArea; - . . . . . . . . . - 28 0 0 7 0 0 7 0 0 defaultViewportForWindow(w, &vx, &vy); - . . . . . . . . . - 70 0 0 49 0 0 7 0 0 x = (vx - w->screen->x) * w->screen->width; - 70 4 2 49 0 0 7 0 0 y = (vy - w->screen->y) * w->screen->height; - . . . . . . . . . - . . . . . . . . . // Some options should be added there for Complete Maximising and Complete Fullscreening - 21 0 0 7 0 0 14 0 0 head = screenGetOutputDevForWindow(w); - 35 0 0 21 0 0 7 0 0 screenGetOutputDevRect(w->screen, head, &outputRect); - 35 5 2 21 0 0 7 0 0 screenGetOutputDevWorkArea(w->screen, head, &workArea); - . . . . . . . . . - 35 0 0 14 2 0 0 0 0 if (w->type & CompWindowTypeFullscreenMask) - . . . . . . . . . { - . . . . . . . . . saveWindowGeometry(w, CWX | CWY | CWWidth | CWHeight | CWBorderWidth); - . . . . . . . . . /* - . . . . . . . . . xwc->width = w->screen->width; - . . . . . . . . . xwc->height = w->screen->height; - . . . . . . . . . xwc->border_width = 0; - . . . . . . . . . */ - . . . . . . . . . --- line 3269 ---------------------------------------- --- line 3270 ---------------------------------------- - . . . . . . . . . xwc->width = outputRect.width; - . . . . . . . . . xwc->height = outputRect.height; - . . . . . . . . . xwc->border_width = 0; - . . . . . . . . . - . . . . . . . . . mask |= CWWidth | CWHeight | CWBorderWidth; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 35 5 2 21 0 0 7 0 0 mask |= restoreWindowGeometry(w, xwc, - . . . . . . . . . CWX | CWY | CWWidth | - . . . . . . . . . CWHeight | CWBorderWidth); - . . . . . . . . . - 56 5 2 14 0 0 0 0 0 if (UNLIKELY(w->state & CompWindowStateMaximizedVertMask)) - . . . . . . . . . { - . . . . . . . . . if (w->setupComplete) - . . . . . . . . . { - . . . . . . . . . if (!w->wasMaximizedVert && w->setupComplete) - . . . . . . . . . saveVertRestoreData(w, NULL); - . . . . . . . . . - . . . . . . . . . xwc->height = - . . . . . . . . . workArea.height - w->input.top - --- line 3290 ---------------------------------------- --- line 3291 ---------------------------------------- - . . . . . . . . . w->input.bottom - oldBorderWidth * 2; - . . . . . . . . . - . . . . . . . . . mask |= CWHeight; - . . . . . . . . . w->wasMaximizedVert = True; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 28 4 2 14 0 0 0 0 0 if (w->wasMaximizedVert && w->setupComplete) - . . . . . . . . . { - . . . . . . . . . mask |= restoreVertRestoreData(w, xwc); - . . . . . . . . . w->wasMaximizedVert = False; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 56 5 2 14 0 0 0 0 0 if (UNLIKELY(w->state & CompWindowStateMaximizedHorzMask)) - . . . . . . . . . { - 12 0 0 6 0 0 0 0 0 if (w->setupComplete) - . . . . . . . . . { - 12 0 0 6 0 0 0 0 0 if (!w->wasMaximizedHorz) - . . . . . . . . . saveHorzRestoreData(w, NULL); - . . . . . . . . . - 42 3 1 21 3 1 3 0 0 xwc->width = workArea.width - - . . . . . . . . . (w->input.left + w->input.right + oldBorderWidth * 2); - . . . . . . . . . - 3 0 0 3 0 0 0 0 0 mask |= CWWidth; - 9 2 1 3 0 0 3 0 0 w->wasMaximizedHorz = True; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 16 2 1 8 0 0 0 0 0 if (w->wasMaximizedHorz && w->setupComplete) - . . . . . . . . . { - . . . . . . . . . mask |= restoreHorzRestoreData(w, xwc); - . . . . . . . . . w->wasMaximizedHorz = False; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* constrain window width if greater than maximum width */ - 52 4 2 23 0 0 0 0 0 if (!(mask & CWWidth) && w->serverWidth > w->sizeHints.max_width) - . . . . . . . . . { - . . . . . . . . . xwc->width = w->sizeHints.max_width; - . . . . . . . . . mask |= CWWidth; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* constrain window width if smaller than minimum width */ - 52 3 2 23 0 0 0 0 0 if (!(mask & CWWidth) && w->serverWidth < w->sizeHints.min_width) - . . . . . . . . . { - . . . . . . . . . xwc->width = w->sizeHints.min_width; - . . . . . . . . . mask |= CWWidth; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* constrain window height if greater than maximum height */ - 70 5 2 35 1 0 0 0 0 if (!(mask & CWHeight) && w->serverHeight > w->sizeHints.max_height) - . . . . . . . . . { - . . . . . . . . . xwc->height = w->sizeHints.max_height; - . . . . . . . . . mask |= CWHeight; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* constrain window height if smaller than minimum height */ - 70 3 2 35 0 0 0 0 0 if (!(mask & CWHeight) && w->serverHeight < w->sizeHints.min_height) - . . . . . . . . . { - . . . . . . . . . xwc->height = w->sizeHints.min_height; - . . . . . . . . . mask |= CWHeight; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 28 0 0 7 0 0 0 0 0 if (mask & (CWWidth | CWHeight)) - . . . . . . . . . { - 15 2 1 6 0 0 0 0 0 if (w->type & CompWindowTypeFullscreenMask) - . . . . . . . . . { - . . . . . . . . . // xwc->x = x; - . . . . . . . . . // xwc->y = 0; - . . . . . . . . . xwc->x = outputRect.x; - . . . . . . . . . xwc->y = outputRect.y; - . . . . . . . . . - . . . . . . . . . mask |= CWX | CWY; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . int width, height, max; - . . . . . . . . . - 30 2 1 12 0 0 6 0 0 width = (mask & CWWidth) ? xwc->width : oldWidth; - 24 0 0 9 0 0 6 0 0 height = (mask & CWHeight) ? xwc->height : oldHeight; - . . . . . . . . . - 9 0 0 6 0 0 3 0 0 xwc->width = oldWidth; - 9 3 1 6 0 0 3 0 0 xwc->height = oldHeight; - . . . . . . . . . - 27 0 0 9 0 0 3 0 0 if (constrainNewWindowSize(w, width, height, &width, &height)) - . . . . . . . . . { - . . . . . . . . . xwc->width = width; - . . . . . . . . . xwc->height = height; - . . . . . . . . . } - . . . . . . . . . else - 3 0 0 3 0 0 0 0 0 mask &= ~(CWWidth | CWHeight); - . . . . . . . . . - 15 3 1 6 0 0 0 0 0 if (w->state & CompWindowStateMaximizedVertMask) - . . . . . . . . . { - . . . . . . . . . // if (w->attrib.y < w->screen->workArea.y + w->input.top) - . . . . . . . . . if (oldY < y + workArea.y + w->input.top) - . . . . . . . . . { - . . . . . . . . . xwc->y = y + workArea.y + w->input.top; - . . . . . . . . . mask |= CWY; - . . . . . . . . . } - . . . . . . . . . else --- line 3395 ---------------------------------------- --- line 3408 ---------------------------------------- - . . . . . . . . . (workArea.height - - . . . . . . . . . w->input.top - - . . . . . . . . . height - w->input.bottom) / 2 + w->input.top; - . . . . . . . . . mask |= CWY; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 15 2 1 6 0 0 0 0 0 if (w->state & CompWindowStateMaximizedHorzMask) - . . . . . . . . . { - 27 2 1 15 0 0 0 0 0 if (oldX < x + workArea.x + w->input.left) - . . . . . . . . . { - . . . . . . . . . xwc->x = x + workArea.x + w->input.left; - . . . . . . . . . mask |= CWX; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 18 2 1 9 0 0 3 0 0 width = xwc->width + oldBorderWidth * 2; - . . . . . . . . . - 24 0 0 9 0 0 3 0 0 max = x + workArea.x + workArea.width; - 24 0 0 15 0 0 0 0 0 if (oldX + oldWidth + w->input.right > max) - . . . . . . . . . { - . . . . . . . . . xwc->x = max - width - w->input.right; - . . . . . . . . . mask |= CWX; - . . . . . . . . . } - 24 2 1 15 0 0 0 0 0 else if (oldX + width + w->input.right > max) - . . . . . . . . . { - . . . . . . . . . xwc->x = x + workArea.x + - . . . . . . . . . (workArea.width - - . . . . . . . . . w->input.left - - . . . . . . . . . width - w->input.right) / 2 + w->input.left; - . . . . . . . . . mask |= CWX; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 7 4 2 7 0 0 0 0 0 return mask; - 14 0 0 14 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . moveResizeWindow(CompWindow * w, - . . . . . . . . . XWindowChanges * xwc, unsigned int xwcm, int gravity) - . . . . . . . . . { - . . . . . . . . . Bool placed = xwcm & (CWX | CWY); - . . . . . . . . . - . . . . . . . . . xwcm &= (CWX | CWY | CWWidth | CWHeight | CWBorderWidth); --- line 3455 ---------------------------------------- --- line 3606 ---------------------------------------- - . . . . . . . . . if (placed) - . . . . . . . . . w->placed = TRUE; - . . . . . . . . . - . . . . . . . . . if (w->resName && strncmp(w->resName, "sun-awt-X11", 11) == 0) - . . . . . . . . . sendConfigureNotify(w); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void updateWindowSize(CompWindow * w) - 12 6 4 0 0 0 6 0 0 { - . . . . . . . . . XWindowChanges xwc; - . . . . . . . . . int mask; - . . . . . . . . . - 24 0 0 12 2 0 0 0 0 if (w->attrib.override_redirect || !w->managed) - . . . . . . . . . return; - . . . . . . . . . - 63 5 3 33 0 0 9 0 0 mask = addWindowSizeChanges(w, &xwc, - . . . . . . . . . w->serverX, w->serverY, w->serverWidth, - . . . . . . . . . w->serverHeight, w->serverBorderWidth); - 6 0 0 3 0 0 0 0 0 if (mask) - . . . . . . . . . { - . . . . . . . . . if (w->mapNum && (mask & (CWWidth | CWHeight))) - . . . . . . . . . sendSyncRequest(w); - . . . . . . . . . - . . . . . . . . . configureXWindow(w, mask, &xwc); - . . . . . . . . . } - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static int - . . . . . . . . . addWindowStackChanges(CompWindow * w, - . . . . . . . . . XWindowChanges * xwc, CompWindow * sibling) - 24 6 3 0 0 0 16 0 0 { - 4 0 0 0 0 0 4 0 0 int mask = 0; - . . . . . . . . . - 26 0 0 16 2 0 0 0 0 if (!sibling || sibling->id != w->id) - . . . . . . . . . { - 16 4 2 8 0 0 0 0 0 if (w->prev) - . . . . . . . . . { - 6 0 0 3 0 0 0 0 0 if (!sibling) - . . . . . . . . . { - . . . . . . . . . XLowerWindow(w->screen->display->display, w->id); - . . . . . . . . . if (w->frame) - . . . . . . . . . XLowerWindow(w->screen->display->display, w->frame); - . . . . . . . . . } - 21 3 2 15 0 0 0 0 0 else if (sibling->id != w->prev->id) - . . . . . . . . . { - 3 0 0 3 0 0 0 0 0 mask |= CWSibling | CWStackMode; - . . . . . . . . . - 6 0 0 3 0 0 3 0 0 xwc->stack_mode = Above; - 15 3 1 9 0 0 3 0 0 xwc->sibling = sibling->id; - . . . . . . . . . } - . . . . . . . . . } - 2 1 1 1 0 0 0 0 0 else if (sibling) - . . . . . . . . . { - . . . . . . . . . mask |= CWSibling | CWStackMode; - . . . . . . . . . - . . . . . . . . . xwc->stack_mode = Above; - . . . . . . . . . xwc->sibling = sibling->id; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 14 2 2 7 0 0 0 0 0 if (sibling && mask) - . . . . . . . . . { - . . . . . . . . . /* a normal window can be stacked above fullscreen windows but we - . . . . . . . . . don't want normal windows to be stacked above dock window so if - . . . . . . . . . the sibling we're stacking above is a fullscreen window we also - . . . . . . . . . update all dock windows. */ - 15 0 0 6 0 0 0 0 0 if ((sibling->type & CompWindowTypeFullscreenMask) && - . . . . . . . . . (!(w->type & (CompWindowTypeFullscreenMask | - . . . . . . . . . CompWindowTypeDockMask))) && - . . . . . . . . . !isAncestorTo(w, sibling)) - . . . . . . . . . { - . . . . . . . . . CompWindow *dw; - . . . . . . . . . - . . . . . . . . . for (dw = w->screen->reverseWindows; dw; dw = dw->prev) - . . . . . . . . . if (dw == sibling) --- line 3680 ---------------------------------------- --- line 3681 ---------------------------------------- - . . . . . . . . . break; - . . . . . . . . . - . . . . . . . . . for (; dw; dw = dw->prev) - . . . . . . . . . if (dw->type & CompWindowTypeDockMask) - . . . . . . . . . configureXWindow(dw, mask, xwc); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 4 3 2 4 0 0 0 0 0 return mask; - 8 0 0 8 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void raiseWindow(CompWindow * w) - . . . . . . . . . { - . . . . . . . . . XWindowChanges xwc; - . . . . . . . . . int mask; - . . . . . . . . . - . . . . . . . . . mask = addWindowStackChanges(w, &xwc, findSiblingBelow(w, FALSE)); - . . . . . . . . . if (mask) --- line 3698 ---------------------------------------- --- line 3739 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . mask = addWindowStackChanges(w, &xwc, sibling); - . . . . . . . . . if (mask) - . . . . . . . . . configureXWindow(w, mask, &xwc); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void updateWindowAttributes(CompWindow * w, Bool aboveFs) - 20 3 2 0 0 0 12 0 0 { - . . . . . . . . . XWindowChanges xwc; - . . . . . . . . . int mask; - . . . . . . . . . - 32 0 0 16 1 0 0 0 0 if (w->attrib.override_redirect || !w->managed) - . . . . . . . . . return; - . . . . . . . . . - 20 3 2 8 0 0 0 0 0 if (w->state & CompWindowStateShadedMask) - . . . . . . . . . { - . . . . . . . . . hideWindow(w); - . . . . . . . . . } - 16 0 0 8 1 0 0 0 0 else if (w->shaded) - . . . . . . . . . { - . . . . . . . . . showWindow(w); - . . . . . . . . . } - . . . . . . . . . - 32 3 2 12 1 0 12 0 0 mask = addWindowStackChanges(w, &xwc, findSiblingBelow(w, aboveFs)); - 84 3 2 48 0 0 8 0 0 mask |= addWindowSizeChanges(w, &xwc, w->serverX, w->serverY, - . . . . . . . . . w->serverWidth, w->serverHeight, w->serverBorderWidth); - . . . . . . . . . - 8 0 0 4 0 0 0 0 0 if (!mask) - . . . . . . . . . return; - . . . . . . . . . - 16 1 1 7 0 0 0 0 0 if (w->mapNum && (mask & (CWWidth | CWHeight))) - . . . . . . . . . sendSyncRequest(w); - . . . . . . . . . - 12 2 1 3 0 0 0 0 0 if (mask & (CWSibling | CWStackMode)) - . . . . . . . . . { - . . . . . . . . . /* transient children above */ - 18 0 0 3 0 0 3 0 0 if (stackTransients(w, NULL, &xwc)) - . . . . . . . . . { - 12 0 0 6 2 0 3 0 0 configureXWindow(w, mask, &xwc); - . . . . . . . . . - . . . . . . . . . /* ancestors, sibilings and sibiling transients below */ - 12 2 1 3 0 0 3 0 0 stackAncestors(w, &xwc); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . configureXWindow(w, mask, &xwc); - . . . . . . . . . } - 8 1 1 8 1 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void ensureWindowVisibility(CompWindow * w) - 4 0 0 0 0 0 2 0 0 { - . . . . . . . . . int x1, y1, x2, y2; - 7 1 1 4 1 0 1 0 0 int width = w->serverWidth + w->serverBorderWidth * 2; - 7 0 0 4 0 0 1 0 0 int height = w->serverHeight + w->serverBorderWidth * 2; - 1 0 0 0 0 0 1 0 0 int dx = 0; - 1 0 0 0 0 0 1 0 0 int dy = 0; - . . . . . . . . . - 8 1 1 4 1 1 0 0 0 if (w->struts || w->attrib.override_redirect) - . . . . . . . . . return; - . . . . . . . . . - 5 0 0 2 0 0 0 0 0 if (w->type & (CompWindowTypeDockMask | - . . . . . . . . . CompWindowTypeFullscreenMask | CompWindowTypeUnknownMask)) - . . . . . . . . . return; - . . . . . . . . . - 15 1 1 9 1 0 1 0 0 x1 = w->screen->workArea.x - w->screen->width * w->screen->x; - 15 1 1 9 0 0 1 0 0 y1 = w->screen->workArea.y - w->screen->height * w->screen->y; - 15 1 1 10 0 0 1 0 0 x2 = x1 + w->screen->workArea.width + w->screen->hsize * w->screen->width; - 15 0 0 10 0 0 1 0 0 y2 = y1 + w->screen->workArea.height + - . . . . . . . . . w->screen->vsize * w->screen->height; - . . . . . . . . . - 9 1 1 5 1 0 0 0 0 if (w->serverX - w->input.left >= x2) - . . . . . . . . . dx = (x2 - 25) - w->serverX; - 10 1 1 7 0 0 0 0 0 else if (w->serverX + w->width + w->input.right <= x1) - . . . . . . . . . dx = (x1 + 25) - (w->serverX + w->width); - . . . . . . . . . - 9 1 1 5 0 0 0 0 0 if (w->serverY - w->input.top >= y2) - . . . . . . . . . dy = (y2 - 25) - w->serverY; - 10 1 1 7 0 0 0 0 0 else if (w->serverY + w->height + w->input.bottom <= y1) - . . . . . . . . . dy = (y1 + 25) - (w->serverY + w->height); - . . . . . . . . . - 4 0 0 2 0 0 0 0 0 if (dx || dy) - . . . . . . . . . { - . . . . . . . . . moveWindow(w, dx, dy, TRUE, FALSE); - . . . . . . . . . syncWindowPosition(w); - . . . . . . . . . } - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void revealWindow(CompWindow * w) - 4 1 1 0 0 0 2 0 0 { - 4 0 0 2 1 0 0 0 0 if (w->minimized) - . . . . . . . . . unminimizeWindow(w); - . . . . . . . . . - 4 0 0 3 0 0 1 0 0 leaveShowDesktopMode(w->screen, w); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static void revealAncestors(CompWindow * w, void *closure) - 1,145 1 1 0 0 0 687 0 0 { - 458 0 0 229 0 0 229 0 0 CompWindow *transient = closure; - . . . . . . . . . - 1,145 0 0 458 0 0 229 0 0 if (isAncestorTo(transient, w)) - . . . . . . . . . { - . . . . . . . . . forEachWindowOnScreen(w->screen, revealAncestors, (void *)w); - . . . . . . . . . revealWindow(w); - . . . . . . . . . } - 458 0 0 458 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void activateWindow(CompWindow * w) - 4 1 1 0 0 0 2 0 0 { - 5 1 1 4 1 0 1 0 0 setCurrentDesktop(w->screen, w->desktop); - . . . . . . . . . - 5 0 0 3 0 0 1 0 0 forEachWindowOnScreen(w->screen, revealAncestors, (void *)w); - 2 0 0 1 0 0 1 0 0 revealWindow(w); - . . . . . . . . . - 5 0 0 2 1 0 0 0 0 if (w->state & CompWindowStateHiddenMask) - . . . . . . . . . { - . . . . . . . . . w->state &= ~CompWindowStateShadedMask; - . . . . . . . . . if (w->shaded) - . . . . . . . . . showWindow(w); - . . . . . . . . . } - . . . . . . . . . - 5 1 1 2 0 0 0 0 0 if (w->state & CompWindowStateHiddenMask) - . . . . . . . . . return; - . . . . . . . . . - 4 1 1 1 0 0 1 0 0 if (!onCurrentDesktop(w)) - . . . . . . . . . return; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 ensureWindowVisibility(w); - 3 0 0 1 0 0 1 0 0 updateWindowAttributes(w, TRUE); - 2 0 0 1 0 0 1 0 0 moveInputFocusToWindow(w); - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void closeWindow(CompWindow * w, Time serverTime) - . . . . . . . . . { - . . . . . . . . . CompDisplay *display = w->screen->display; - . . . . . . . . . - . . . . . . . . . if (w->alive) - . . . . . . . . . { - . . . . . . . . . if (w->protocols & CompWindowProtocolDeleteMask) --- line 3878 ---------------------------------------- --- line 3915 ---------------------------------------- - . . . . . . . . . r->y = w->attrib.y - w->input.top; - . . . . . . . . . r->width = w->width + w->input.left + w->input.right; - . . . . . . . . . r->height = w->height + w->input.top + w->input.bottom; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . Bool - . . . . . . . . . constrainNewWindowSize(CompWindow * w, - . . . . . . . . . int width, int height, int *newWidth, int *newHeight) - 24 2 1 0 0 0 18 2 0 { - 12 2 1 9 1 0 3 0 0 CompDisplay *d = w->screen->display; - 9 0 0 3 0 0 3 0 0 const XSizeHints *hints = &w->sizeHints; - 3 0 0 0 0 0 3 0 0 int min_width = 0; - 3 0 0 0 0 0 3 0 0 int min_height = 0; - 3 0 0 0 0 0 3 0 0 int base_width = 0; - 3 0 0 0 0 0 3 0 0 int base_height = 0; - 3 0 0 0 0 0 3 0 0 int xinc = 1; - 3 0 0 0 0 0 3 0 0 int yinc = 1; - 3 3 1 0 0 0 3 0 0 int max_width = MAXSHORT; - 3 0 0 0 0 0 3 0 0 int max_height = MAXSHORT; - 9 0 0 6 0 0 3 0 0 long flags = hints->flags; - . . . . . . . . . - 12 0 0 6 3 0 0 0 0 if (d->opt[COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED].value.b) - . . . . . . . . . { - 15 0 0 6 0 0 0 0 0 if ((w->state & MAXIMIZE_STATE) == MAXIMIZE_STATE) - . . . . . . . . . flags &= ~(PResizeInc | PAspect); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* Ater gdk_window_constrain_size(), which is partially borrowed from fvwm. - . . . . . . . . . * - . . . . . . . . . * Copyright 1993, Robert Nation - . . . . . . . . . * You may use this code for any purpose, as long as the original - . . . . . . . . . * copyright remains in the source code and all documentation --- line 3946 ---------------------------------------- --- line 3947 ---------------------------------------- - . . . . . . . . . * - . . . . . . . . . * which in turn borrows parts of the algorithm from uwm - . . . . . . . . . */ - . . . . . . . . . - . . . . . . . . . #define FLOOR(value, base) (((int) ((value) / (base))) * (base)) - . . . . . . . . . #define FLOOR64(value, base) (((uint64_t) ((value) / (base))) * (base)) - . . . . . . . . . #define CLAMP(v, min, max) ((v) <= (min) ? (min) : (v) >= (max) ? (max) : (v)) - . . . . . . . . . - 27 4 2 6 0 0 0 0 0 if ((flags & PBaseSize) && (flags & PMinSize)) - . . . . . . . . . { - 9 0 0 6 3 1 3 0 0 base_width = hints->base_width; - 9 0 0 6 0 0 3 0 0 base_height = hints->base_height; - 9 0 0 6 0 0 3 0 0 min_width = hints->min_width; - 9 0 0 6 0 0 3 0 0 min_height = hints->min_height; - . . . . . . . . . } - . . . . . . . . . else if (flags & PBaseSize) - . . . . . . . . . { - . . . . . . . . . base_width = hints->base_width; - . . . . . . . . . base_height = hints->base_height; - . . . . . . . . . min_width = hints->base_width; - . . . . . . . . . min_height = hints->base_height; - . . . . . . . . . } --- line 3968 ---------------------------------------- --- line 3969 ---------------------------------------- - . . . . . . . . . else if (flags & PMinSize) - . . . . . . . . . { - . . . . . . . . . base_width = hints->min_width; - . . . . . . . . . base_height = hints->min_height; - . . . . . . . . . min_width = hints->min_width; - . . . . . . . . . min_height = hints->min_height; - . . . . . . . . . } - . . . . . . . . . - 12 2 1 3 0 0 0 0 0 if (flags & PMaxSize) - . . . . . . . . . { - 9 3 1 6 0 0 3 0 0 max_width = hints->max_width; - 9 0 0 6 0 0 3 0 0 max_height = hints->max_height; - . . . . . . . . . } - . . . . . . . . . - 12 0 0 3 0 0 0 0 0 if (flags & PResizeInc) - . . . . . . . . . { - 18 0 0 9 0 0 3 0 0 xinc = MAX(xinc, hints->width_inc); - 18 0 0 9 0 0 3 0 0 yinc = MAX(yinc, hints->height_inc); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . /* clamp width and height to min and max values */ - 33 2 1 18 0 0 6 0 0 width = CLAMP(width, min_width, max_width); - 33 2 1 18 0 0 6 0 0 height = CLAMP(height, min_height, max_height); - . . . . . . . . . - . . . . . . . . . /* shrink to base + N * inc */ - 33 0 0 15 0 0 3 0 0 width = base_width + FLOOR(width - base_width, xinc); - 33 2 1 15 0 0 3 0 0 height = base_height + FLOOR(height - base_height, yinc); - . . . . . . . . . - . . . . . . . . . /* constrain aspect ratio, according to: - . . . . . . . . . * - . . . . . . . . . * min_aspect.x width max_aspect.x - . . . . . . . . . * ------------ <= -------- <= ----------- - . . . . . . . . . * min_aspect.y height max_aspect.y - . . . . . . . . . */ - 36 2 1 15 0 0 0 0 0 if ((flags & PAspect) && hints->min_aspect.y > 0 - . . . . . . . . . && hints->max_aspect.x > 0) - . . . . . . . . . { - . . . . . . . . . /* Use 64 bit arithmetic to prevent overflow */ - . . . . . . . . . - 12 0 0 6 0 0 3 0 0 uint64_t min_aspect_x = hints->min_aspect.x; - 12 0 0 6 0 0 3 0 0 uint64_t min_aspect_y = hints->min_aspect.y; - 12 0 0 6 0 0 3 0 0 uint64_t max_aspect_x = hints->max_aspect.x; - 12 0 0 6 0 0 3 0 0 uint64_t max_aspect_y = hints->max_aspect.y; - . . . . . . . . . uint64_t delta; - . . . . . . . . . - 27 2 1 12 0 0 0 0 0 if (min_aspect_x * height > width * min_aspect_y) - . . . . . . . . . { - . . . . . . . . . delta = FLOOR64(height - - . . . . . . . . . width * min_aspect_y / min_aspect_x, yinc); - . . . . . . . . . if (height - delta >= min_height) - . . . . . . . . . height -= delta; - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . delta = FLOOR64(height * min_aspect_x / - . . . . . . . . . min_aspect_y - width, xinc); - . . . . . . . . . if (width + delta <= max_width) - . . . . . . . . . width += delta; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 27 2 1 12 0 0 0 0 0 if (width * max_aspect_y > max_aspect_x * height) - . . . . . . . . . { - . . . . . . . . . delta = FLOOR64(width - - . . . . . . . . . height * max_aspect_x / max_aspect_y, xinc); - . . . . . . . . . if (width - delta >= min_width) - . . . . . . . . . width -= delta; - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . delta = FLOOR64(width * min_aspect_y / --- line 4037 ---------------------------------------- --- line 4040 ---------------------------------------- - . . . . . . . . . height += delta; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . #undef CLAMP - . . . . . . . . . #undef FLOOR64 - . . . . . . . . . #undef FLOOR - . . . . . . . . . - 24 4 2 18 0 0 0 0 0 if (width != w->serverWidth || height != w->serverHeight) - . . . . . . . . . { - . . . . . . . . . *newWidth = width; - . . . . . . . . . *newHeight = height; - . . . . . . . . . - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . - 6 3 1 3 0 0 3 0 0 return FALSE; - 6 0 0 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void hideWindow(CompWindow * w) - . . . . . . . . . { - . . . . . . . . . Bool onDesktop = onCurrentDesktop(w); - . . . . . . . . . - . . . . . . . . . if (!w->managed) - . . . . . . . . . return; - . . . . . . . . . --- line 4065 ---------------------------------------- --- line 4351 ---------------------------------------- - . . . . . . . . . w->redirected = FALSE; - . . . . . . . . . w->screen->overlayWindowCount++; - . . . . . . . . . - . . . . . . . . . if (w->screen->overlayWindowCount > 0) - . . . . . . . . . hideOutputWindow (w->screen); - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void redirectWindow(CompWindow * w) - 12 2 1 0 0 0 6 0 0 { - 12 2 1 6 0 0 0 0 0 if (w->redirected) - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . XCompositeRedirectWindow(w->screen->display->display, w->id, - . . . . . . . . . CompositeRedirectManual); - . . . . . . . . . - . . . . . . . . . w->redirected = TRUE; - . . . . . . . . . w->screen->overlayWindowCount--; - . . . . . . . . . - . . . . . . . . . if (w->screen->overlayWindowCount < 1) - . . . . . . . . . showOutputWindow (w->screen); - 6 2 1 6 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . /* Returns the current viewport for a window. If the window spans more than - . . . . . . . . . one viewport the most appropriate viewport is returned. How the most - . . . . . . . . . appropriate viewport is computed can be made optional if necessary. It is - . . . . . . . . . currently computed as the viewport where the center of the window is - . . . . . . . . . located, except for when the window is visible in the current viewport as - . . . . . . . . . the current viewport is then always returned. */ - . . . . . . . . . void defaultViewportForWindow(CompWindow * w, int *vx, int *vy) - 1,464 16 5 0 0 0 1,220 2 0 { - 732 0 0 488 2 0 244 0 0 CompScreen *s = w->screen; - 1,708 0 0 976 224 220 244 0 0 int width = w->serverWidth + w->serverBorderWidth * 2; - 1,708 10 3 976 0 0 244 0 0 int height = w->serverHeight + w->serverBorderWidth * 2; - . . . . . . . . . int x; - . . . . . . . . . int y; - . . . . . . . . . - 5,276 6 3 3,358 62 58 0 0 0 if ((w->serverX < s->width && w->serverX + width > 0) && - . . . . . . . . . (w->serverY < s->height && w->serverY + height > 0)) - . . . . . . . . . { - 468 0 0 234 0 0 0 0 0 if (vx) - 936 0 0 702 0 0 234 0 0 *vx = s->x; - . . . . . . . . . - 468 0 0 234 0 0 0 0 0 if (vy) - 936 0 0 702 0 0 234 0 0 *vy = s->y; - . . . . . . . . . - 234 11 3 0 0 0 0 0 0 return; - . . . . . . . . . } - . . . . . . . . . - 20 2 0 10 0 0 0 0 0 if (vx) - . . . . . . . . . { - 60 0 0 30 0 0 10 0 0 x = w->serverX + (width >> 1); - 20 0 0 10 0 0 0 0 0 if (x < 0) - 147 1 0 56 0 0 7 0 0 *vx = s->x + ((x / s->width) - 1) % s->hsize; - . . . . . . . . . else - 60 4 4 24 0 0 3 0 0 *vx = s->x + (x / s->width) % s->hsize; - . . . . . . . . . } - . . . . . . . . . - 20 1 0 10 0 0 0 0 0 if (vy) - . . . . . . . . . { - 60 0 0 30 0 0 10 0 0 y = w->serverY + (height >> 1); - 20 0 0 10 0 0 0 0 0 if (y < 0) - 147 1 0 56 0 0 7 0 0 *vy = s->y + ((y / s->height) - 1) % s->vsize; - . . . . . . . . . else - 60 2 2 24 0 0 3 0 0 *vy = s->y + (y / s->height) % s->vsize; - . . . . . . . . . } - 732 22 3 732 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . - . . . . . . . . . /* returns icon with dimensions as close as possible to width and height - . . . . . . . . . but never greater. */ - . . . . . . . . . CompIcon *getWindowIcon(CompWindow * w, int width, int height) - . . . . . . . . . { - . . . . . . . . . CompIcon *icon; - . . . . . . . . . int i, wh, diff, oldDiff; --- line 4424 ---------------------------------------- --- line 4548 ---------------------------------------- - . . . . . . . . . free(w->icon); - . . . . . . . . . w->icon = NULL; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . w->nIcon = 0; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . int outputDeviceForWindow(CompWindow * w) - 68 17 1 0 0 0 34 0 0 { - 68 17 1 51 1 0 17 0 0 int output = w->screen->currentOutputDev; - 119 0 0 68 17 1 17 0 0 int width = w->serverWidth + w->serverBorderWidth * 2; - 119 0 0 68 0 0 17 0 0 int height = w->serverHeight + w->serverBorderWidth * 2; - . . . . . . . . . int x1, y1, x2, y2; - . . . . . . . . . - 221 17 1 85 17 0 17 0 0 x1 = w->screen->outputDev[output].region.extents.x1; - 221 17 1 85 0 0 17 0 0 y1 = w->screen->outputDev[output].region.extents.y1; - 221 17 1 85 0 0 17 0 0 x2 = w->screen->outputDev[output].region.extents.x2; - 221 0 0 85 0 0 17 0 0 y2 = w->screen->outputDev[output].region.extents.y2; - . . . . . . . . . - 306 17 1 238 0 0 0 0 0 if (x1 > w->serverX + width || y1 > w->serverY + height || - . . . . . . . . . x2 < w->serverX || y2 < w->serverY) - . . . . . . . . . { - . . . . . . . . . output = outputDeviceForPoint(w->screen, - . . . . . . . . . w->serverX + width / 2, w->serverY + height / 2); - . . . . . . . . . } - . . . . . . . . . - 17 17 1 17 0 0 0 0 0 return output; - 34 0 0 34 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . Bool onCurrentDesktop(CompWindow * w) - 18 10 3 0 0 0 12 2 0 { - 24 0 0 12 5 0 0 0 0 if (w->desktop == 0xffffffff || w->desktop == w->screen->currentDesktop) - 12 0 0 0 0 0 6 0 0 return TRUE; - . . . . . . . . . - 6 5 1 6 0 0 0 0 0 return FALSE; - 12 0 0 12 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void setDesktopForWindow(CompWindow * w, unsigned int desktop) - 10 2 1 0 0 0 6 0 0 { - 4 0 0 2 0 0 0 0 0 if (desktop != 0xffffffff) - . . . . . . . . . { - . . . . . . . . . if (w->type & (CompWindowTypeDesktopMask | CompWindowTypeDockMask)) - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . if (desktop >= w->screen->nDesktop) - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . - 8 2 1 6 1 0 0 0 0 if (desktop == w->desktop) - . . . . . . . . . return; - . . . . . . . . . - . . . . . . . . . w->desktop = desktop; - . . . . . . . . . - . . . . . . . . . if (desktop == 0xffffffff || desktop == w->screen->currentDesktop) - . . . . . . . . . showWindow(w); - . . . . . . . . . else - . . . . . . . . . hideWindow(w); - . . . . . . . . . - . . . . . . . . . setWindowProp(w->screen->display, w->id, - . . . . . . . . . w->screen->display->winDesktopAtom, w->desktop); - 4 2 1 4 0 0 0 0 0 } - --------------------------------------------------------------------------------- --- User-annotated source: event.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 49 ---------------------------------------- - . . . . . . . . . CompBindingType type, - . . . . . . . . . CompActionState state, CompAction ** action) __attribute__((always_inline)); - . . . . . . . . . static inline Bool - . . . . . . . . . isCallBackBinding(CompOption * option, - . . . . . . . . . CompBindingType type, CompActionState state) __attribute__((always_inline)); - . . . . . . . . . - . . . . . . . . . static void - . . . . . . . . . handleWindowDamageRect(CompWindow * w, int x, int y, int width, int height) -48,528 35 4 0 0 0 36,396 18 1 { - . . . . . . . . . REGION region; - 6,066 0 0 0 0 0 6,066 0 0 Bool initial = FALSE; - . . . . . . . . . -24,264 0 0 12,132 21 2 0 0 0 if (!w->redirected) - . . . . . . . . . return; - . . . . . . . . . -24,264 0 0 12,132 0 0 0 0 0 if (!w->damaged) - . . . . . . . . . { - 4 1 1 2 0 0 2 0 0 w->damaged = initial = TRUE; - 56 3 2 34 4 0 2 0 0 w->invisible = WINDOW_INVISIBLE(w); - . . . . . . . . . } - . . . . . . . . . -12,132 24 2 6,066 0 0 6,066 0 0 region.extents.x1 = x; -12,132 0 0 6,066 0 0 6,066 0 0 region.extents.y1 = y; -30,330 18 2 12,132 0 0 6,066 0 0 region.extents.x2 = region.extents.x1 + width; -30,330 0 0 12,132 0 0 6,066 0 0 region.extents.y2 = region.extents.y1 + height; - . . . . . . . . . -60,660 0 0 30,330 29 0 6,066 0 0 if (!(*w->screen->damageWindowRect) (w, initial, ®ion.extents)) - . . . . . . . . . { -60,660 17 2 30,330 7 2 6,066 0 0 region.extents.x1 += w->attrib.x + w->attrib.border_width; -60,660 0 0 30,330 0 0 6,066 0 0 region.extents.y1 += w->attrib.y + w->attrib.border_width; -60,660 19 2 30,330 0 0 6,066 0 0 region.extents.x2 += w->attrib.x + w->attrib.border_width; -60,660 0 0 30,330 0 0 6,066 0 0 region.extents.y2 += w->attrib.y + w->attrib.border_width; - . . . . . . . . . -18,198 19 2 0 0 0 6,066 0 0 region.rects = ®ion.extents; -18,198 0 0 6,066 0 0 12,132 0 0 region.numRects = region.size = 1; - . . . . . . . . . -24,264 0 0 12,132 0 0 6,066 0 0 damageScreenRegion(w->screen, ®ion); - . . . . . . . . . -12,132 0 0 6,066 0 0 0 0 0 if (initial) - 2 0 0 1 0 0 1 0 0 damageWindowOutputExtents(w); - . . . . . . . . . } - . . . . . . . . . -24,264 19 2 12,132 20 2 0 0 0 if (!w->attrib.override_redirect) -12,132 0 0 6,066 0 0 6,066 3 1 w->placed = TRUE; -12,132 0 0 12,132 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void handleSyncAlarm(CompWindow * w) - . . . . . . . . . { - . . . . . . . . . if (w->syncWait) - . . . . . . . . . { - . . . . . . . . . if (w->syncWaitHandle) - . . . . . . . . . { - . . . . . . . . . compRemoveTimeout(w->syncWaitHandle); --- line 101 ---------------------------------------- --- line 122 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . w->nDamage = 0; - . . . . . . . . . w->syncWait = FALSE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static void moveInputFocusToOtherWindow(CompWindow * w) - 44 7 2 0 0 0 22 0 0 { - 44 0 0 33 1 0 11 0 0 CompDisplay *display = w->screen->display; - . . . . . . . . . - 66 16 2 44 9 1 0 0 0 if (w->id == display->activeWindow) - . . . . . . . . . { - . . . . . . . . . CompWindow *ancestor; - . . . . . . . . . - 8 0 0 4 2 0 0 0 0 if (w->transientFor && w->transientFor != w->screen->root) - . . . . . . . . . { - . . . . . . . . . ancestor = findWindowAtDisplay(display, w->transientFor); - . . . . . . . . . if (ancestor - . . . . . . . . . && !(ancestor-> - . . . . . . . . . type & (CompWindowTypeDesktopMask | - . . . . . . . . . CompWindowTypeDockMask))) - . . . . . . . . . { - . . . . . . . . . moveInputFocusToWindow(ancestor); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . focusDefaultWindow(display); - . . . . . . . . . } - 10 1 1 4 0 0 0 0 0 else if (w->type & (CompWindowTypeDialogMask | - . . . . . . . . . CompWindowTypeModalDialogMask)) - . . . . . . . . . { - . . . . . . . . . CompWindow *a, *focus = NULL; - . . . . . . . . . - . . . . . . . . . for (a = w->screen->reverseWindows; a; a = a->prev) - . . . . . . . . . { - . . . . . . . . . if (a->clientLeader == w->clientLeader) - . . . . . . . . . { --- line 158 ---------------------------------------- --- line 183 ---------------------------------------- - . . . . . . . . . CompWindowTypeDockMask))) - . . . . . . . . . { - . . . . . . . . . moveInputFocusToWindow(focus); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . focusDefaultWindow(display); - . . . . . . . . . } - . . . . . . . . . else - 4 1 0 2 0 0 2 0 0 focusDefaultWindow(display); - . . . . . . . . . } - 22 5 2 22 2 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool autoRaiseTimeout(void *closure) - . . . . . . . . . { - . . . . . . . . . CompDisplay *display = closure; - . . . . . . . . . - . . . . . . . . . if (display->autoRaiseWindow == display->activeWindow) - . . . . . . . . . { - . . . . . . . . . CompWindow *w; --- line 201 ---------------------------------------- --- line 210 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . #define REAL_MOD_MASK (ShiftMask | ControlMask | Mod1Mask | \ - . . . . . . . . . Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask) - . . . . . . . . . - . . . . . . . . . static inline Bool - . . . . . . . . . isCallBackBinding(CompOption * option, - . . . . . . . . . CompBindingType type, CompActionState state) - . . . . . . . . . { -22,852 9 1 11,426 5,659 140 0 0 0 if (option->type != CompOptionTypeAction) - 4,352 0 0 0 0 0 2,176 0 0 return FALSE; - . . . . . . . . . -17,685 0 0 10,611 1,257 28 0 0 0 if (!(option->value.action.type & type)) - 4,396 0 0 0 0 0 2,198 7 1 return FALSE; - . . . . . . . . . - 6,695 2 2 4,017 0 0 0 0 0 if (!(option->value.action.state & state)) - 752 0 0 0 0 0 376 0 0 return FALSE; - . . . . . . . . . - 6,676 32 3 5,713 0 0 963 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static inline Bool - . . . . . . . . . isInitiateBinding(CompOption * option, - . . . . . . . . . CompBindingType type, - . . . . . . . . . CompActionState state, CompAction ** action) - . . . . . . . . . { - 8,066 0 0 0 0 0 0 0 0 if (!isCallBackBinding(option, type, state)) - 6,144 0 0 0 0 0 3,072 0 0 return FALSE; - . . . . . . . . . - 3,844 1 1 1,922 0 0 0 0 0 if (!option->value.action.initiate) - . . . . . . . . . return FALSE; - . . . . . . . . . - 3,844 0 0 1,922 0 0 961 0 0 *action = &option->value.action; - . . . . . . . . . - 4,994 23 2 4,033 0 0 961 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static inline Bool - . . . . . . . . . isTerminateBinding(CompOption * option, - . . . . . . . . . CompBindingType type, - . . . . . . . . . CompActionState state, CompAction ** action) - . . . . . . . . . { - 3,360 0 0 0 0 0 0 0 0 if (!isCallBackBinding(option, type, state)) - 3,356 0 0 0 0 0 1,678 9 0 return FALSE; - . . . . . . . . . - 8 0 0 4 0 0 0 0 0 if (!option->value.action.terminate) - . . . . . . . . . return FALSE; - . . . . . . . . . - 8 1 1 4 0 0 2 0 0 *action = &option->value.action; - . . . . . . . . . - 1,682 9 1 1,680 0 0 2 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . triggerButtonPressBindings(CompDisplay * d, - . . . . . . . . . CompOption * option, - . . . . . . . . . int nOption, - . . . . . . . . . XEvent * event, - . . . . . . . . . CompOption * argument, int nArgument) - 9 2 2 0 0 0 7 2 0 { - 1 0 0 0 0 0 1 1 0 CompActionState state = CompActionStateInitButton; - . . . . . . . . . CompAction *action; - 5 0 0 2 1 0 1 0 0 unsigned int modMask = REAL_MOD_MASK & ~d->ignoredModMask; - . . . . . . . . . unsigned int bindMods; - 1 0 0 0 0 0 1 0 0 unsigned int edge = 0; - . . . . . . . . . - 3 1 1 1 1 1 0 0 0 if (edgeWindow) - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . unsigned int i; - . . . . . . . . . - . . . . . . . . . s = findScreenAtDisplay (d, event->xbutton.root); - . . . . . . . . . if (!s) - . . . . . . . . . return FALSE; - . . . . . . . . . --- line 283 ---------------------------------------- --- line 292 ---------------------------------------- - . . . . . . . . . if (edgeWindow == s->screenEdge[i].id) - . . . . . . . . . { - . . . . . . . . . edge = 1 << i; - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 16 3 3 7 0 0 7 0 0 while (nOption--) - . . . . . . . . . { - 2 0 0 0 0 0 0 0 0 if (isInitiateBinding(option, CompBindingTypeButton, state, &action)) - . . . . . . . . . { - 7 1 1 4 0 0 0 0 0 if (action->button.button == event->xbutton.button) - . . . . . . . . . { - 5 0 0 3 0 0 2 0 0 bindMods = virtualToRealModMask(d, action->button.modifiers); - 2 0 0 1 0 0 0 0 0 if (bindMods == 0xFFFFFFFF) - . . . . . . . . . continue; - . . . . . . . . . - 8 1 1 5 0 0 0 0 0 if ((bindMods & modMask) == (event->xbutton.state & modMask)) - 11 0 0 7 0 0 1 0 0 if ((*action->initiate) (d, action, - . . . . . . . . . state, argument, nArgument)) - 2 1 1 0 0 0 1 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . if (edge) - . . . . . . . . . { - . . . . . . . . . if (isInitiateBinding (option, CompBindingTypeEdgeButton, - . . . . . . . . . state, &action)) - . . . . . . . . . { --- line 321 ---------------------------------------- --- line 328 ---------------------------------------- - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . option++; - . . . . . . . . . } - . . . . . . . . . - 1 0 0 1 0 0 0 0 0 return FALSE; - 2 0 0 2 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . triggerButtonReleaseBindings(CompDisplay * d, - . . . . . . . . . CompOption * option, - . . . . . . . . . int nOption, - . . . . . . . . . XEvent * event, - . . . . . . . . . CompOption * argument, int nArgument) - 117 2 1 0 0 0 91 2 0 { - 13 0 0 0 0 0 13 0 0 CompActionState state = CompActionStateTermButton; - . . . . . . . . . CompAction *action; - . . . . . . . . . - 2,740 2 2 1,202 0 0 1,176 0 0 while (nOption--) - . . . . . . . . . { - 336 0 0 0 0 0 0 0 0 if (isTerminateBinding(option, CompBindingTypeButton, state, &action)) - . . . . . . . . . { - 7 0 0 4 0 0 0 0 0 if (action->button.button == event->xbutton.button) - . . . . . . . . . { - 11 0 0 7 0 0 1 0 0 if ((*action->terminate) (d, action, state, - . . . . . . . . . argument, nArgument)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 168 0 0 168 0 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . - 26 1 0 13 0 0 13 0 0 return FALSE; - 26 0 0 26 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . triggerKeyPressBindings(CompDisplay * d, - . . . . . . . . . CompOption * option, - . . . . . . . . . int nOption, - . . . . . . . . . XEvent * event, CompOption * argument, int nArgument) - 1,989 17 1 0 0 0 1,547 16 0 { - 221 0 0 0 0 0 221 0 0 CompActionState state = 0; - . . . . . . . . . CompAction *action; - 1,105 17 1 442 16 0 221 0 0 unsigned int modMask = REAL_MOD_MASK & ~d->ignoredModMask; - . . . . . . . . . unsigned int bindMods; - . . . . . . . . . - 1,105 0 0 663 0 0 0 0 0 if (!(event->xkey.state & modMask)) - . . . . . . . . . { - 91 0 0 52 1 0 0 0 0 if (event->xkey.keycode == d->escapeKeyCode) - . . . . . . . . . state = CompActionStateCancel; - 91 1 0 52 0 0 0 0 0 else if (event->xkey.keycode == d->returnKeyCode) - . . . . . . . . . state = CompActionStateCommit; - . . . . . . . . . } - . . . . . . . . . - 442 16 1 221 0 0 0 0 0 if (state) - . . . . . . . . . { - . . . . . . . . . CompOption *o = option; - . . . . . . . . . int n = nOption; - . . . . . . . . . - . . . . . . . . . while (n--) - . . . . . . . . . { - . . . . . . . . . if (o->type == CompOptionTypeAction) - . . . . . . . . . { --- line 394 ---------------------------------------- --- line 401 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . o++; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . if (state == CompActionStateCancel) - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - 221 17 1 0 0 0 221 0 0 state = CompActionStateInitKey; -46,580 34 2 20,434 0 0 19,992 0 0 while (nOption--) - . . . . . . . . . { - 5,712 0 0 0 0 0 0 0 0 if (isInitiateBinding(option, CompBindingTypeKey, state, &action)) - . . . . . . . . . { - 3,400 0 0 2,040 102 0 1,360 0 0 bindMods = virtualToRealModMask(d, action->key.modifiers); - 1,360 17 1 680 0 0 0 0 0 if (bindMods == 0xFFFFFFFF) - . . . . . . . . . continue; - . . . . . . . . . int keycode = action->key.keysym ? XKeysymToKeycode(d->display, - . . . . . . . . . action-> - . . . . . . . . . key. -10,064 17 1 4,692 0 0 2,023 0 0 keysym) : 0; - . . . . . . . . . - 3,400 0 0 2,040 1 0 0 0 0 if (keycode == event->xkey.keycode) - . . . . . . . . . { - 152 0 0 95 0 0 0 0 0 if ((bindMods & modMask) == (event->xkey.state & modMask)) - 154 1 0 98 0 0 14 0 0 if ((*action->initiate) (d, action, - . . . . . . . . . state, argument, nArgument)) - 14 0 0 0 0 0 0 0 0 break; - . . . . . . . . . } - 2,644 16 1 1,322 0 0 0 0 0 else if (!d->xkbEvent && action->key.keysym == 0) - . . . . . . . . . { - . . . . . . . . . if (bindMods == (event->xkey.state & modMask)) - . . . . . . . . . if ((*action->initiate) (d, action, - . . . . . . . . . state, argument, nArgument)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 2,856 0 0 2,856 1 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . - 442 9 1 221 0 0 221 0 0 return FALSE; - 442 0 0 442 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . triggerKeyReleaseBindings(CompDisplay * d, - . . . . . . . . . CompOption * option, - . . . . . . . . . int nOption, - . . . . . . . . . XEvent * event, - . . . . . . . . . CompOption * argument, int nArgument) - 2,223 18 0 0 0 0 1,729 36 0 { - 988 0 0 494 0 0 0 0 0 if (!d->xkbEvent) - . . . . . . . . . { - . . . . . . . . . CompActionState state = CompActionStateTermKey; - . . . . . . . . . CompAction *action; - . . . . . . . . . unsigned int modMask = REAL_MOD_MASK & ~d->ignoredModMask; - . . . . . . . . . unsigned int bindMods; - . . . . . . . . . unsigned int mods; - . . . . . . . . . - . . . . . . . . . mods = keycodeToModifiers(d, event->xkey.keycode); --- line 459 ---------------------------------------- --- line 477 ---------------------------------------- - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . option++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 494 18 0 247 0 0 247 0 0 return FALSE; - 494 0 0 494 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . triggerStateNotifyBindings(CompDisplay * d, - . . . . . . . . . CompOption * option, - . . . . . . . . . int nOption, - . . . . . . . . . XkbStateNotifyEvent * event, - . . . . . . . . . CompOption * argument, int nArgument) - 1,872 25 2 0 0 0 1,456 16 1 { - . . . . . . . . . CompActionState state; - . . . . . . . . . CompAction *action; - 1,040 0 0 416 16 1 208 0 0 unsigned int modMask = REAL_MOD_MASK & ~d->ignoredModMask; - . . . . . . . . . unsigned int bindMods; - . . . . . . . . . - 832 15 1 416 0 0 0 0 0 if (event->event_type == KeyPress) - . . . . . . . . . { - 91 0 0 0 0 0 91 0 0 state = CompActionStateInitKey; - . . . . . . . . . -19,271 12 2 8,414 0 0 8,232 0 0 while (nOption--) - . . . . . . . . . { - 2,352 0 0 0 0 0 0 0 0 if (isInitiateBinding(option, CompBindingTypeKey, state, &action)) - . . . . . . . . . { - 1,120 0 0 560 42 5 0 0 0 if (action->key.keysym == 0) - . . . . . . . . . { - 35 6 1 21 0 0 14 0 0 bindMods = virtualToRealModMask(d, action->key.modifiers); - 14 0 0 7 0 0 0 0 0 if (bindMods == 0xFFFFFFFF) - . . . . . . . . . continue; - . . . . . . . . . - 42 0 0 35 0 0 0 0 0 if ((event->mods & modMask & bindMods) == bindMods) - . . . . . . . . . { - . . . . . . . . . if ((*action->initiate) (d, - . . . . . . . . . action, - . . . . . . . . . state, argument, nArgument)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 1,176 0 0 1,176 0 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 117 9 1 0 0 0 117 0 0 state = CompActionStateTermKey; - . . . . . . . . . -24,660 9 0 10,818 0 0 10,584 0 0 while (nOption--) - . . . . . . . . . { - 3,024 0 0 0 0 0 0 0 0 if (isTerminateBinding - . . . . . . . . . (option, CompBindingTypeKey, state, &action)) - . . . . . . . . . { - 5 0 0 3 0 0 2 0 0 bindMods = virtualToRealModMask(d, action->key.modifiers); - 2 0 0 1 0 0 0 0 0 if (bindMods == 0xFFFFFFFF) - . . . . . . . . . continue; - . . . . . . . . . - 6 1 1 5 0 0 0 0 0 if ((event->mods & modMask & bindMods) != bindMods) - . . . . . . . . . { - 11 0 0 7 0 0 1 0 0 if ((*action->terminate) (d, - . . . . . . . . . action, - . . . . . . . . . state, argument, nArgument)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 1,512 0 0 1,512 0 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 416 6 1 208 0 0 208 0 0 return FALSE; - 416 0 0 416 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . isBellAction(CompOption * option, CompActionState state, CompAction ** action) - 840 2 1 0 0 0 672 1 0 { - 672 0 0 336 166 0 0 0 0 if (option->type != CompOptionTypeAction) - 128 0 0 0 0 0 64 0 0 return FALSE; - . . . . . . . . . - 416 0 0 208 75 30 0 0 0 if (!option->value.action.bell) - 208 0 0 0 0 0 104 0 0 return FALSE; - . . . . . . . . . - . . . . . . . . . if (!(option->value.action.state & state)) - . . . . . . . . . return FALSE; - . . . . . . . . . - . . . . . . . . . if (!option->value.action.initiate) - . . . . . . . . . return FALSE; - . . . . . . . . . - . . . . . . . . . *action = &option->value.action; - . . . . . . . . . - 168 0 0 168 0 0 0 0 0 return TRUE; - 336 0 0 336 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . triggerBellNotifyBindings(CompDisplay * d, - . . . . . . . . . CompOption * option, - . . . . . . . . . int nOption, CompOption * argument, int nArgument) - 104 2 2 0 0 0 78 0 0 { - 13 0 0 0 0 0 13 0 0 CompActionState state = CompActionStateInitBell; - . . . . . . . . . CompAction *action; - . . . . . . . . . - 556 1 1 362 0 0 0 0 0 while (nOption--) - . . . . . . . . . { - 1,008 0 0 336 0 0 168 0 0 if (isBellAction(option, state, &action)) - . . . . . . . . . { - . . . . . . . . . if ((*action->initiate) (d, action, state, argument, nArgument)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . - 168 0 0 168 0 0 0 0 0 option++; - . . . . . . . . . } - . . . . . . . . . - 26 0 0 13 0 0 13 0 0 return FALSE; - 26 0 0 26 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . static Bool - . . . . . . . . . isEdgeAction(CompOption * option, CompActionState state, unsigned int edge) - . . . . . . . . . { - . . . . . . . . . if (option->type != CompOptionTypeAction) - . . . . . . . . . return FALSE; - . . . . . . . . . - . . . . . . . . . if (!(option->value.action.edgeMask & edge)) --- line 604 ---------------------------------------- --- line 727 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . option++; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . return FALSE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static Bool handleActionEvent(CompDisplay * d, XEvent * event) -32,800 113 2 0 0 0 19,680 181 1 { - . . . . . . . . . CompOption *option; - . . . . . . . . . int nOption; - . . . . . . . . . CompPlugin *p; - . . . . . . . . . CompOption o[7]; - . . . . . . . . . - 6,560 0 0 0 0 0 6,560 147 1 o[0].type = CompOptionTypeInt; - 6,560 0 0 0 0 0 6,560 0 0 o[0].name = "window"; - . . . . . . . . . - 6,560 0 0 0 0 0 6,560 189 1 o[1].type = CompOptionTypeInt; - 6,560 113 2 0 0 0 6,560 170 1 o[1].name = "modifiers"; - . . . . . . . . . - 6,560 0 0 0 0 0 6,560 135 1 o[2].type = CompOptionTypeInt; - 6,560 0 0 0 0 0 6,560 145 1 o[2].name = "x"; - . . . . . . . . . - 6,560 0 0 0 0 0 6,560 154 1 o[3].type = CompOptionTypeInt; - 6,560 0 0 0 0 0 6,560 165 1 o[3].name = "y"; - . . . . . . . . . - 6,560 0 0 0 0 0 6,560 127 1 o[4].type = CompOptionTypeInt; - 6,560 112 2 0 0 0 6,560 0 0 o[4].name = "root"; - . . . . . . . . . -34,087 0 0 20,538 172 8 6,560 0 0 switch (event->type) - . . . . . . . . . { - . . . . . . . . . case ButtonPress: - 3 0 0 2 0 0 1 0 0 o[0].value.i = event->xbutton.window; - 3 1 1 2 0 0 1 0 0 o[1].value.i = event->xbutton.state; - 3 0 0 2 0 0 1 0 0 o[2].value.i = event->xbutton.x_root; - 3 0 0 2 0 0 1 0 0 o[3].value.i = event->xbutton.y_root; - 3 0 0 2 0 0 1 0 0 o[4].value.i = event->xbutton.root; - . . . . . . . . . - 1 1 1 0 0 0 1 1 0 o[5].type = CompOptionTypeInt; - 1 0 0 0 0 0 1 0 0 o[5].name = "button"; - 3 0 0 2 0 0 1 1 0 o[5].value.i = event->xbutton.button; - . . . . . . . . . - 1 0 0 0 0 0 1 1 0 o[6].type = CompOptionTypeInt; - 1 0 0 0 0 0 1 1 0 o[6].name = "time"; - 3 1 1 2 0 0 1 0 0 o[6].value.i = event->xbutton.time; - . . . . . . . . . - 5 1 1 1 0 0 2 2 0 for (p = getPlugins(); p; p = p->next) - . . . . . . . . . { - 5 0 0 3 2 0 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - 7 1 1 4 0 0 2 0 0 option = (*p->vTable->getDisplayOptions) (d, &nOption); - 10 0 0 4 0 0 1 0 0 if (triggerButtonPressBindings - . . . . . . . . . (d, option, nOption, event, o, 7)) - 2 0 0 0 0 0 1 0 0 return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . option = compGetDisplayOptions(d, &nOption); - . . . . . . . . . if (triggerButtonPressBindings(d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . - . . . . . . . . . break; - . . . . . . . . . case ButtonRelease: - 3 2 2 2 0 0 1 0 0 o[0].value.i = event->xbutton.window; - 3 0 0 2 0 0 1 0 0 o[1].value.i = event->xbutton.state; - 3 0 0 2 0 0 1 0 0 o[2].value.i = event->xbutton.x_root; - 3 0 0 2 0 0 1 0 0 o[3].value.i = event->xbutton.y_root; - 3 1 1 2 0 0 1 0 0 o[4].value.i = event->xbutton.root; - . . . . . . . . . - 1 0 0 0 0 0 1 1 0 o[5].type = CompOptionTypeInt; - 1 0 0 0 0 0 1 0 0 o[5].name = "button"; - 3 0 0 2 0 0 1 1 0 o[5].value.i = event->xbutton.button; - . . . . . . . . . - 1 0 0 0 0 0 1 1 0 o[6].type = CompOptionTypeInt; - 1 1 1 0 0 0 1 1 0 o[6].name = "time"; - 3 0 0 2 0 0 1 0 0 o[6].value.i = event->xbutton.time; - . . . . . . . . . - 90 1 1 52 5 0 19 2 0 for (p = getPlugins(); p; p = p->next) - . . . . . . . . . { - 85 0 0 51 34 0 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - 84 1 1 48 0 0 24 0 0 option = (*p->vTable->getDisplayOptions) (d, &nOption); - 120 0 0 48 0 0 12 0 0 if (triggerButtonReleaseBindings - . . . . . . . . . (d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 4 0 0 1 0 0 2 0 0 option = compGetDisplayOptions(d, &nOption); - 10 1 1 4 0 0 1 0 0 if (triggerButtonReleaseBindings(d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . - . . . . . . . . . break; - . . . . . . . . . case KeyPress: - 51 17 1 34 0 0 17 0 0 o[0].value.i = d->activeWindow; - 51 0 0 34 0 0 17 0 0 o[1].value.i = event->xkey.state; - 51 0 0 34 0 0 17 0 0 o[2].value.i = event->xkey.x_root; - 51 17 1 34 0 0 17 0 0 o[3].value.i = event->xkey.y_root; - 51 0 0 34 0 0 17 0 0 o[4].value.i = event->xkey.root; - . . . . . . . . . - 17 0 0 0 0 0 17 9 1 o[5].type = CompOptionTypeInt; - 17 0 0 0 0 0 17 0 0 o[5].name = "keycode"; - 51 0 0 34 0 0 17 9 0 o[5].value.i = event->xkey.keycode; - . . . . . . . . . - 17 17 1 0 0 0 17 9 0 o[6].type = CompOptionTypeInt; - 17 0 0 0 0 0 17 9 0 o[6].name = "time"; - 51 0 0 34 0 0 17 0 0 o[6].value.i = event->xkey.time; - . . . . . . . . . - 1,530 17 1 884 45 0 323 16 0 for (p = getPlugins(); p; p = p->next) - . . . . . . . . . { - 1,445 0 0 867 336 0 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - 1,428 17 1 816 1 0 408 0 0 option = (*p->vTable->getDisplayOptions) (d, &nOption); - 2,040 0 0 816 0 0 204 0 0 if (triggerKeyPressBindings(d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 68 17 1 17 0 0 34 0 0 option = compGetDisplayOptions(d, &nOption); - 170 0 0 68 0 0 17 0 0 if (triggerKeyPressBindings(d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . - . . . . . . . . . break; - . . . . . . . . . case KeyRelease: - 57 18 1 38 18 0 19 0 0 o[0].value.i = d->activeWindow; - 57 0 0 38 0 0 19 0 0 o[1].value.i = event->xkey.state; - 57 18 1 38 0 0 19 0 0 o[2].value.i = event->xkey.x_root; - 57 0 0 38 0 0 19 0 0 o[3].value.i = event->xkey.y_root; - 57 0 0 38 0 0 19 0 0 o[4].value.i = event->xkey.root; - . . . . . . . . . - 19 0 0 0 0 0 19 19 0 o[5].type = CompOptionTypeInt; - 19 0 0 0 0 0 19 0 0 o[5].name = "keycode"; - 57 18 1 38 0 0 19 19 0 o[5].value.i = event->xkey.keycode; - . . . . . . . . . - 19 0 0 0 0 0 19 19 0 o[6].type = CompOptionTypeInt; - 19 0 0 0 0 0 19 19 0 o[6].name = "time"; - 57 0 0 38 0 0 19 0 0 o[6].value.i = event->xkey.time; - . . . . . . . . . - 1,710 36 2 988 92 0 361 36 0 for (p = getPlugins(); p; p = p->next) - . . . . . . . . . { - 1,615 18 1 969 616 0 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - 1,596 0 0 912 0 0 456 0 0 option = (*p->vTable->getDisplayOptions) (d, &nOption); - 2,280 0 0 912 0 0 228 0 0 if (triggerKeyReleaseBindings - . . . . . . . . . (d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 76 0 0 19 0 0 38 0 0 option = compGetDisplayOptions(d, &nOption); - 190 18 0 76 0 0 19 0 0 if (triggerKeyReleaseBindings(d, option, nOption, event, o, 7)) - . . . . . . . . . return TRUE; - . . . . . . . . . - . . . . . . . . . break; - . . . . . . . . . case EnterNotify: - 48 10 2 24 0 0 0 0 0 if (event->xcrossing.mode != NotifyGrab && - . . . . . . . . . event->xcrossing.mode != NotifyUngrab && - . . . . . . . . . event->xcrossing.detail != NotifyInferior) - . . . . . . . . . { - . . . . . . . . . CompScreen *s; - . . . . . . . . . unsigned int edge, i; - . . . . . . . . . CompActionState state; - . . . . . . . . . - 10 0 0 6 0 0 4 2 0 s = findScreenAtDisplay(d, event->xcrossing.root); - 4 0 0 2 0 0 0 0 0 if (!s) - . . . . . . . . . return FALSE; - . . . . . . . . . - 6 2 1 2 2 0 0 0 0 if (edgeWindow && edgeWindow != event->xcrossing.window) - . . . . . . . . . { - . . . . . . . . . compRemoveTimeout(d->delayedEdgeHandle); - . . . . . . . . . - . . . . . . . . . state = CompActionStateTermEdge; - . . . . . . . . . edge = 0; - . . . . . . . . . - . . . . . . . . . for (i = 0; i < SCREEN_EDGE_NUM; i++) - . . . . . . . . . { --- line 902 ---------------------------------------- --- line 932 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . option = compGetDisplayOptions(d, &nOption); - . . . . . . . . . if (triggerEdgeLeaveBindings - . . . . . . . . . (d, option, nOption, state, edge, o, 6)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . - 2 2 1 0 0 0 2 0 0 edge = 0; - . . . . . . . . . - 56 2 1 34 0 0 2 0 0 for (i = 0; i < SCREEN_EDGE_NUM; i++) - . . . . . . . . . { - 176 0 0 80 4 2 0 0 0 if (event->xcrossing.window == s->screenEdge[i].id) - . . . . . . . . . { - . . . . . . . . . edge = 1 << i; - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 4 0 0 2 0 0 0 0 0 if (edge) - . . . . . . . . . { - . . . . . . . . . int delay; - . . . . . . . . . - . . . . . . . . . delay = d-> - . . . . . . . . . opt - . . . . . . . . . [COMP_DISPLAY_OPTION_EDGE_TRIGGERING_DELAY].value.i; - . . . . . . . . . - . . . . . . . . . state = CompActionStateInitEdge; --- line 959 ---------------------------------------- --- line 989 ---------------------------------------- - . . . . . . . . . { - . . . . . . . . . if (triggerAllEdgeEnterBindings(d)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case ClientMessage: - 36 3 1 24 3 0 0 0 0 if (event->xclient.message_type == d->xdndEnterAtom) - . . . . . . . . . { - . . . . . . . . . xdndWindow = event->xclient.window; - . . . . . . . . . } - 36 3 1 24 1 0 0 0 0 else if (event->xclient.message_type == d->xdndLeaveAtom) - . . . . . . . . . { - . . . . . . . . . unsigned int edge = 0; - . . . . . . . . . CompActionState state; - . . . . . . . . . Window root = None; - . . . . . . . . . - . . . . . . . . . if (!xdndWindow) - . . . . . . . . . { - . . . . . . . . . CompWindow *w; --- line 1009 ---------------------------------------- --- line 1049 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . option = compGetDisplayOptions(d, &nOption); - . . . . . . . . . if (triggerEdgeLeaveBindings - . . . . . . . . . (d, option, nOption, state, edge, o, 5)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - 36 3 1 24 3 1 0 0 0 else if (event->xclient.message_type == d->reloadSettingsAtom) - . . . . . . . . . { - . . . . . . . . . reload_all(d); - . . . . . . . . . } - . . . . . . . . . - 36 2 1 24 0 0 0 0 0 else if (event->xclient.message_type == d->xdndPositionAtom) - . . . . . . . . . { - . . . . . . . . . unsigned int edge = 0; - . . . . . . . . . CompActionState state; - . . . . . . . . . Window root = None; - . . . . . . . . . - . . . . . . . . . if (xdndWindow == event->xclient.window) - . . . . . . . . . { - . . . . . . . . . CompWindow *w; --- line 1070 ---------------------------------------- --- line 1114 ---------------------------------------- - . . . . . . . . . (d, option, nOption, state, edge, o, 5)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . xdndWindow = None; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . default: -39,060 99 2 26,040 0 0 0 0 0 if (event->type == d->xkbEvent) - . . . . . . . . . { - 34 0 0 17 0 0 17 17 0 XkbAnyEvent *xkbEvent = (XkbAnyEvent *) event; - . . . . . . . . . - 68 16 1 34 0 0 0 0 0 if (xkbEvent->xkb_type == XkbStateNotify) - . . . . . . . . . { - . . . . . . . . . XkbStateNotifyEvent *stateEvent = - 32 0 0 16 0 0 16 0 0 (XkbStateNotifyEvent *) event; - . . . . . . . . . - 64 0 0 16 0 0 32 32 1 option = compGetDisplayOptions(d, &nOption); - . . . . . . . . . - 48 0 0 32 16 0 16 0 0 o[0].value.i = d->activeWindow; - 48 15 1 32 16 0 16 0 0 o[1].value.i = stateEvent->mods; - . . . . . . . . . - 16 0 0 0 0 0 16 0 0 o[2].type = CompOptionTypeInt; - 16 0 0 0 0 0 16 0 0 o[2].name = "time"; - 48 0 0 32 0 0 16 0 0 o[2].value.i = xkbEvent->time; - . . . . . . . . . - 1,440 15 1 832 80 5 304 0 0 for (p = getPlugins(); p; p = p->next) - . . . . . . . . . { - 1,360 15 1 816 544 29 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - 1,344 0 0 768 0 0 384 0 0 option = (*p->vTable-> - . . . . . . . . . getDisplayOptions) (d, &nOption); - 1,920 0 0 768 0 0 192 0 0 if (triggerStateNotifyBindings - . . . . . . . . . (d, option, nOption, stateEvent, o, 3)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 64 15 1 16 0 0 32 0 0 option = compGetDisplayOptions(d, &nOption); - 160 0 0 64 0 0 16 0 0 if (triggerStateNotifyBindings - . . . . . . . . . (d, option, nOption, stateEvent, o, 3)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - 4 1 1 2 0 0 0 0 0 else if (xkbEvent->xkb_type == XkbBellNotify) - . . . . . . . . . { - 4 0 0 1 0 0 2 2 0 option = compGetDisplayOptions(d, &nOption); - . . . . . . . . . - 3 1 1 2 1 0 1 0 0 o[0].value.i = d->activeWindow; - . . . . . . . . . - 1 0 0 0 0 0 1 0 0 o[1].type = CompOptionTypeInt; - 1 0 0 0 0 0 1 0 0 o[1].name = "time"; - 3 0 0 2 0 0 1 0 0 o[1].value.i = xkbEvent->time; - . . . . . . . . . - 90 1 1 52 5 0 19 0 0 for (p = getPlugins(); p; p = p->next) - . . . . . . . . . { - 85 1 1 51 34 0 0 0 0 if (p->vTable->getDisplayOptions) - . . . . . . . . . { - 84 0 0 48 0 0 24 0 0 option = (*p->vTable-> - . . . . . . . . . getDisplayOptions) (d, &nOption); - 96 0 0 36 0 0 12 0 0 if (triggerBellNotifyBindings - . . . . . . . . . (d, option, nOption, o, 2)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - 4 0 0 1 0 0 2 0 0 option = compGetDisplayOptions(d, &nOption); - 8 0 0 3 0 0 1 0 0 if (triggerBellNotifyBindings(d, option, nOption, o, 2)) - . . . . . . . . . return TRUE; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . -13,119 94 2 6,560 0 0 6,559 0 0 return FALSE; -13,120 0 0 13,120 2 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . handleBerylEvent(CompDisplay * d, - . . . . . . . . . char *pluginName, - . . . . . . . . . char *eventName, CompOption * option, int nOption) - . . . . . . . . . { - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void handleEvent(CompDisplay * d, XEvent * event) -32,800 95 2 0 0 0 19,680 148 1 { - . . . . . . . . . CompScreen *s; - . . . . . . . . . CompWindow *w; - . . . . . . . . . -52,428 94 2 26,223 0 0 6,560 0 0 switch (event->type) - . . . . . . . . . { - . . . . . . . . . case ButtonPress: - 5 0 0 3 0 0 2 1 0 s = findScreenAtDisplay(d, event->xbutton.root); - 2 1 0 1 0 0 0 0 0 if (s) - 9 0 0 6 0 0 2 0 0 setCurrentOutput(s, outputDeviceForPoint(s, - . . . . . . . . . event-> - . . . . . . . . . xbutton. - . . . . . . . . . x_root, - . . . . . . . . . event->xbutton.y_root)); - 1 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case KeyPress: - 85 24 1 51 9 0 34 23 0 w = findWindowAtDisplay(d, d->activeWindow); - 34 0 0 17 0 0 0 0 0 if (w) - 102 0 0 51 0 0 34 0 0 setCurrentOutput(w->screen, outputDeviceForWindow(w)); - . . . . . . . . . default: - . . . . . . . . . break; - . . . . . . . . . } - . . . . . . . . . -32,800 103 2 13,120 0 0 6,560 100 1 if (handleActionEvent(d, event)) - . . . . . . . . . { - 5 0 0 3 0 0 0 0 0 if (!d->screens->maxGrab) - . . . . . . . . . XAllowEvents(d->display, AsyncPointer, event->xbutton.time); - . . . . . . . . . - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . -40,530 196 4 20,461 145 8 6,559 0 0 switch (event->type) - . . . . . . . . . { - . . . . . . . . . case Expose: - . . . . . . . . . s = findScreenAtDisplay(d, event->xexpose.window); - . . . . . . . . . if (s) - . . . . . . . . . { - . . . . . . . . . int more = event->xexpose.count + 1; - . . . . . . . . . - . . . . . . . . . if (s->nExpose == s->sizeExpose) --- line 1237 ---------------------------------------- --- line 1283 ---------------------------------------- - . . . . . . . . . break; - . . . . . . . . . case SelectionRequest: - . . . . . . . . . handleSelectionRequest(d, event); - . . . . . . . . . break; - . . . . . . . . . case SelectionClear: - . . . . . . . . . handleSelectionClear(d, event); - . . . . . . . . . break; - . . . . . . . . . case ConfigureNotify: - 85 3 2 51 0 0 34 0 0 w = findWindowAtDisplay(d, event->xconfigure.window); - 34 0 0 17 0 0 0 0 0 if (w) - . . . . . . . . . { - 68 3 2 34 0 0 17 0 0 configureWindow(w, &event->xconfigure); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . s = findScreenAtDisplay(d, event->xconfigure.window); - . . . . . . . . . if (s) - . . . . . . . . . configureScreen(s, &event->xconfigure); - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case CreateNotify: - 85 9 2 51 0 0 34 8 0 s = findScreenAtDisplay(d, event->xcreatewindow.parent); - 34 0 0 17 0 0 0 0 0 if (s) - . . . . . . . . . { - . . . . . . . . . /* The first time some client asks for the composite - . . . . . . . . . * overlay window, the X server creates it, which causes - . . . . . . . . . * an errorneous CreateNotify event. We catch it and - . . . . . . . . . * ignore it. */ - 153 9 2 85 13 0 0 0 0 if (!useCow || s->overlay != event->xcreatewindow.window) - 119 4 2 68 0 0 34 0 0 addWindow(s, event->xcreatewindow.window, getTopWindow(s)); - . . . . . . . . . } - 17 6 0 0 0 0 0 0 0 break; - . . . . . . . . . case DestroyNotify: - 15 0 0 9 0 0 6 3 0 w = findWindowAtDisplay(d, event->xdestroywindow.window); - 6 3 1 3 0 0 0 0 0 if (w) - . . . . . . . . . { - 6 0 0 3 0 0 3 0 0 moveInputFocusToOtherWindow(w); - 6 0 0 3 0 0 3 0 0 destroyWindow(w); - . . . . . . . . . } - 3 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case MapNotify: - 50 3 1 30 0 0 20 8 0 w = findWindowAtDisplay(d, event->xmap.window); - 20 4 2 10 0 0 0 0 0 if (w) - . . . . . . . . . { - . . . . . . . . . /* been shaded */ - 36 0 0 18 8 0 0 0 0 if (w->height == 0) - . . . . . . . . . { - . . . . . . . . . if (w->id == d->activeWindow) - . . . . . . . . . moveInputFocusToWindow(w); - . . . . . . . . . } - . . . . . . . . . - 18 2 1 9 0 0 9 0 0 mapWindow(w); - . . . . . . . . . } - 9 1 0 0 0 0 0 0 0 break; - . . . . . . . . . case UnmapNotify: - 35 2 1 21 0 0 14 0 0 w = findWindowAtDisplay(d, event->xunmap.window); - 14 3 2 7 0 0 0 0 0 if (w) - . . . . . . . . . { - . . . . . . . . . /* Normal -> Iconic */ - 28 0 0 14 0 0 0 0 0 if (w->pendingUnmaps) - . . . . . . . . . { - . . . . . . . . . setWmState(d, IconicState, w->id); - . . . . . . . . . w->pendingUnmaps--; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { /* X -> Withdrawn */ - . . . . . . . . . - . . . . . . . . . /* Iconic -> Withdrawn */ - 35 3 2 14 0 0 0 0 0 if (w->state & CompWindowStateHiddenMask) - . . . . . . . . . { - . . . . . . . . . w->minimized = FALSE; - . . . . . . . . . w->state &= ~CompWindowStateHiddenMask; - . . . . . . . . . - . . . . . . . . . (*w->screen->windowStateChangeNotify) (w); - . . . . . . . . . - . . . . . . . . . setWindowState(d, w->state, w->id); - . . . . . . . . . updateClientListForScreen(w->screen); - . . . . . . . . . } - . . . . . . . . . - 28 4 2 14 2 0 0 0 0 if (!w->attrib.override_redirect) - 20 3 2 12 0 0 4 0 0 setWmState(d, WithdrawnState, w->id); - . . . . . . . . . - 14 1 0 7 0 0 7 0 0 w->placed = FALSE; - 14 0 0 7 0 0 7 0 0 w->managed = FALSE; - . . . . . . . . . } - . . . . . . . . . - 14 0 0 7 0 0 7 0 0 unmapWindow(w); - . . . . . . . . . - 28 4 1 14 0 0 0 0 0 if (!w->shaded) - 14 0 0 7 0 0 7 0 0 moveInputFocusToOtherWindow(w); - . . . . . . . . . } - 7 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case ReparentNotify: - 5 2 2 3 0 0 2 0 0 w = findWindowAtDisplay(d, event->xreparent.window); - 5 0 0 3 1 0 2 0 0 s = findScreenAtDisplay(d, event->xreparent.parent); - 2 0 0 1 0 0 0 0 0 if (s && !w) - . . . . . . . . . { - . . . . . . . . . addWindow(s, event->xreparent.window, getTopWindow(s)); - . . . . . . . . . } - 2 1 1 1 0 0 0 0 0 else if (w) - . . . . . . . . . { - . . . . . . . . . /* This is the only case where a window is removed but not - . . . . . . . . . destroyed. We must remove our event mask and all passive - . . . . . . . . . grabs. */ - 6 1 1 4 0 0 1 0 0 XSelectInput(d->display, w->id, NoEventMask); - 6 0 0 4 0 0 1 0 0 XShapeSelectInput(d->display, w->id, NoEventMask); - 7 1 1 4 0 0 1 0 0 XUngrabButton(d->display, AnyButton, AnyModifier, w->id); - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 moveInputFocusToOtherWindow(w); - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 destroyWindow(w); - . . . . . . . . . } - 1 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case CirculateNotify: - . . . . . . . . . w = findWindowAtDisplay(d, event->xcirculate.window); - . . . . . . . . . if (w) - . . . . . . . . . circulateWindow(w, &event->xcirculate); - . . . . . . . . . break; - . . . . . . . . . case ButtonPress: - . . . . . . . . . s = findScreenAtDisplay(d, event->xbutton.root); - . . . . . . . . . if (s) --- line 1403 ---------------------------------------- --- line 1416 ---------------------------------------- - . . . . . . . . . moveInputFocusToWindow(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . if (!s->maxGrab) - . . . . . . . . . XAllowEvents(d->display, ReplayPointer, event->xbutton.time); - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case PropertyNotify: - 1,050 45 4 700 0 0 0 0 0 if (event->xproperty.atom == d->winActiveAtom) - . . . . . . . . . { - . . . . . . . . . Window newActiveWindow; - . . . . . . . . . - 20 0 0 12 0 0 8 0 0 newActiveWindow = getActiveWindow(d, event->xproperty.window); - 16 3 2 12 0 0 0 0 0 if (newActiveWindow != d->activeWindow) - . . . . . . . . . { - 9 0 0 6 0 0 3 0 0 d->activeWindow = newActiveWindow; - . . . . . . . . . - 15 0 0 9 0 0 6 0 0 s = findScreenAtDisplay(d, event->xproperty.window); - 6 3 2 3 0 0 0 0 0 if (s) - . . . . . . . . . { - 12 0 0 6 0 0 6 0 0 w = findWindowAtDisplay(d, newActiveWindow); - 6 0 0 3 0 0 0 0 0 if (w) - 24 0 0 12 3 0 6 0 0 w->activeNum = s->activeNum++; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . } - 1,026 12 2 684 0 0 0 0 0 else if (event->xproperty.atom == d->winTypeAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . unsigned int type; - . . . . . . . . . - . . . . . . . . . type = getWindowType(d, w->id); - . . . . . . . . . --- line 1451 ---------------------------------------- --- line 1472 ---------------------------------------- - . . . . . . . . . setDesktopForWindow(w, 0xffffffff); - . . . . . . . . . - . . . . . . . . . updateClientListForScreen(w->screen); - . . . . . . . . . } - . . . . . . . . . } else - . . . . . . . . . fprintf(stderr, "beryl: core: Received winTypeAtom " - . . . . . . . . . "but unable to find the window for the event\n"); - . . . . . . . . . } - 1,026 26 2 684 24 2 0 0 0 else if (event->xproperty.atom == d->winStateAtom) - . . . . . . . . . { - 60 8 2 36 0 0 24 1 0 w = findWindowAtDisplay(d, event->xproperty.window); - 72 0 0 36 4 0 0 0 0 if (w && !w->managed) - . . . . . . . . . { - . . . . . . . . . unsigned int state; - . . . . . . . . . - 20 2 2 12 0 0 8 0 0 state = getWindowState(d, w->id); - . . . . . . . . . - 28 0 0 12 1 0 0 0 0 if ((state & - . . . . . . . . . ~CompWindowStateDemandsAttentionMask) - . . . . . . . . . != (w->state & ~CompWindowStateDemandsAttentionMask)) - . . . . . . . . . { - 3 0 0 2 0 0 1 0 0 w->state = state; - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 recalcWindowType(w); - 2 1 1 1 0 0 1 0 0 recalcWindowActions(w); - . . . . . . . . . - 5 0 0 2 0 0 0 0 0 if (w->type & CompWindowTypeDesktopMask) - . . . . . . . . . w->paint.opacity = OPAQUE; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 12 1 1 6 0 0 3 0 0 w->state = state; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 636 23 2 318 0 0 0 0 0 else if (event->xproperty.atom == XA_WM_NORMAL_HINTS) - . . . . . . . . . { - 5 0 0 3 0 0 2 0 0 w = findWindowAtDisplay(d, event->xproperty.window); - 2 0 0 1 0 0 0 0 0 if (w) - . . . . . . . . . { - 2 0 0 1 0 0 1 0 0 updateNormalHints(w); - 3 0 0 1 0 0 1 0 0 recalcWindowActions(w); - . . . . . . . . . } - . . . . . . . . . } - 632 24 2 316 0 0 0 0 0 else if (event->xproperty.atom == XA_WM_HINTS) - . . . . . . . . . { - 45 3 0 27 0 0 18 1 0 w = findWindowAtDisplay(d, event->xproperty.window); - 18 0 0 9 0 0 0 0 0 if (w) - 27 0 0 9 0 0 9 0 0 updateWmHints(w); - . . . . . . . . . } - 596 45 4 298 0 0 0 0 0 else if (event->xproperty.atom == XA_WM_TRANSIENT_FOR) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . updateTransientHint(w); - . . . . . . . . . } - 894 23 2 596 24 1 0 0 0 else if (event->xproperty.atom == d->wmClientLeaderAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . w->clientLeader = getClientLeader(w); - . . . . . . . . . } - 894 46 4 596 0 0 0 0 0 else if (event->xproperty.atom == d->winOpacityAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w && (w->type & CompWindowTypeDesktopMask) == 0) - . . . . . . . . . { - . . . . . . . . . GLushort opacity; - . . . . . . . . . - . . . . . . . . . opacity = getWindowProp32(d, w->id, - . . . . . . . . . d->winOpacityAtom, OPAQUE); - . . . . . . . . . if (opacity != w->opacity) - . . . . . . . . . { - . . . . . . . . . w->opacity = w->paint.opacity = opacity; - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 894 22 2 596 0 0 0 0 0 else if (event->xproperty.atom == d->winBrightnessAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . GLushort brightness; - . . . . . . . . . - . . . . . . . . . brightness = getWindowProp32(d, w->id, - . . . . . . . . . d->winBrightnessAtom, BRIGHT); --- line 1558 ---------------------------------------- --- line 1562 ---------------------------------------- - . . . . . . . . . if (w->alive) - . . . . . . . . . { - . . . . . . . . . w->paint.brightness = w->brightness; - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 894 23 2 596 0 0 0 0 0 else if (event->xproperty.atom == d->winSaturationAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w && w->screen->canDoSaturated) - . . . . . . . . . { - . . . . . . . . . GLushort saturation; - . . . . . . . . . - . . . . . . . . . saturation = getWindowProp32(d, w->id, - . . . . . . . . . d->winSaturationAtom, COLOR); --- line 1578 ---------------------------------------- --- line 1582 ---------------------------------------- - . . . . . . . . . if (w->alive) - . . . . . . . . . { - . . . . . . . . . w->paint.saturation = w->saturation; - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 1,788 22 2 1,192 27 2 0 0 0 else if (event->xproperty.atom == d->xBackgroundAtom[0] - . . . . . . . . . || event->xproperty.atom == d->xBackgroundAtom[1]) - . . . . . . . . . { - . . . . . . . . . s = findScreenAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (s) - . . . . . . . . . { - . . . . . . . . . finiTexture(s, &s->backgroundTexture); - . . . . . . . . . initTexture(s, &s->backgroundTexture); - . . . . . . . . . - . . . . . . . . . damageScreen(s); - . . . . . . . . . } - . . . . . . . . . } - 1,788 48 4 1,192 26 2 0 0 0 else if (event->xproperty.atom == d->wmStrutAtom || - . . . . . . . . . event->xproperty.atom == d->wmStrutPartialAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . if (updateWindowStruts(w)) - . . . . . . . . . updateWorkareaForScreen(w->screen); - . . . . . . . . . } - . . . . . . . . . } - 894 23 2 596 24 2 0 0 0 else if (event->xproperty.atom == d->mwmHintsAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . getMwmHints(d, w->id, &w->mwmFunc, &w->mwmDecor); - . . . . . . . . . - . . . . . . . . . recalcWindowActions(w); - . . . . . . . . . } - . . . . . . . . . } - 894 22 2 596 0 0 0 0 0 else if (event->xproperty.atom == d->wmProtocolsAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . w->protocols = getProtocols(d, w->id); - . . . . . . . . . } - 894 22 2 596 0 0 0 0 0 else if (event->xproperty.atom == d->wmIconAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . freeWindowIcons(w); - . . . . . . . . . } - 894 20 2 596 28 0 0 0 0 else if (event->xproperty.atom == d->startupIdAtom) - . . . . . . . . . { - 5 1 1 3 0 0 2 0 0 w = findWindowAtDisplay(d, event->xproperty.window); - 2 0 0 1 0 0 0 0 0 if (w) - . . . . . . . . . { - 4 0 0 2 1 1 0 0 0 if (w->startupId) - . . . . . . . . . free(w->startupId); - . . . . . . . . . - 6 0 0 2 0 0 2 0 0 w->startupId = getStartupId(w); - . . . . . . . . . } - . . . . . . . . . } - 592 44 4 296 0 0 0 0 0 else if (event->xproperty.atom == XA_WM_CLASS) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xproperty.window); - . . . . . . . . . if (w) - . . . . . . . . . updateWindowClassHints(w); - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case MotionNotify: - . . . . . . . . . break; - . . . . . . . . . case ClientMessage: - 36 3 1 24 1 0 0 0 0 if (event->xclient.message_type == d->winActiveAtom) - . . . . . . . . . { - 3 0 0 2 1 0 1 1 0 Time t = event->xclient.data.l[1]; - . . . . . . . . . CompWindow *prew = findWindowAtDisplay(d, - 6 1 1 3 0 0 2 1 0 event->xclient.data.l[2]); - 3 0 0 2 1 0 1 0 0 int typ = event->xclient.data.l[0]; - . . . . . . . . . - 5 0 0 3 0 0 2 0 0 w = findWindowAtDisplay(d, event->xclient.window); - 2 1 1 1 0 0 0 0 0 if (w) - . . . . . . . . . { - 3 0 0 1 0 0 1 0 0 activateWindow(w); - . . . . . . . . . #if 0 - . . . . . . . . . if (typ != 1) - . . . . . . . . . activateWindow(w); - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . if (shouldFocusWindow(w, t, False)) - . . . . . . . . . activateWindow(w); - . . . . . . . . . else if (prew) --- line 1673 ---------------------------------------- --- line 1677 ---------------------------------------- - . . . . . . . . . if (getWindowUserTime(prew, &t2)) - . . . . . . . . . if (shouldFocusWindow(prew, t2, False)) - . . . . . . . . . activateWindow(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . #endif - . . . . . . . . . } - . . . . . . . . . } - 30 2 0 20 0 0 0 0 0 else if (event->xclient.message_type == d->winOpacityAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w && (w->type & CompWindowTypeDesktopMask) == 0) - . . . . . . . . . { - . . . . . . . . . GLushort opacity; - . . . . . . . . . - . . . . . . . . . opacity = event->xclient.data.l[0] >> 16; - . . . . . . . . . if (opacity != w->paint.opacity) --- line 1693 ---------------------------------------- --- line 1695 ---------------------------------------- - . . . . . . . . . w->paint.opacity = opacity; - . . . . . . . . . - . . . . . . . . . setWindowProp32(d, w->id, - . . . . . . . . . d->winOpacityAtom, w->paint.opacity); - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 30 2 1 20 0 0 0 0 0 else if (event->xclient.message_type == d->winBrightnessAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . GLushort brightness; - . . . . . . . . . - . . . . . . . . . brightness = event->xclient.data.l[0] >> 16; - . . . . . . . . . if (brightness != w->paint.brightness) --- line 1711 ---------------------------------------- --- line 1714 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . setWindowProp32(d, w->id, - . . . . . . . . . d-> - . . . . . . . . . winBrightnessAtom, w->paint.brightness); - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 30 2 1 20 0 0 0 0 0 else if (event->xclient.message_type == d->winSaturationAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w && w->screen->canDoSaturated) - . . . . . . . . . { - . . . . . . . . . GLushort saturation; - . . . . . . . . . - . . . . . . . . . saturation = event->xclient.data.l[0] >> 16; - . . . . . . . . . if (saturation != w->saturation) --- line 1730 ---------------------------------------- --- line 1737 ---------------------------------------- - . . . . . . . . . if (w->alive) - . . . . . . . . . { - . . . . . . . . . w->paint.saturation = w->saturation; - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 30 6 2 20 0 0 0 0 0 else if (event->xclient.message_type == d->winStateAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . unsigned long wState, state; - . . . . . . . . . int i; - . . . . . . . . . - . . . . . . . . . wState = w->state; --- line 1753 ---------------------------------------- --- line 1798 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . w->state = wState; - . . . . . . . . . setWindowState(d, w->state, w->id); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 30 2 1 20 2 0 0 0 0 else if (event->xclient.message_type == d->wmProtocolsAtom) - . . . . . . . . . { - 7 1 1 4 0 0 0 0 0 if (event->xclient.data.l[0] == d->wmPingAtom) - . . . . . . . . . { - 6 0 0 3 0 0 2 1 0 w = findWindowAtDisplay(d, event->xclient.data.l[2]); - 2 1 1 1 0 0 0 0 0 if (w) - . . . . . . . . . { - 4 0 0 2 1 0 0 0 0 if (!w->alive) - . . . . . . . . . { - . . . . . . . . . w->alive = TRUE; - . . . . . . . . . w->paint.saturation = w->saturation; - . . . . . . . . . w->paint.brightness = w->brightness; - . . . . . . . . . - . . . . . . . . . if (w->lastCloseRequestTime) - . . . . . . . . . { - . . . . . . . . . toolkitAction(w-> --- line 1821 ---------------------------------------- --- line 1826 ---------------------------------------- - . . . . . . . . . lastCloseRequestTime, - . . . . . . . . . w->id, FALSE, 0, 0); - . . . . . . . . . - . . . . . . . . . w->lastCloseRequestTime = 0; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . addWindowDamage(w); - . . . . . . . . . } - 5 1 0 3 0 0 1 0 0 w->lastPong = d->lastPing; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 24 1 1 16 0 0 0 0 0 else if (event->xclient.message_type == d->closeWindowAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . closeWindow(w, event->xclient.data.l[0]); - . . . . . . . . . } - 24 2 2 16 0 0 0 0 0 else if (event->xclient.message_type == d->desktopGeometryAtom) - . . . . . . . . . { - . . . . . . . . . s = findScreenAtDisplay(d, event->xclient.window); - . . . . . . . . . if (s) - . . . . . . . . . { - . . . . . . . . . CompOptionValue value; - . . . . . . . . . - . . . . . . . . . value.i = event->xclient.data.l[0] / s->width; - . . . . . . . . . - . . . . . . . . . (*s->setScreenOption) (s, "hsize", &value); - . . . . . . . . . - . . . . . . . . . value.i = event->xclient.data.l[1] / s->height; - . . . . . . . . . - . . . . . . . . . (*s->setScreenOption) (s, "vsize", &value); - . . . . . . . . . } - . . . . . . . . . } - 24 1 1 16 0 0 0 0 0 else if (event->xclient.message_type == d->moveResizeWindowAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . unsigned int xwcm = 0; - . . . . . . . . . XWindowChanges xwc; - . . . . . . . . . int gravity; - . . . . . . . . . --- line 1868 ---------------------------------------- --- line 1892 ---------------------------------------- - . . . . . . . . . xwc.height = event->xclient.data.l[4]; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . gravity = event->xclient.data.l[0] & 0xFF; - . . . . . . . . . - . . . . . . . . . moveResizeWindow(w, &xwc, xwcm, gravity); - . . . . . . . . . } - . . . . . . . . . } - 24 2 2 16 0 0 0 0 0 else if (event->xclient.message_type == d->restackWindowAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . /* TODO: other stack modes than Above and Below */ - . . . . . . . . . if (event->xclient.data.l[1]) - . . . . . . . . . { - . . . . . . . . . CompWindow *sibling; --- line 1908 ---------------------------------------- --- line 1921 ---------------------------------------- - . . . . . . . . . { - . . . . . . . . . if (event->xclient.data.l[2] == Above) - . . . . . . . . . raiseWindow(w); - . . . . . . . . . else if (event->xclient.data.l[2] == Below) - . . . . . . . . . lowerWindow(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 24 1 1 16 0 0 0 0 0 else if (event->xclient.message_type == d->wmChangeStateAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w && w->type & CompWindowTypeNormalMask) - . . . . . . . . . { - . . . . . . . . . if (event->xclient.data.l[0] == IconicState) - . . . . . . . . . minimizeWindow(w); - . . . . . . . . . else if (event->xclient.data.l[0] == NormalState) - . . . . . . . . . unminimizeWindow(w); - . . . . . . . . . } - . . . . . . . . . } - 24 1 1 16 0 0 0 0 0 else if (event->xclient.message_type == d->showingDesktopAtom) - . . . . . . . . . { - . . . . . . . . . for (s = d->screens; s; s = s->next) - . . . . . . . . . { - . . . . . . . . . if (event->xclient.window == s->root || - . . . . . . . . . event->xclient.window == None) - . . . . . . . . . { - . . . . . . . . . if (event->xclient.data.l[0]) - . . . . . . . . . enterShowDesktopMode(s); - . . . . . . . . . else - . . . . . . . . . leaveShowDesktopMode(s, NULL); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 24 2 2 16 0 0 0 0 0 else if (event->xclient.message_type == d->numberOfDesktopsAtom) - . . . . . . . . . { - . . . . . . . . . s = findScreenAtDisplay(d, event->xclient.window); - . . . . . . . . . if (s) - . . . . . . . . . { - . . . . . . . . . CompOptionValue value; - . . . . . . . . . - . . . . . . . . . value.i = event->xclient.data.l[0]; - . . . . . . . . . - . . . . . . . . . (*s->setScreenOption) (s, "number_of_desktops", &value); - . . . . . . . . . } - . . . . . . . . . } - 24 2 2 16 0 0 0 0 0 else if (event->xclient.message_type == d->currentDesktopAtom) - . . . . . . . . . { - . . . . . . . . . s = findScreenAtDisplay(d, event->xclient.window); - . . . . . . . . . if (s) - . . . . . . . . . setCurrentDesktop(s, event->xclient.data.l[0]); - . . . . . . . . . } - 24 1 1 16 0 0 0 0 0 else if (event->xclient.message_type == d->winDesktopAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . setDesktopForWindow(w, event->xclient.data.l[0]); - . . . . . . . . . } - 24 1 1 16 2 0 0 0 0 else if (event->xclient.message_type == d->changeFrameWindowAtom) - . . . . . . . . . { - . . . . . . . . . w = findWindowAtDisplay(d, event->xclient.window); - . . . . . . . . . if (w) - . . . . . . . . . { - . . . . . . . . . if (w->frame && !w->frameLock) - . . . . . . . . . XDestroyWindow(d->display, w->frame); - . . . . . . . . . w->frame = event->xclient.data.l[0]; - . . . . . . . . . w->frameLock = event->xclient.data.l[1]; --- line 1986 ---------------------------------------- --- line 2007 ---------------------------------------- - . . . . . . . . . 1); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case MappingNotify: - . . . . . . . . . updateModifierMappings(d); - . . . . . . . . . break; - . . . . . . . . . case MapRequest: - 5 1 1 3 0 0 2 0 0 w = findWindowAtDisplay(d, event->xmaprequest.window); - 2 0 0 1 0 0 0 0 0 if (w) - . . . . . . . . . { - 4 0 0 2 0 0 0 0 0 if (w->minimized) - . . . . . . . . . unminimizeWindow(w); - . . . . . . . . . - 4 1 1 3 0 0 1 0 0 leaveShowDesktopMode(w->screen, w); - . . . . . . . . . - 2 0 0 1 0 0 1 0 0 w->managed = TRUE; - . . . . . . . . . - 5 1 1 2 0 0 0 0 0 if (!(w->state & CompWindowStateHiddenMask)) - . . . . . . . . . { - 6 0 0 4 0 0 1 0 0 w->initialViewportX = w->screen->x; - 6 0 0 4 0 0 1 0 0 w->initialViewportY = w->screen->y; - . . . . . . . . . - 4 1 1 3 0 0 1 0 0 applyStartupProperties(w->screen, w); - . . . . . . . . . - 5 0 0 3 0 0 1 0 0 w->pendingMaps++; - . . . . . . . . . - 5 1 1 4 0 0 1 0 0 XMapWindow(d->display, event->xmaprequest.window); - . . . . . . . . . - 3 0 0 1 0 0 1 0 0 updateWindowAttributes(w, FALSE); - . . . . . . . . . - 2 0 0 1 1 0 1 0 0 moveInputFocusToWindow(w); - . . . . . . . . . #if 0 - . . . . . . . . . if (shouldFocusWindow(w, -1U, False)) - . . . . . . . . . moveInputFocusToWindow(w); - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . CompWindow *ow; - . . . . . . . . . - . . . . . . . . . ow = findWindowAtDisplay(d, d->activeWindow); --- line 2046 ---------------------------------------- --- line 2048 ---------------------------------------- - . . . . . . . . . { - . . . . . . . . . moveInputFocusToWindow(ow); - . . . . . . . . . lowerWindow(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . #endif - . . . . . . . . . } - . . . . . . . . . - 9 1 1 7 3 0 1 0 0 setWindowProp(d, w->id, d->winDesktopAtom, w->desktop); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . XMapWindow(d->display, event->xmaprequest.window); - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case ConfigureRequest: - 20 4 2 12 0 0 8 3 0 w = findWindowAtDisplay(d, event->xconfigurerequest.window); - 24 3 2 12 2 0 0 0 0 if (w && w->managed) - . . . . . . . . . { - . . . . . . . . . XWindowChanges xwc; - . . . . . . . . . - . . . . . . . . . memset(&xwc, 0, sizeof(xwc)); - . . . . . . . . . - . . . . . . . . . xwc.x = event->xconfigurerequest.x; - . . . . . . . . . xwc.y = event->xconfigurerequest.y; - . . . . . . . . . xwc.width = event->xconfigurerequest.width; --- line 2073 ---------------------------------------- --- line 2076 ---------------------------------------- - . . . . . . . . . - . . . . . . . . . moveResizeWindow(w, &xwc, event->xconfigurerequest.value_mask, 0); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - . . . . . . . . . XWindowChanges xwc; - . . . . . . . . . unsigned int xwcm; - . . . . . . . . . - 16 4 2 8 3 0 4 0 0 xwcm = event->xconfigurerequest.value_mask & - . . . . . . . . . (CWX | CWY | CWWidth | CWHeight | CWBorderWidth); - . . . . . . . . . - 12 4 2 8 3 0 4 3 0 xwc.x = event->xconfigurerequest.x; - 12 0 0 8 0 0 4 0 0 xwc.y = event->xconfigurerequest.y; - 12 0 0 8 0 0 4 0 0 xwc.width = event->xconfigurerequest.width; - 12 0 0 8 0 0 4 0 0 xwc.height = event->xconfigurerequest.height; - 12 4 2 8 0 0 4 0 0 xwc.border_width = event->xconfigurerequest.border_width; - . . . . . . . . . - 8 0 0 4 0 0 0 0 0 if (w) - 20 0 0 8 0 0 4 0 0 configureXWindow(w, xwcm, &xwc); - . . . . . . . . . else - . . . . . . . . . XConfigureWindow(d->display, - . . . . . . . . . event->xconfigurerequest.window, xwcm, &xwc); - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . case CirculateRequest: - . . . . . . . . . break; - . . . . . . . . . case FocusIn: - 72 9 2 36 0 0 0 0 0 if (event->xfocus.mode != NotifyGrab) - . . . . . . . . . { - 60 6 2 36 0 0 24 3 0 w = findWindowAtDisplay(d, event->xfocus.window); - 56 0 0 28 6 0 0 0 0 if (w && w->managed) - . . . . . . . . . { - 16 0 0 8 0 0 8 0 0 windowClearUrgentHint(w); - 48 7 2 32 7 0 0 0 0 if (w->id != d->activeWindow) - . . . . . . . . . { - . . . . . . . . . /*if (!shouldFocusWindow(w,-1,True)) - . . . . . . . . . { - . . . . . . . . . CompWindow * aaw = findWindowAtDisplay( - . . . . . . . . . d,d->activeWindow); - . . . . . . . . . moveInputFocusToWindow(aaw); - . . . . . . . . . } - . . . . . . . . . else */ - . . . . . . . . . { - 68 4 1 32 8 0 12 0 0 XChangeProperty(d->display, - . . . . . . . . . w->screen-> - . . . . . . . . . root, - . . . . . . . . . d-> - . . . . . . . . . winActiveAtom, - . . . . . . . . . XA_WINDOW, - . . . . . . . . . 32, - . . . . . . . . . PropModeReplace, - . . . . . . . . . (unsigned char *)&w->id, 1); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 4 0 0 0 0 0 0 0 0 break; - . . . . . . . . . case EnterNotify: - 62 12 1 34 2 0 0 0 0 if (!d->screens->maxGrab && - . . . . . . . . . event->xcrossing.mode != NotifyGrab && - . . . . . . . . . event->xcrossing.detail != NotifyInferior) - . . . . . . . . . { - . . . . . . . . . Bool raise; - . . . . . . . . . int delay; - . . . . . . . . . - 12 4 1 8 4 0 4 0 0 raise = d->opt[COMP_DISPLAY_OPTION_AUTORAISE].value.b; - 12 0 0 8 4 0 4 0 0 delay = d->opt[COMP_DISPLAY_OPTION_AUTORAISE_DELAY].value.i; - . . . . . . . . . - 20 0 0 12 0 0 8 2 0 s = findScreenAtDisplay(d, event->xcrossing.root); - 8 4 1 4 0 0 0 0 0 if (s) - . . . . . . . . . { - 24 0 0 12 0 0 8 0 0 w = findTopLevelWindowAtScreen(s, event->xcrossing.window); - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . w = NULL; - . . . . . . . . . - 32 4 1 20 4 0 0 0 0 if (w && w->id != d->below) - . . . . . . . . . { - 12 0 0 9 0 0 3 0 0 d->below = w->id; - . . . . . . . . . - 12 3 1 6 3 0 0 0 0 if (!d->opt[COMP_DISPLAY_OPTION_CLICK_TO_FOCUS].value.b) - . . . . . . . . . { - . . . . . . . . . if (d->autoRaiseHandle && d->autoRaiseWindow != w->id) - . . . . . . . . . { - . . . . . . . . . compRemoveTimeout(d->autoRaiseHandle); - . . . . . . . . . d->autoRaiseHandle = 0; - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . if (w-> --- line 2164 ---------------------------------------- --- line 2187 ---------------------------------------- - . . . . . . . . . case LeaveNotify: - . . . . . . . . . if (event->xcrossing.detail != NotifyInferior) - . . . . . . . . . { - . . . . . . . . . if (event->xcrossing.window == d->below) - . . . . . . . . . d->below = None; - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . default: -37,134 61 4 24,756 0 0 0 0 0 if (event->type == d->damageEvent + XDamageNotify) - . . . . . . . . . { -12,146 0 0 6,073 0 0 6,073 37 1 XDamageNotifyEvent *de = (XDamageNotifyEvent *) event; - . . . . . . . . . -60,693 9 1 30,353 33 0 0 0 0 if (lastDamagedWindow && de->drawable == lastDamagedWindow->id) - . . . . . . . . . { -12,108 0 0 6,054 0 0 6,054 9 1 w = lastDamagedWindow; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { - 95 1 1 57 0 0 38 4 0 w = findWindowAtDisplay(d, de->drawable); - 38 0 0 19 0 0 0 0 0 if (w) - 24 7 1 12 0 0 12 0 0 lastDamagedWindow = w; - . . . . . . . . . } - . . . . . . . . . -12,146 11 1 6,073 0 0 0 0 0 if (w) - . . . . . . . . . { -30,330 0 0 18,198 77 5 0 0 0 if (w->texture->mode == TEXTURE_MODE_COPY_DAMAGE) - . . . . . . . . . { - . . . . . . . . . if (!w->texture->cmd.damaged) - . . . . . . . . . { - . . . . . . . . . w->texture->cmd.damage.x1 = de->area.x; - . . . . . . . . . w->texture->cmd.damage.y1 = de->area.y; - . . . . . . . . . w->texture->cmd.damage.x2 = - . . . . . . . . . de->area.x + de->area.width; - . . . . . . . . . w->texture->cmd.damage.y2 = --- line 2220 ---------------------------------------- --- line 2233 ---------------------------------------- - . . . . . . . . . w->texture->cmd.damage.x2); - . . . . . . . . . w->texture->cmd.damage.y2 = - . . . . . . . . . MAX(de->area.y + - . . . . . . . . . de->area.height, - . . . . . . . . . w->texture->cmd.damage.y2); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . -18,198 20 2 12,132 0 0 6,066 36 3 w->texture->oldMipmaps = TRUE; - . . . . . . . . . -24,264 0 0 12,132 35 5 0 0 0 if (w->syncWait) - . . . . . . . . . { - . . . . . . . . . if (w->nDamage == w->sizeDamage) - . . . . . . . . . { - . . . . . . . . . if (w->damageRects) - . . . . . . . . . { - . . . . . . . . . w->damageRects = - . . . . . . . . . realloc(w-> - . . . . . . . . . damageRects, --- line 2251 ---------------------------------------- --- line 2264 ---------------------------------------- - . . . . . . . . . w->damageRects[w->nDamage].x = de->area.x; - . . . . . . . . . w->damageRects[w->nDamage].y = de->area.y; - . . . . . . . . . w->damageRects[w->nDamage].width = de->area.width; - . . . . . . . . . w->damageRects[w->nDamage].height = de->area.height; - . . . . . . . . . w->nDamage++; - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . { -90,990 34 4 54,594 0 0 6,066 0 0 handleWindowDamageRect(w, - . . . . . . . . . de->area.x, - . . . . . . . . . de->area.y, - . . . . . . . . . de->area.width, de->area.height); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 1,194 41 0 696 0 0 0 0 0 else if (d->shapeExtension && - . . . . . . . . . event->type == d->shapeEvent + ShapeNotify) - . . . . . . . . . { - 205 4 2 123 0 0 82 1 0 w = findWindowAtDisplay(d, ((XShapeEvent *) event)->window); - 82 0 0 41 0 0 0 0 0 if (w) - . . . . . . . . . { - 164 0 0 82 0 0 0 0 0 if (w->mapNum) - . . . . . . . . . { - 68 0 0 34 0 0 34 0 0 addWindowDamage(w); - 68 0 0 34 0 0 34 0 0 updateWindowRegion(w); - 68 0 0 34 12 0 34 0 0 addWindowDamage(w); - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . } - 450 39 2 300 0 0 0 0 0 else if (event->type == d->randrEvent + RRScreenChangeNotify) - . . . . . . . . . { - . . . . . . . . . XRRScreenChangeNotifyEvent *rre; - . . . . . . . . . - . . . . . . . . . rre = (XRRScreenChangeNotifyEvent *) event; - . . . . . . . . . if (nvidia) - . . . . . . . . . disable_vsync = TRUE; - . . . . . . . . . s = findScreenAtDisplay(d, rre->root); - . . . . . . . . . if (s) - . . . . . . . . . detectRefreshRateOfScreen(s); - . . . . . . . . . } - 525 43 2 300 0 0 0 0 0 else if (event->type == d->syncEvent + XSyncAlarmNotify) - . . . . . . . . . { - . . . . . . . . . XSyncAlarmNotifyEvent *sa; - . . . . . . . . . - . . . . . . . . . sa = (XSyncAlarmNotifyEvent *) event; - . . . . . . . . . - . . . . . . . . . w = NULL; - . . . . . . . . . - . . . . . . . . . for (s = d->screens; s; s = s->next) --- line 2312 ---------------------------------------- --- line 2314 ---------------------------------------- - . . . . . . . . . if (w->syncAlarm == sa->alarm) - . . . . . . . . . break; - . . . . . . . . . - . . . . . . . . . if (w) - . . . . . . . . . handleSyncAlarm(w); - . . . . . . . . . } - . . . . . . . . . break; - . . . . . . . . . } -13,120 34 1 13,120 28 0 0 0 0 } - --------------------------------------------------------------------------------- --- User-annotated source: session.c --------------------------------------------------------------------------------- -Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 102 ---------------------------------------- - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . static void - . . . . . . . . . shutdownCancelledCallback(SmcConn connection, SmPointer clientData) - . . . . . . . . . { - . . . . . . . . . } - . . . . . . . . . - . . . . . . . . . void initSession(char *smPrevClientId) - 7 1 1 1 0 0 3 1 0 { - . . . . . . . . . static SmcCallbacks callbacks; - . . . . . . . . . - 4 1 1 0 0 0 1 1 0 if (getenv("SESSION_MANAGER")) - . . . . . . . . . { - . . . . . . . . . char errorBuffer[1024]; - . . . . . . . . . - . . . . . . . . . iceInit(); - . . . . . . . . . - . . . . . . . . . callbacks.save_yourself.callback = saveYourselfCallback; - . . . . . . . . . callbacks.save_yourself.client_data = NULL; - . . . . . . . . . --- line 121 ---------------------------------------- --- line 142 ---------------------------------------- - . . . . . . . . . sizeof(errorBuffer), errorBuffer); - . . . . . . . . . if (!smcConnection) - . . . . . . . . . fprintf(stderr, - . . . . . . . . . "%s: SmcOpenConnection failed: %s\n", - . . . . . . . . . programName, errorBuffer); - . . . . . . . . . else - . . . . . . . . . connected = TRUE; - . . . . . . . . . } - 5 2 2 4 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void closeSession(void) - . . . . . . . . . { - . . . . . . . . . if (connected) - . . . . . . . . . { - . . . . . . . . . if (SmcCloseConnection(smcConnection, 0, NULL) != SmcConnectionInUse) - . . . . . . . . . connected = FALSE; - . . . . . . . . . if (smClientId) --- line 158 ---------------------------------------- - --------------------------------------------------------------------------------- --- User-annotated source: paint.c --------------------------------------------------------------------------------- - Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw - --- line 44 ---------------------------------------- - . . . . . . . . . 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -DEFAULT_Z_CAMERA - . . . . . . . . . }; - . . . . . . . . . - . . . . . . . . . WindowPaintAttrib defaultWindowPaintAttrib = { - . . . . . . . . . OPAQUE, BRIGHT, COLOR, 1.0f, 1.0f, 0.0f, 0.0f - . . . . . . . . . }; - . . . . . . . . . - . . . . . . . . . void preparePaintScreen(CompScreen * screen, int msSinceLastPaint) - 1,300 4 1 0 0 0 975 0 0 { - 650 0 0 650 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void donePaintScreen(CompScreen * screen) - 972 462 1 0 0 0 648 0 0 { - 648 0 0 648 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . applyScreenTransform(CompScreen * screen, - . . . . . . . . . const ScreenPaintAttrib * sAttrib, int output) - 10,830 242 0 0 0 0 7,220 0 0 { - 27,075 197 1 18,050 470 0 5,415 338 0 glTranslatef(sAttrib->xTranslate, - . . . . . . . . . sAttrib->yTranslate, sAttrib->zTranslate + sAttrib->zCamera); - . . . . . . . . . - 14,440 0 0 7,220 1,231 0 3,610 0 0 glRotatef(sAttrib->xRotate, 0.0f, 1.0f, 0.0f); - 34,295 600 1 18,050 0 0 3,610 0 0 glRotatef(sAttrib->vRotate, - . . . . . . . . . 1.0f - sAttrib->xRotate / 90.0f, - . . . . . . . . . 0.0f, sAttrib->xRotate / 90.0f); - 14,440 0 0 7,220 0 0 3,610 0 0 glRotatef(sAttrib->yRotate, 0.0f, 1.0f, 0.0f); - 3,610 0 0 3,610 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void prepareXCoords(CompScreen * screen, int output, float z) - 11,040 1,679 2 0 0 0 7,360 0 0 { - 11,040 0 0 7,360 150 1 3,680 0 0 glTranslatef(-0.5f, -0.5f, z); - 55,200 2,155 2 20,240 1,893 1 1,840 0 0 glScalef(1.0f / screen->outputDev[output].width, - . . . . . . . . . -1.0f / screen->outputDev[output].height, 1.0f); - 51,520 1,067 2 14,720 1,129 1 1,840 0 0 glTranslatef(-screen->outputDev[output].region.extents.x1, - . . . . . . . . . -screen->outputDev[output].region.extents.y2, 0.0f); - 3,680 0 0 3,680 0 0 0 0 0 } - . . . . . . . . . - . . . . . . . . . void - . . . . . . . . . paintTransformedScreen(CompScreen * screen, - . . . . . . . . . const ScreenPaintAttrib * sAttrib, - . . . . . . . . . Region region, int output, unsigned int mask) - 6,760 51 0 0 0 0 5,070 720 0 { - . . . . . . . . . CompWindow *w; - . . . . . . . . . int windowMask; - . . . . . . . . . int backgroundMask; - . . . . . . . . . Bool btf = mask & PAINT_SCREEN_ORDER_BACK_TO_FRONT_MASK - 7,978 717 1 2,096 0 0 1,690 0 0 || !(mask & PAINT_SCREEN_ORDER_FRONT_TO_BACK_MASK); - 2,535 0 0 845 0 0 845 0 0 Bool ftb = mask & PAINT_SCREEN_ORDER_FRONT_TO_BACK_MASK; - . . . . . . . . . - 3,380 0 0 845 0 0 0 0 0 if (mask & PAINT_SCREEN_CLEAR_MASK) - . . . . . . . . . clearTargetOutput(screen->display, GL_COLOR_BUFFER_BIT); - . . . . . . . . . - 2,535 0 0 845 0 0 845 0 0 screenLighting(screen, TRUE); - . . . . . . . . . - 845 717 1 0 0 0 845 0 0 glPushMatrix(); - . . . . . . . . . - 5,070 0 0 4,225 0 0 845 0 0 (screen->applyScreenTransform) (screen, sAttrib, output); - . . . . . . . . . - 5,915 0 0 4,225 845 0 845 0 0 prepareXCoords(screen, output, -sAttrib->zTranslate); - . . . . . . . . . - 3,380 717 1 845 0 0 0 0 0 if (mask & PAINT_SCREEN_TRANSFORMED_MASK) - . . . . . . . . . { - 845 0 0 0 0 0 845 0 0 windowMask = PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK; - 845 0 0 0 0 0 845 0 0 backgroundMask = PAINT_BACKGROUND_ON_TRANSFORMED_SCREEN_MASK; - . . . . . . . . . - 3,380 0 0 845 0 0 0 0 0 if (mask & PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK) - . . . . . . . . . { - . . . . . . . . . backgroundMask |= PAINT_BACKGROUND_WITH_STENCIL_MASK; - . . . . . . . . . - . . . . . . . . . (*screen->paintBackground) (screen, region, backgroundMask); - . . . . . . . . . - . . . . . . . . . glEnable(GL_STENCIL_TEST); - . . . . . . . . . if (btf) - . . . . . . . . . { --- line 118 ---------------------------------------- --- line 167 ---------------------------------------- - . . . . . . . . . glPopMatrix(); - . . . . . . . . . - . . . . . . . . . return; - . . . . . . . . . } - . . . . . . . . . } - . . . . . . . . . else - . . . . . . . . . windowMask = backgroundMask = 0; - . . . . . . . . . - 5,070 243 1 4,225 845 0 845 0 0 (*screen->paintBackground) (screen, region, backgroundMask); - . . . . . . . . . - 1,690 0 0 845 0 0 0 0 0 if (btf) - . . . . |