if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
{
GtkWidget *wfixed = f->output_data.x->edit_widget;
+
gtk_widget_queue_draw (wfixed);
gdk_window_process_all_updates ();
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- 0, 0,
- FRAME_PIXEL_WIDTH (f),
- FRAME_INTERNAL_BORDER_WIDTH (f), 0);
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- 0, 0,
- FRAME_INTERNAL_BORDER_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f), 0);
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- 0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
- FRAME_PIXEL_WIDTH (f),
- FRAME_INTERNAL_BORDER_WIDTH (f), 0);
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
- 0,
- FRAME_INTERNAL_BORDER_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f), 0);
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
+ FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
+ FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0,
+ FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
+ FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
+ 0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
}
}
xg_maybe_add_timer (gpointer data)
{
struct xg_dialog_data *dd = data;
- EMACS_TIME next_time = timer_check ();
+ struct timespec next_time = timer_check ();
dd->timerid = 0;
- if (EMACS_TIME_VALID_P (next_time))
+ if (timespec_valid_p (next_time))
{
- time_t s = EMACS_SECS (next_time);
- int per_ms = EMACS_TIME_RESOLUTION / 1000;
- int ms = (EMACS_NSECS (next_time) + per_ms - 1) / per_ms;
+ time_t s = next_time.tv_sec;
+ int per_ms = TIMESPEC_RESOLUTION / 1000;
+ int ms = (next_time.tv_nsec + per_ms - 1) / per_ms;
if (s <= ((guint) -1 - ms) / 1000)
dd->timerid = g_timeout_add (s * 1000 + ms, xg_maybe_add_timer, dd);
}
{
/* Must realize so the GdkWindow inside the widget is created. */
gtk_widget_realize (w);
- xg_set_cursor (w, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
+ xg_set_cursor (w, FRAME_DISPLAY_INFO (f)->xg_cursor);
}
}
else
}
bool
-xg_event_is_for_menubar (struct frame *f, XEvent *event)
+xg_event_is_for_menubar (struct frame *f, const XEvent *event)
{
struct x_output *x = f->output_data.x;
GList *iter;
/* Set the cursor to an arrow. */
- xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
+ xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
bar->x_window = scroll_id;
}
gtk_widget_queue_draw (wfixed);
gdk_window_process_all_updates ();
if (oldx != -1 && oldw > 0 && oldh > 0)
- {
- /* Clear under old scroll bar position. This must be done after
- the gtk_widget_queue_draw and gdk_window_process_all_updates
- above. */
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- oldx, oldy, oldw, oldh, 0);
- }
+ /* Clear under old scroll bar position. This must be done after
+ the gtk_widget_queue_draw and gdk_window_process_all_updates
+ above. */
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ oldx, oldy, oldw, oldh);
/* GTK does not redraw until the main loop is entered again, but
if there are no X events pending we will not enter it. So we sync
struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
- if (wscroll && NILP (bar->dragging))
+ if (wscroll && bar->dragging == -1)
{
GtkAdjustment *adj;
gdouble shown;
frame. This function does additional checks. */
bool
-xg_event_is_for_scrollbar (struct frame *f, XEvent *event)
+xg_event_is_for_scrollbar (struct frame *f, const XEvent *event)
{
bool retval = 0;
/* Convert between the modifier bits GDK uses and the modifier bits
Emacs uses. This assumes GDK and X masks are the same, which they are when
this is written. */
- event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), mod);
+ event.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), mod);
kbd_buffer_store_event (&event);
- /* Return focus to the frame after we have clicked on a detached
- tool bar button. */
- Fx_focus_frame (frame);
+ /* Return focus to the frame after we have clicked on a detached
+ tool bar button. */
+ x_focus_frame (f);
}
/* Callback function invoked when a tool bar item is pressed in a detached