diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/xterm.c b/src/xterm.c index d5131c9a60c..4bc12c06b34 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2963,9 +2963,7 @@ x_clear_frame (struct frame *f) | |||
| 2963 | follow an explicit cursor_to. */ | 2963 | follow an explicit cursor_to. */ |
| 2964 | BLOCK_INPUT; | 2964 | BLOCK_INPUT; |
| 2965 | 2965 | ||
| 2966 | /* The following call is commented out because it does not seem to accomplish | 2966 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); |
| 2967 | anything, apart from causing flickering during window resize. */ | ||
| 2968 | /* XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); */ | ||
| 2969 | 2967 | ||
| 2970 | /* We have to clear the scroll bars. If we have changed colors or | 2968 | /* We have to clear the scroll bars. If we have changed colors or |
| 2971 | something like that, then they should be notified. */ | 2969 | something like that, then they should be notified. */ |
| @@ -3319,7 +3317,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 3319 | } | 3317 | } |
| 3320 | else | 3318 | else |
| 3321 | { | 3319 | { |
| 3322 | /* Scolling down. Make sure we don't copy over the mode line. | 3320 | /* Scrolling down. Make sure we don't copy over the mode line. |
| 3323 | at the bottom. */ | 3321 | at the bottom. */ |
| 3324 | if (to_y + run->height > bottom_y) | 3322 | if (to_y + run->height > bottom_y) |
| 3325 | height = bottom_y - to_y; | 3323 | height = bottom_y - to_y; |
| @@ -4183,7 +4181,7 @@ static Boolean xaw3d_arrow_scroll; | |||
| 4183 | 4181 | ||
| 4184 | /* Whether the drag scrolling maintains the mouse at the top of the | 4182 | /* Whether the drag scrolling maintains the mouse at the top of the |
| 4185 | thumb. If not, resizing the thumb needs to be done more carefully | 4183 | thumb. If not, resizing the thumb needs to be done more carefully |
| 4186 | to avoid jerkyness. */ | 4184 | to avoid jerkiness. */ |
| 4187 | 4185 | ||
| 4188 | static Boolean xaw3d_pick_top; | 4186 | static Boolean xaw3d_pick_top; |
| 4189 | 4187 | ||
| @@ -6115,7 +6113,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6115 | last_user_time = event.xproperty.time; | 6113 | last_user_time = event.xproperty.time; |
| 6116 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); | 6114 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); |
| 6117 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) | 6115 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) |
| 6118 | if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified) | 6116 | if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified |
| 6117 | && f->output_data.x->net_wm_state_hidden_seen) | ||
| 6119 | { | 6118 | { |
| 6120 | /* Gnome shell does not iconify us when C-z is pressed. It hides | 6119 | /* Gnome shell does not iconify us when C-z is pressed. It hides |
| 6121 | the frame. So if our state says we aren't hidden anymore, | 6120 | the frame. So if our state says we aren't hidden anymore, |
| @@ -6125,6 +6124,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6125 | f->async_visible = 1; | 6124 | f->async_visible = 1; |
| 6126 | f->async_iconified = 0; | 6125 | f->async_iconified = 0; |
| 6127 | f->output_data.x->has_been_visible = 1; | 6126 | f->output_data.x->has_been_visible = 1; |
| 6127 | f->output_data.x->net_wm_state_hidden_seen = 0; | ||
| 6128 | inev.ie.kind = DEICONIFY_EVENT; | 6128 | inev.ie.kind = DEICONIFY_EVENT; |
| 6129 | XSETFRAME (inev.ie.frame_or_window, f); | 6129 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6130 | } | 6130 | } |
| @@ -8482,7 +8482,10 @@ get_current_wm_state (struct frame *f, | |||
| 8482 | { | 8482 | { |
| 8483 | Atom a = ((Atom*)tmp_data)[i]; | 8483 | Atom a = ((Atom*)tmp_data)[i]; |
| 8484 | if (a == dpyinfo->Xatom_net_wm_state_hidden) | 8484 | if (a == dpyinfo->Xatom_net_wm_state_hidden) |
| 8485 | is_hidden = 1; | 8485 | { |
| 8486 | is_hidden = 1; | ||
| 8487 | f->output_data.x->net_wm_state_hidden_seen = 1; | ||
| 8488 | } | ||
| 8486 | else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) | 8489 | else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) |
| 8487 | { | 8490 | { |
| 8488 | if (*size_state == FULLSCREEN_HEIGHT) | 8491 | if (*size_state == FULLSCREEN_HEIGHT) |
| @@ -8765,7 +8768,7 @@ x_wait_for_event (struct frame *f, int eventtype) | |||
| 8765 | pending_event_wait.f = f; | 8768 | pending_event_wait.f = f; |
| 8766 | pending_event_wait.eventtype = eventtype; | 8769 | pending_event_wait.eventtype = eventtype; |
| 8767 | 8770 | ||
| 8768 | /* Set timeout to 0.1 second. Hopefully not noticable. | 8771 | /* Set timeout to 0.1 second. Hopefully not noticeable. |
| 8769 | Maybe it should be configurable. */ | 8772 | Maybe it should be configurable. */ |
| 8770 | EMACS_SET_SECS_USECS (tmo, 0, 100000); | 8773 | EMACS_SET_SECS_USECS (tmo, 0, 100000); |
| 8771 | EMACS_GET_TIME (tmo_at); | 8774 | EMACS_GET_TIME (tmo_at); |
| @@ -9558,6 +9561,14 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) | |||
| 9558 | XSizeHints size_hints; | 9561 | XSizeHints size_hints; |
| 9559 | Window window = FRAME_OUTER_WINDOW (f); | 9562 | Window window = FRAME_OUTER_WINDOW (f); |
| 9560 | 9563 | ||
| 9564 | #ifdef USE_X_TOOLKIT | ||
| 9565 | if (f->output_data.x->widget) | ||
| 9566 | { | ||
| 9567 | widget_update_wm_size_hints (f->output_data.x->widget); | ||
| 9568 | return; | ||
| 9569 | } | ||
| 9570 | #endif | ||
| 9571 | |||
| 9561 | /* Setting PMaxSize caused various problems. */ | 9572 | /* Setting PMaxSize caused various problems. */ |
| 9562 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; | 9573 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; |
| 9563 | 9574 | ||
| @@ -9950,6 +9961,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 9950 | https://bugzilla.gnome.org/show_bug.cgi?id=563627. */ | 9961 | https://bugzilla.gnome.org/show_bug.cgi?id=563627. */ |
| 9951 | id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL | 9962 | id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL |
| 9952 | | G_LOG_FLAG_RECURSION, my_log_handler, NULL); | 9963 | | G_LOG_FLAG_RECURSION, my_log_handler, NULL); |
| 9964 | |||
| 9965 | /* NULL window -> events for all windows go to our function. | ||
| 9966 | Call before gtk_init so Gtk+ event filters comes after our. */ | ||
| 9967 | gdk_window_add_filter (NULL, event_handler_gdk, NULL); | ||
| 9968 | |||
| 9953 | gtk_init (&argc, &argv2); | 9969 | gtk_init (&argc, &argv2); |
| 9954 | g_log_remove_handler ("GLib", id); | 9970 | g_log_remove_handler ("GLib", id); |
| 9955 | 9971 | ||
| @@ -9959,9 +9975,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 9959 | 9975 | ||
| 9960 | dpy = DEFAULT_GDK_DISPLAY (); | 9976 | dpy = DEFAULT_GDK_DISPLAY (); |
| 9961 | 9977 | ||
| 9962 | /* NULL window -> events for all windows go to our function */ | ||
| 9963 | gdk_window_add_filter (NULL, event_handler_gdk, NULL); | ||
| 9964 | |||
| 9965 | #if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90 | 9978 | #if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90 |
| 9966 | /* Load our own gtkrc if it exists. */ | 9979 | /* Load our own gtkrc if it exists. */ |
| 9967 | { | 9980 | { |