home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: patch 5.5.035
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- ------------
-
- Patch 5.5.035
- Problem: GTK with XIM: Resizing with status area was messy, and
- ":set guioptions+=b" didn't work.
- Solution: Make status area a separate widget, but not a separate window.
- (Chi-Deok Hwang)
- Files: src/gui_gtk_f.c, src/gui_gtk_x11.c, src/multbyte.c
-
-
- *** ../vim-5.5.34/src/gui_gtk_f.c Wed Sep 22 10:06:23 1999
- --- src/gui_gtk_f.c Mon Oct 25 11:38:29 1999
- ***************
- *** 399,410 ****
-
- requisition->width = form->width;
- requisition->height = form->height;
- - #ifdef USE_XIM
- - /*
- - * FIXME: This isn't the proper place to do this!
- - */
- - requisition->height += xim_get_status_area_height();
- - #endif
-
- tmp_list = form->children;
-
- --- 399,404 ----
- ***************
- *** 798,807 ****
- event.y = widget->allocation.y;
- event.width = widget->allocation.width;
- event.height = widget->allocation.height;
- -
- - #ifdef USE_XIM
- - event.height -= xim_get_status_area_height();
- - #endif
-
- gtk_widget_event (widget, (GdkEvent*) &event);
- }
- --- 792,797 ----
- *** ../vim-5.5.34/src/gui_gtk_x11.c Wed Sep 22 10:06:24 1999
- --- src/gui_gtk_x11.c Sun Oct 31 15:16:39 1999
- ***************
- *** 1614,1619 ****
- --- 1614,1630 ----
- /* Adjust input management behaviour to the capabilities of the new
- * fontset */
- xim_decide_input_style();
- + if (xim_get_status_area_height())
- + {
- + /* Status area is required. Just create the empty label so that
- + * mainwin will allocate the extra space for status area. */
- + GtkWidget *label = gtk_label_new(" ");
- +
- + gtk_widget_set_usize(label, 20, gui.char_height + 2);
- + gtk_box_pack_end(GTK_BOX(GTK_BIN(gui.mainwin)->child), label,
- + FALSE, FALSE, 0);
- + gtk_widget_show(label);
- + }
- #endif
-
- /* Preserve the logical dimensions of the screen. */
- *** ../vim-5.5.34/src/multbyte.c Wed Sep 22 10:06:25 1999
- --- src/multbyte.c Mon Oct 25 11:44:15 1999
- ***************
- *** 397,415 ****
- return;
-
- attr = xic_attr;
- - widget = gui.drawarea;
- attrmask = 0;
- style = gdk_ic_get_style(xic);
- if ((style & GDK_IM_STATUS_MASK) == GDK_IM_STATUS_AREA)
- {
- if (gui.fontset && gui.fontset->type == GDK_FONT_FONTSET)
- {
- gdk_window_get_size(widget->window, &width, &height);
-
- attrmask |= GDK_IC_STATUS_AREA;
- ! attr->status_area.x = gui.border_offset;
- ! attr->status_area.y = height - gui.char_height - gui.border_offset;
- ! attr->status_area.width = width - 2 * gui.border_offset;
- attr->status_area.height = gui.char_height;
- }
- }
- --- 397,415 ----
- return;
-
- attr = xic_attr;
- attrmask = 0;
- style = gdk_ic_get_style(xic);
- if ((style & GDK_IM_STATUS_MASK) == GDK_IM_STATUS_AREA)
- {
- if (gui.fontset && gui.fontset->type == GDK_FONT_FONTSET)
- {
- + widget = gui.mainwin;
- gdk_window_get_size(widget->window, &width, &height);
-
- attrmask |= GDK_IC_STATUS_AREA;
- ! attr->status_area.x = 0;
- ! attr->status_area.y = height - gui.char_height - 1;
- ! attr->status_area.width = width;
- attr->status_area.height = gui.char_height;
- }
- }
- ***************
- *** 815,821 ****
-
- if (!gdk_im_ready())
- {
- ! EMSG("Your GTK+ does not support XIM");
- return;
- }
- if ((xic_attr = gdk_ic_attr_new()) != NULL)
- --- 815,821 ----
-
- if (!gdk_im_ready())
- {
- ! EMSG("Input Method Server is not running");
- return;
- }
- if ((xic_attr = gdk_ic_attr_new()) != NULL)
- ***************
- *** 828,834 ****
- GtkWidget *widget = gui.drawarea;
-
- attr->style = xim_input_style;
- ! attr->client_window = widget->window;
-
- if ((colormap = gtk_widget_get_colormap(widget)) !=
- gtk_widget_get_default_colormap())
- --- 828,834 ----
- GtkWidget *widget = gui.drawarea;
-
- attr->style = xim_input_style;
- ! attr->client_window = gui.mainwin->window;
-
- if ((colormap = gtk_widget_get_colormap(widget)) !=
- gtk_widget_get_default_colormap())
- ***************
- *** 871,883 ****
- }
- else
- {
- attrmask |= GDK_IC_STATUS_AREA_REQ;
- ! attr->status_area.x = gui.border_offset;
- ! attr->status_area.y = height - gui.char_height - gui.border_offset;
- ! attr->status_area.width = width - 2*gui.border_offset;
- attr->status_area.height = gui.char_height;
- attr->status_fontset = gui.fontset;
- - attr->preedit_area.height -= gui.char_height;
- }
- }
- #endif
- --- 871,883 ----
- }
- else
- {
- + gdk_window_get_size(gui.mainwin->window, &width, &height);
- attrmask |= GDK_IC_STATUS_AREA_REQ;
- ! attr->status_area.x = 0;
- ! attr->status_area.y = height - gui.char_height - 1;
- ! attr->status_area.width = width;
- attr->status_area.height = gui.char_height;
- attr->status_fontset = gui.fontset;
- }
- }
- #endif
- *** ../vim-5.5.34/src/version.c Sun Oct 31 15:12:59 1999
- --- src/version.c Sun Oct 31 15:14:03 1999
- ***************
- *** 420,420 ****
- --- 420,421 ----
- { /* Add new patch number below this line */
- + 35,
-
- --
- hundred-and-one symptoms of being an internet addict:
- 32. You don't know what sex three of your closest friends are, because they
- have neutral nicknames and you never bothered to ask.
-
- --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /
-