mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-06 14:22:31 -07:00
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.
This commit is contained in:
parent
02c95dd92c
commit
956e77f9dd
1 changed files with 3 additions and 20 deletions
|
|
@ -676,33 +676,16 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
|
|||
|
||||
static void
|
||||
pgtk_set_window_size (struct frame *f, bool change_gravity,
|
||||
int width, int height)
|
||||
int pixelwidth, int pixelheight)
|
||||
/* --------------------------------------------------------------------------
|
||||
Adjust window pixel size based on given character grid size
|
||||
Impl is a bit more complex than other terms, need to do some
|
||||
internal clipping.
|
||||
Adjust window pixel size based on given width and height.
|
||||
-------------------------------------------------------------------------- */
|
||||
{
|
||||
int pixelwidth, pixelheight;
|
||||
|
||||
block_input ();
|
||||
|
||||
gtk_widget_get_size_request (FRAME_GTK_WIDGET (f), &pixelwidth,
|
||||
&pixelheight);
|
||||
|
||||
pixelwidth = width;
|
||||
pixelheight = height;
|
||||
|
||||
for (GtkWidget * w = FRAME_GTK_WIDGET (f); w != NULL;
|
||||
w = gtk_widget_get_parent (w))
|
||||
{
|
||||
gint wd, hi;
|
||||
gtk_widget_get_size_request (w, &wd, &hi);
|
||||
}
|
||||
|
||||
f->output_data.pgtk->preferred_width = pixelwidth;
|
||||
f->output_data.pgtk->preferred_height = pixelheight;
|
||||
xg_wm_set_size_hint (f, 0, 0);
|
||||
|
||||
xg_frame_set_char_size (f, pixelwidth, pixelheight);
|
||||
gtk_widget_queue_resize (FRAME_WIDGET (f));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue