Changeset 05ca0d8 for popwin.c


Ignore:
Timestamp:
Jun 1, 2010, 3:30:12 AM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
d2a4534
Parents:
7a6e6c7
git-author:
David Benjamin <davidben@mit.edu> (06/01/10 02:41:55)
git-committer:
David Benjamin <davidben@mit.edu> (06/01/10 03:30:12)
Message:
Implement our own owl_signal_connect_object

This is actually more code, but that's because of comments. It'll be
MUCH less error-prone.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • popwin.c

    r7a6e6c7 r05ca0d8  
    1212  pw->content = owl_window_new(pw->border);
    1313  g_signal_connect(pw->border, "redraw", G_CALLBACK(owl_popwin_draw_border), 0);
    14   pw->screen_resize_id = g_signal_connect_object(owl_window_get_screen(), "resized", G_CALLBACK(owl_popwin_size_border), pw->border, 0);
    15   g_signal_connect_object(pw->border, "resized", G_CALLBACK(owl_popwin_size_content), pw->content, 0);
     14  owl_signal_connect_object(owl_window_get_screen(), "resized", G_CALLBACK(owl_popwin_size_border), pw->border, 0);
     15  owl_signal_connect_object(pw->border, "resized", G_CALLBACK(owl_popwin_size_content), pw->content, 0);
    1616
    1717  /* bootstrap sizing */
     
    7373  g_object_unref(pw->content);
    7474
    75   /* See comment on g_signal_connect_object; it only prevents the closure from
    76    * being invoked. The signal handler itself still gets leaked. The other
    77    * signal is okay, since we delete both at the same time. */
    78   if (g_signal_handler_is_connected(owl_window_get_screen(), pw->screen_resize_id))
    79       g_signal_handler_disconnect(owl_window_get_screen(), pw->screen_resize_id);
    80 
    8175  pw->border = 0;
    8276  pw->content = 0;
Note: See TracChangeset for help on using the changeset viewer.