Changeset 908de44


Ignore:
Timestamp:
Jun 1, 2010, 12:10:44 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
84a4aca
Parents:
a57f87a
Message:
Export owl_mainpanel_relayout

Also, temporarily schedule a relayout.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mainpanel.c

    rd2a4534 r908de44  
    22
    33static void owl_mainpanel_size(owl_window *parent, void *user_data);
    4 static void owl_mainpanel_layout_contents(owl_window *parent, void *user_data);
    54
    65void owl_mainpanel_init(owl_mainpanel *mp)
     
    1514  /* Set up sizing hooks */
    1615  owl_signal_connect_object(owl_window_get_screen(), "resized", G_CALLBACK(owl_mainpanel_size), mp->panel, 0);
    17   g_signal_connect(mp->panel, "resized", G_CALLBACK(owl_mainpanel_layout_contents), mp);
     16  g_signal_connect_swapped(mp->panel, "resized", G_CALLBACK(owl_mainpanel_layout_contents), mp);
    1817
    1918  /* Bootstrap the sizes and go */
     
    3231}
    3332
    34 static void owl_mainpanel_layout_contents(owl_window *panel, void *user_data)
     33void owl_mainpanel_layout_contents(owl_mainpanel *mp)
    3534{
    3635  int lines, cols, typwin_lines;
    37   owl_mainpanel *mp = user_data;
    3836
    39   owl_window_get_position(panel, &lines, &cols, NULL, NULL);
     37  /* skip if we haven't been initialized */
     38  if (!mp->panel) return;
     39
     40  owl_window_get_position(mp->panel, &lines, &cols, NULL, NULL);
    4041  typwin_lines = owl_global_get_typwin_lines(&g);
    4142
     
    5253  owl_window_set_position(mp->msgwin, 1, cols, mp->recwinlines+1, 0);
    5354  owl_window_set_position(mp->typwin, typwin_lines, cols, mp->recwinlines+2, 0);
     55
     56  /* TEMPORARY */
     57  owl_global_set_relayout_pending(&g);
    5458}
    5559
Note: See TracChangeset for help on using the changeset viewer.