diff options
| author | Jan Djärv | 2003-02-07 16:38:54 +0000 |
|---|---|---|
| committer | Jan Djärv | 2003-02-07 16:38:54 +0000 |
| commit | 2436a4e491401687bbae871ca7322c1b7f55eb73 (patch) | |
| tree | b7e3183c2ab76aef55fec2bb0e0816d6c7a16299 /src | |
| parent | f554a9b4f824e870e7e1ec7d4ffb9d3f5892eee2 (diff) | |
| download | emacs-2436a4e491401687bbae871ca7322c1b7f55eb73.tar.gz emacs-2436a4e491401687bbae871ca7322c1b7f55eb73.zip | |
Use FRAME_OUTER_WINDOW instead of ifdef X_TOOLKIT/else/endif
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/xfns.c | 32 | ||||
| -rw-r--r-- | src/xterm.c | 33 |
3 files changed, 24 insertions, 49 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 06b5ab54b57..b465355571e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2003-02-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xterm.c (x_text_icon, x_raise_frame, x_lower_frame) | ||
| 4 | (x_make_frame_invisible, x_wm_set_icon_position): Use | ||
| 5 | FRAME_OUTER_WINDOW instead of ifdef X_TOOLKIT/else/endif. | ||
| 6 | |||
| 7 | * xfns.c (x_set_name, x_set_title): Ditto. | ||
| 8 | |||
| 1 | 2003-02-04 Richard M. Stallman <rms@gnu.org> | 9 | 2003-02-04 Richard M. Stallman <rms@gnu.org> |
| 2 | 10 | ||
| 3 | * keyboard.c (echo_now): Update before_command_echo_length. | 11 | * keyboard.c (echo_now): Update before_command_echo_length. |
diff --git a/src/xfns.c b/src/xfns.c index 44a54dafe2c..24b21aec552 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2552,22 +2552,15 @@ x_set_name (f, name, explicit) | |||
| 2552 | icon.format = 8; | 2552 | icon.format = 8; |
| 2553 | icon.nitems = bytes; | 2553 | icon.nitems = bytes; |
| 2554 | } | 2554 | } |
| 2555 | #ifdef USE_X_TOOLKIT | ||
| 2556 | XSetWMName (FRAME_X_DISPLAY (f), | ||
| 2557 | XtWindow (f->output_data.x->widget), &text); | ||
| 2558 | XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget), | ||
| 2559 | &icon); | ||
| 2560 | #else /* not USE_X_TOOLKIT */ | ||
| 2561 | #ifdef USE_GTK | 2555 | #ifdef USE_GTK |
| 2562 | gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 2556 | gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| 2563 | SDATA (name)); | 2557 | SDATA (name)); |
| 2564 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), | ||
| 2565 | &icon); | ||
| 2566 | #else /* not USE_GTK */ | 2558 | #else /* not USE_GTK */ |
| 2567 | XSetWMName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text); | 2559 | XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); |
| 2568 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &icon); | ||
| 2569 | #endif /* not USE_GTK */ | 2560 | #endif /* not USE_GTK */ |
| 2570 | #endif /* not USE_X_TOOLKIT */ | 2561 | |
| 2562 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon); | ||
| 2563 | |||
| 2571 | if (!NILP (f->icon_name) | 2564 | if (!NILP (f->icon_name) |
| 2572 | && icon.value != (unsigned char *) SDATA (f->icon_name)) | 2565 | && icon.value != (unsigned char *) SDATA (f->icon_name)) |
| 2573 | xfree (icon.value); | 2566 | xfree (icon.value); |
| @@ -2666,22 +2659,17 @@ x_set_title (f, name, old_name) | |||
| 2666 | icon.format = 8; | 2659 | icon.format = 8; |
| 2667 | icon.nitems = bytes; | 2660 | icon.nitems = bytes; |
| 2668 | } | 2661 | } |
| 2669 | #ifdef USE_X_TOOLKIT | 2662 | |
| 2670 | XSetWMName (FRAME_X_DISPLAY (f), | ||
| 2671 | XtWindow (f->output_data.x->widget), &text); | ||
| 2672 | XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget), | ||
| 2673 | &icon); | ||
| 2674 | #else /* not USE_X_TOOLKIT */ | ||
| 2675 | #ifdef USE_GTK | 2663 | #ifdef USE_GTK |
| 2676 | gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 2664 | gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| 2677 | SDATA (name)); | 2665 | SDATA (name)); |
| 2678 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), | ||
| 2679 | &icon); | ||
| 2680 | #else /* not USE_GTK */ | 2666 | #else /* not USE_GTK */ |
| 2681 | XSetWMName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text); | 2667 | XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); |
| 2682 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &icon); | ||
| 2683 | #endif /* not USE_GTK */ | 2668 | #endif /* not USE_GTK */ |
| 2684 | #endif /* not USE_X_TOOLKIT */ | 2669 | |
| 2670 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), | ||
| 2671 | &icon); | ||
| 2672 | |||
| 2685 | if (!NILP (f->icon_name) | 2673 | if (!NILP (f->icon_name) |
| 2686 | && icon.value != (unsigned char *) SDATA (f->icon_name)) | 2674 | && icon.value != (unsigned char *) SDATA (f->icon_name)) |
| 2687 | xfree (icon.value); | 2675 | xfree (icon.value); |
diff --git a/src/xterm.c b/src/xterm.c index 43075c9d5b3..2bda1e0982f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -12432,15 +12432,10 @@ x_text_icon (f, icon_name) | |||
| 12432 | text.encoding = XA_STRING; | 12432 | text.encoding = XA_STRING; |
| 12433 | text.format = 8; | 12433 | text.format = 8; |
| 12434 | text.nitems = strlen (icon_name); | 12434 | text.nitems = strlen (icon_name); |
| 12435 | #ifdef USE_X_TOOLKIT | 12435 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); |
| 12436 | XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget), | ||
| 12437 | &text); | ||
| 12438 | #else /* not USE_X_TOOLKIT */ | ||
| 12439 | XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text); | ||
| 12440 | #endif /* not USE_X_TOOLKIT */ | ||
| 12441 | } | 12436 | } |
| 12442 | #else /* not HAVE_X11R4 */ | 12437 | #else /* not HAVE_X11R4 */ |
| 12443 | XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name); | 12438 | XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name); |
| 12444 | #endif /* not HAVE_X11R4 */ | 12439 | #endif /* not HAVE_X11R4 */ |
| 12445 | 12440 | ||
| 12446 | if (f->output_data.x->icon_bitmap > 0) | 12441 | if (f->output_data.x->icon_bitmap > 0) |
| @@ -13624,11 +13619,7 @@ x_raise_frame (f) | |||
| 13624 | if (f->async_visible) | 13619 | if (f->async_visible) |
| 13625 | { | 13620 | { |
| 13626 | BLOCK_INPUT; | 13621 | BLOCK_INPUT; |
| 13627 | #ifdef USE_X_TOOLKIT | 13622 | XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f)); |
| 13628 | XRaiseWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget)); | ||
| 13629 | #else /* not USE_X_TOOLKIT */ | ||
| 13630 | XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); | ||
| 13631 | #endif /* not USE_X_TOOLKIT */ | ||
| 13632 | XFlush (FRAME_X_DISPLAY (f)); | 13623 | XFlush (FRAME_X_DISPLAY (f)); |
| 13633 | UNBLOCK_INPUT; | 13624 | UNBLOCK_INPUT; |
| 13634 | } | 13625 | } |
| @@ -13643,11 +13634,7 @@ x_lower_frame (f) | |||
| 13643 | if (f->async_visible) | 13634 | if (f->async_visible) |
| 13644 | { | 13635 | { |
| 13645 | BLOCK_INPUT; | 13636 | BLOCK_INPUT; |
| 13646 | #ifdef USE_X_TOOLKIT | 13637 | XLowerWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f)); |
| 13647 | XLowerWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget)); | ||
| 13648 | #else /* not USE_X_TOOLKIT */ | ||
| 13649 | XLowerWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); | ||
| 13650 | #endif /* not USE_X_TOOLKIT */ | ||
| 13651 | XFlush (FRAME_X_DISPLAY (f)); | 13638 | XFlush (FRAME_X_DISPLAY (f)); |
| 13652 | UNBLOCK_INPUT; | 13639 | UNBLOCK_INPUT; |
| 13653 | } | 13640 | } |
| @@ -13837,12 +13824,8 @@ x_make_frame_invisible (f) | |||
| 13837 | { | 13824 | { |
| 13838 | Window window; | 13825 | Window window; |
| 13839 | 13826 | ||
| 13840 | #ifdef USE_X_TOOLKIT | ||
| 13841 | /* Use the frame's outermost window, not the one we normally draw on. */ | 13827 | /* Use the frame's outermost window, not the one we normally draw on. */ |
| 13842 | window = XtWindow (f->output_data.x->widget); | 13828 | window = FRAME_OUTER_WINDOW (f); |
| 13843 | #else /* not USE_X_TOOLKIT */ | ||
| 13844 | window = FRAME_X_WINDOW (f); | ||
| 13845 | #endif /* not USE_X_TOOLKIT */ | ||
| 13846 | 13829 | ||
| 13847 | /* Don't keep the highlight on an invisible frame. */ | 13830 | /* Don't keep the highlight on an invisible frame. */ |
| 13848 | if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f) | 13831 | if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f) |
| @@ -14413,11 +14396,7 @@ x_wm_set_icon_position (f, icon_x, icon_y) | |||
| 14413 | struct frame *f; | 14396 | struct frame *f; |
| 14414 | int icon_x, icon_y; | 14397 | int icon_x, icon_y; |
| 14415 | { | 14398 | { |
| 14416 | #ifdef USE_X_TOOLKIT | 14399 | Window window = FRAME_OUTER_WINDOW (f); |
| 14417 | Window window = XtWindow (f->output_data.x->widget); | ||
| 14418 | #else | ||
| 14419 | Window window = FRAME_X_WINDOW (f); | ||
| 14420 | #endif | ||
| 14421 | 14400 | ||
| 14422 | f->output_data.x->wm_hints.flags |= IconPositionHint; | 14401 | f->output_data.x->wm_hints.flags |= IconPositionHint; |
| 14423 | f->output_data.x->wm_hints.icon_x = icon_x; | 14402 | f->output_data.x->wm_hints.icon_x = icon_x; |