aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Gutov2026-04-03 04:25:58 +0300
committerDmitry Gutov2026-04-03 04:33:14 +0300
commit956e77f9dde84b43f3969fcf7be5e46e56fbbd65 (patch)
treef8a63d6893ae1e08f3df28da75f2efe0e0de027f /src
parent02c95dd92cebcb71436472ce544dda5bd32af1e4 (diff)
downloademacs-956e77f9dde84b43f3969fcf7be5e46e56fbbd65.tar.gz
emacs-956e77f9dde84b43f3969fcf7be5e46e56fbbd65.zip
pgtk_set_window_size: Clear out unused code
* src/pgtkterm.c (pgtk_set_window_size): Remove unused code. Rename the last two parameters to pixelwidth and pixelheight so they can be used directly (bug#80698). And remove the xg_wm_set_size_hint call because it's called indirectly through xg_frame_set_char_size already. Update the commentary above.
Diffstat (limited to 'src')
-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