im.pidgin.pidgin: 701fb7aea7a77b05725227038ec645441c76668c
datallah at pidgin.im
datallah at pidgin.im
Wed Oct 3 21:33:15 EDT 2007
revision: 701fb7aea7a77b05725227038ec645441c76668c
date: 2007-10-04T01:25:43
author: datallah at pidgin.im
branch: im.pidgin.pidgin
changelog:
Undock/Redock the buddy list based on the SWP_SHOWWINDOW and SWP_HIDEWINDOW attributes in a WM_WINDOWPOSCHANGING message. This doesn't appear to have any negative effects and makes Pidgin play nicer with the VirtuaWin virtual desktop manager. Fixes #2997.
manifest:
format_version "1"
new_manifest [5c3944ba231944fc277d38d2e32c86476a9c83fd]
old_revision [7683bc9cb2ac8831a96194c68fa781cdbaa8a6fe]
patch "pidgin/plugins/win32/winprefs/gtkappbar.c"
from [fd5ebb154ecb203e19e9e60b43fecd612a669cc1]
to [e1276ea68676a28de5d4097d1cdf82ac89a6cb4f]
-------------- next part --------------
#
#
# patch "pidgin/plugins/win32/winprefs/gtkappbar.c"
# from [fd5ebb154ecb203e19e9e60b43fecd612a669cc1]
# to [e1276ea68676a28de5d4097d1cdf82ac89a6cb4f]
#
============================================================
--- pidgin/plugins/win32/winprefs/gtkappbar.c fd5ebb154ecb203e19e9e60b43fecd612a669cc1
+++ pidgin/plugins/win32/winprefs/gtkappbar.c e1276ea68676a28de5d4097d1cdf82ac89a6cb4f
@@ -352,17 +352,37 @@ static GdkFilterReturn wnd_activate(GtkA
}
return GDK_FILTER_CONTINUE;
}
+
+static void show_hide(GtkAppBar *ab, gboolean hide) {
+ purple_debug_info("gtkappbar", "show_hide(%d)\n", hide);
+
+ if (hide) {
+ purple_debug_info("gtkappbar", "hidden\n");
+ gtk_appbar_unregister(ab, GDK_WINDOW_HWND(ab->win->window));
+ ab->docked = TRUE;
+ ab->iconized = TRUE;
+ } else {
+ ab->iconized = FALSE;
+ purple_debug_info("gtkappbar", "shown\n");
+ ab->docked = FALSE;
+ gtk_appbar_do_dock(ab, ab->side);
+ }
+
+}
+
/** Notify the system that the appbar's position has changed */
static GdkFilterReturn wnd_poschanged(GtkAppBar *ab, GdkXEvent *xevent) {
if (ab->registered) {
APPBARDATA abd;
MSG *msg = (MSG*)xevent;
+
purple_debug(PURPLE_DEBUG_INFO, "gtkappbar", "wnd_poschanged\n");
abd.hWnd = msg->hwnd;
abd.cbSize = sizeof(APPBARDATA);
SHAppBarMessage(ABM_WINDOWPOSCHANGED, &abd);
+
}
return GDK_FILTER_CONTINUE;
}
@@ -382,6 +402,14 @@ static GdkFilterReturn wnd_poschanging(G
set_toolbar(msg->hwnd, FALSE);
/*return GDK_FILTER_REMOVE;*/
}
+
+ if (ab->docked) {
+ if (ab->iconized && wpos->flags & SWP_SHOWWINDOW)
+ show_hide(ab, FALSE);
+ else if (!ab->iconized && wpos->flags & SWP_HIDEWINDOW)
+ show_hide(ab, TRUE);
+ }
+
return GDK_FILTER_CONTINUE;
}
@@ -409,23 +437,17 @@ static GdkFilterReturn wnd_showwindow(Gt
}
static GdkFilterReturn wnd_showwindow(GtkAppBar *ab, GdkXEvent *xevent) {
- MSG *msg = (MSG*)xevent;
+ MSG *msg = (MSG*)xevent;
- purple_debug(PURPLE_DEBUG_INFO, "gtkappbar", "wnd_showwindow\n");
- if(msg->wParam && ab->docked) {
- ab->iconized = FALSE;
- purple_debug(PURPLE_DEBUG_INFO, "gtkappbar", "shown\n");
- ab->docked = FALSE;
- gtk_appbar_do_dock(ab, ab->side);
- }
- else if(!msg->wParam && ab->docked) {
- purple_debug(PURPLE_DEBUG_INFO, "gtkappbar", "hidden\n");
- gtk_appbar_unregister(ab, GDK_WINDOW_HWND(ab->win->window));
- ab->docked = TRUE;
- ab->iconized = TRUE;
- }
- return GDK_FILTER_CONTINUE;
+ purple_debug_info("gtkappbar", "wnd_showwindow\n");
+ if(msg->wParam && ab->docked) {
+ show_hide(ab, FALSE);
+ } else if(!msg->wParam && ab->docked) {
+ show_hide(ab, TRUE);
+ }
+ return GDK_FILTER_CONTINUE;
}
+
/** The window's size has changed */
static GdkFilterReturn wnd_size(GtkAppBar *ab, GdkXEvent *xevent) {
MSG *msg = (MSG*)xevent;
More information about the Commits
mailing list