[Pidgin] #4832: conversation window ignores window manager's placement rules in X11
Pidgin
trac at pidgin.im
Tue Feb 12 17:48:28 EST 2008
#4832: conversation window ignores window manager's placement rules in X11
-------------------+--------------------------------------------------------
Reporter: lex | Owner: lschiere
Type: defect | Status: new
Priority: minor | Component: unclassified
Version: 2.3.1 | Keywords:
Pending: 0 |
-------------------+--------------------------------------------------------
Pidgin remembers the position of the conversation window and opens new
conversation windows in the same spot. In X11, this results in all new
conversation windows appearing on top of each other, regardless of how the
window manager is set to place new windows.
The standard paradigm for new window placement in X11 is that the window
manager (in my case enlightenment 16) handles placement of windows. I've
set mine to place them intelligently by sticking them in an unused spot on
the screen if there's enough room. That way you can see all new windows
that open up. (I don't have a taskbar because I don't need one, so windows
stacking up right on top of each other can be confusing and lead me to
lose track of them.)
In gaim, this worked perfectly. I prefer not to use tabs, but instead to
have all of my conversations visible on the screen at once so I don't have
to click around to see what's happening in other conversations. Gaim
remembered only the size of the new windows, and the window manager made
them sit nicely side by side. It worked exactly how I wanted it to.
Now that I've upgraded to pidgin, all of my new conversations open up
right on top of the old ones. This is incredibly annoying and makes me
want to either stay with gaim or hack pidgin's source code. This bug is
pretty much a showstopper for me.
The Extended Placement plugin doesn't help out with this. The only other
positioning plugin I could find, "extpos", is MS Windows-only.
In the comments of ticket #4461, rekkanoryo indicated that this is not
intended behavior, and that conversation window positions are not supposed
to be saved in X11. However, looking at pidgin-2.3.1/pidgin/gtkconv.c:
{{{
PidginWindow *
pidgin_conv_window_new()
{
PidginWindow *win;
GtkPositionType pos;
GtkWidget *testidea;
GtkWidget *menubar;
#if GTK_CHECK_VERSION(2,6,0)
GdkModifierType state;
#endif
win = g_malloc0(sizeof(PidginWindow));
window_list = g_list_append(window_list, win);
/* Create the window. */
win->window = pidgin_create_window(NULL, 0, "conversation", TRUE);
#if GTK_CHECK_VERSION(2,6,0)
if (!gtk_get_current_event_state(&state))
gtk_window_set_focus_on_map(GTK_WINDOW(win->window),
FALSE);
#endif
pidgin_conv_restore_position(win);
}}}
{{{
static void
pidgin_conv_restore_position(PidginWindow *win) {
pidgin_conv_set_position_size(win,
purple_prefs_get_int(PIDGIN_PREFS_ROOT
"/conversations/im/x"),
purple_prefs_get_int(PIDGIN_PREFS_ROOT
"/conversations/im/y"),
purple_prefs_get_int(PIDGIN_PREFS_ROOT
"/conversations/im/width"),
purple_prefs_get_int(PIDGIN_PREFS_ROOT
"/conversations/im/height"));
}
}}}
...and pidgin_conv_set_position_size also doesn't have any code to check
the platform either, so position-storing is definitely happening on all
platforms.
Requested solution: #ifdefs to avoid doing position saving/restoring in
X11, or a preference (need not be settable in the GUI) to save only window
size, not position, like gaim used to do.
--
Ticket URL: <http://developer.pidgin.im/ticket/4832>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list