aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pgtkterm.c')
-rw-r--r--src/pgtkterm.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 6dc45604f01..757ff57a9f2 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -676,33 +676,16 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
676 676
677static void 677static void
678pgtk_set_window_size (struct frame *f, bool change_gravity, 678pgtk_set_window_size (struct frame *f, bool change_gravity,
679 int width, int height) 679 int pixelwidth, int pixelheight)
680/* -------------------------------------------------------------------------- 680/* --------------------------------------------------------------------------
681 Adjust window pixel size based on given character grid size 681 Adjust window pixel size based on given width and height.
682 Impl is a bit more complex than other terms, need to do some
683 internal clipping.
684 -------------------------------------------------------------------------- */ 682 -------------------------------------------------------------------------- */
685{ 683{
686 int pixelwidth, pixelheight;
687
688 block_input (); 684 block_input ();
689 685
690 gtk_widget_get_size_request (FRAME_GTK_WIDGET (f), &pixelwidth,
691 &pixelheight);
692
693 pixelwidth = width;
694 pixelheight = height;
695
696 for (GtkWidget * w = FRAME_GTK_WIDGET (f); w != NULL;
697 w = gtk_widget_get_parent (w))
698 {
699 gint wd, hi;
700 gtk_widget_get_size_request (w, &wd, &hi);
701 }
702
703 f->output_data.pgtk->preferred_width = pixelwidth; 686 f->output_data.pgtk->preferred_width = pixelwidth;
704 f->output_data.pgtk->preferred_height = pixelheight; 687 f->output_data.pgtk->preferred_height = pixelheight;
705 xg_wm_set_size_hint (f, 0, 0); 688
706 xg_frame_set_char_size (f, pixelwidth, pixelheight); 689 xg_frame_set_char_size (f, pixelwidth, pixelheight);
707 gtk_widget_queue_resize (FRAME_WIDGET (f)); 690 gtk_widget_queue_resize (FRAME_WIDGET (f));
708 691