packages: icewm/icewm-fix_input_focus_loss_for_deiconified_frame_1.patch (N...

baggins baggins at pld-linux.org
Mon Apr 11 14:29:45 CEST 2011


Author: baggins                      Date: Mon Apr 11 12:29:45 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- from debian, description inside

---- Files affected:
packages/icewm:
   icewm-fix_input_focus_loss_for_deiconified_frame_1.patch (NONE -> 1.1)  (NEW), icewm-ifstate-exact-check.patch (NONE -> 1.1)  (NEW), icewm-imap-unseen.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/icewm/icewm-fix_input_focus_loss_for_deiconified_frame_1.patch
diff -u /dev/null packages/icewm/icewm-fix_input_focus_loss_for_deiconified_frame_1.patch:1.1
--- /dev/null	Mon Apr 11 14:29:45 2011
+++ packages/icewm/icewm-fix_input_focus_loss_for_deiconified_frame_1.patch	Mon Apr 11 14:29:40 2011
@@ -0,0 +1,15 @@
+--- a/src/wmcontainer.cc	2010-08-06 18:23:51.000000000 +0400
++++ b/src/wmcontainer.cc	2010-08-06 18:23:22.000000000 +0400
+@@ -183,10 +183,12 @@
+ 
+ void YClientContainer::handleMapRequest(const XMapRequestEvent &mapRequest) {
+     if (mapRequest.window == getFrame()->client()->handle()) {
++        manager->lockFocus();
+         getFrame()->setState(WinStateMinimized |
+                              WinStateHidden |
+                              WinStateRollup,
+                              0);
++        manager->unlockFocus();
+         bool doActivate = true;
+         getFrame()->updateFocusOnMap(doActivate);
+         if (doActivate) {

================================================================
Index: packages/icewm/icewm-ifstate-exact-check.patch
diff -u /dev/null packages/icewm/icewm-ifstate-exact-check.patch:1.1
--- /dev/null	Mon Apr 11 14:29:45 2011
+++ packages/icewm/icewm-ifstate-exact-check.patch	Mon Apr 11 14:29:40 2011
@@ -0,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ifstate_exact_check.dpatch by Eduard Bloch <blade at debian.org>
+##
+## DP: Check the state of the interface with SIOCGIFFLAGS instead of traversing the SIOCGIFCONF output, also checking the link state more exactly (Debian bug #563371)
+
+ at DPATCH@
+Index: icewm-1.3.7~pre2/src/apppstatus.cc
+===================================================================
+--- icewm-1.3.7~pre2.orig/src/apppstatus.cc	2010-04-28 21:00:30.000000000 +0200
++++ icewm-1.3.7~pre2/src/apppstatus.cc	2010-04-29 22:11:16.961086255 +0200
+@@ -429,19 +429,18 @@
+     }
+     return false;
+ #else
+-    char buffer[32 * sizeof(struct ifreq)];
+-    struct ifconf ifc;
+-    struct ifreq *ifr;
+-    long long len;
+-
+     if (fNetDev == null)
+         return false;  
+-    
+-    int s = socket(PF_INET, SOCK_STREAM, 0);
+ 
++    int s = socket(PF_INET, SOCK_STREAM, 0);
+     if (s == -1)
+         return false;
+ 
++#if BROWSE_SIOCGIFCONF_LIST
++    char buffer[32 * sizeof(struct ifreq)];
++    struct ifconf ifc;
++    struct ifreq *ifr;
++    long long len;
+     ifc.ifc_len = sizeof(buffer);
+     ifc.ifc_buf = buffer;
+     if (ioctl(s, SIOCGIFCONF, &ifc) < 0) {
+@@ -459,6 +458,14 @@
+         ifr++;
+     }
+ 
++#else
++    struct ifreq ifr;
++    fNetDev.copy(ifr.ifr_name, IFNAMSIZ-1);
++    bool bUp = (ioctl(s, SIOCGIFFLAGS, &ifr) >= 0 && (ifr.ifr_flags & IFF_UP));
++    close(s);
++    return bUp;
++#endif
++
+     close(s);
+     return false;
+ #endif

================================================================
Index: packages/icewm/icewm-imap-unseen.patch
diff -u /dev/null packages/icewm/icewm-imap-unseen.patch:1.1
--- /dev/null	Mon Apr 11 14:29:45 2011
+++ packages/icewm/icewm-imap-unseen.patch	Mon Apr 11 14:29:40 2011
@@ -0,0 +1,69 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## imap_unseen.dpatch by Alexander Galanin <al at galanin.nnov.ru>
+##
+## DP: Debian Bug report logs - #539956
+## DP: [icewm] support for unseen messages on IMAP
+## DP: with minor changes by Eduard Bloch <blade at debian.org>
+
+ at DPATCH@
+Index: icewm-1.3.7~pre2/src/amailbox.cc
+===================================================================
+--- icewm-1.3.7~pre2.orig/src/amailbox.cc	2010-04-28 21:00:30.000000000 +0200
++++ icewm-1.3.7~pre2/src/amailbox.cc	2010-04-29 22:11:16.950092518 +0200
+@@ -278,14 +278,27 @@
+             state = WAIT_STAT;
+             delete[] status;
+         } else if (state == WAIT_STAT) {
+-            MSG(("imap: logout"));
+-            char logout[] = "0002 LOGOUT\r\n", folder[128];
++            MSG(("imap: unseen"));
++            char * unseen(cstrJoin("0002 STATUS ",
++                                   (fURL->path() == null || fURL->path().equals("/")) ? "INBOX" : cstring(fURL->path()).c_str() + 1,
++                                   " (UNSEEN)\r\n", NULL));
++            char folder[128] = "";
+             if (sscanf(bf, "* STATUS %127s (MESSAGES %lu)",
+                        folder, &fCurCount) != 2) {
+                 fCurCount = 0;
+             }
+             fCurUnseen = 0;
+-            sk.write(logout, strlen(logout));
++            sk.write(unseen, strlen(unseen));
++            state = WAIT_UNSEEN;
++            delete [] unseen;
++        } else if (state == WAIT_UNSEEN) {
++            MSG(("imap: logout"));
++            const char logout[] = "0003 LOGOUT\r\n", folder[128] = "";
++            if (sscanf(bf, "* STATUS %127s (UNSEEN %lu)",
++                       folder, &fCurUnseen) != 2) {
++                fCurUnseen = 0;
++            }
++            sk.write(logout, sizeof(logout)/sizeof(char)-1);
+             state = WAIT_QUIT;
+         } else if (state == WAIT_QUIT) {
+             MSG(("imap: done"));
+@@ -294,10 +307,11 @@
+             state = SUCCESS;
+             if (fCurCount == 0)
+                 fMbx->mailChecked(MailBoxStatus::mbxNoMail, fCurCount);
+-            else if (fCurCount > fLastCount && fLastCount != -1)
+-                fMbx->mailChecked(MailBoxStatus::mbxHasNewMail, fCurCount);
++            // A.Galanin: I think that 'has unseen' flag has priority higher that 'has new' flag
+             else if (fCurUnseen != 0)
+                 fMbx->mailChecked(MailBoxStatus::mbxHasUnreadMail, fCurCount);
++            else if (fCurCount > fLastCount && fLastCount != -1)
++                fMbx->mailChecked(MailBoxStatus::mbxHasNewMail, fCurCount);
+             else
+                 fMbx->mailChecked(MailBoxStatus::mbxHasMail, fCurCount);
+             fLastUnseen = fCurUnseen;
+Index: icewm-1.3.7~pre2/src/amailbox.h
+===================================================================
+--- icewm-1.3.7~pre2.orig/src/amailbox.h	2010-04-28 21:00:30.000000000 +0200
++++ icewm-1.3.7~pre2/src/amailbox.h	2010-04-29 22:11:16.950092518 +0200
+@@ -25,6 +25,7 @@
+         WAIT_USER,
+         WAIT_PASS,
+         WAIT_STAT,
++        WAIT_UNSEEN,
+         WAIT_QUIT,
+         ERROR,
+         SUCCESS
================================================================


More information about the pld-cvs-commit mailing list