- from debian, description inside
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 11 Apr 2011 12:29:40 +0000 (12:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    icewm-fix_input_focus_loss_for_deiconified_frame_1.patch -> 1.1
    icewm-ifstate-exact-check.patch -> 1.1
    icewm-imap-unseen.patch -> 1.1

icewm-fix_input_focus_loss_for_deiconified_frame_1.patch [new file with mode: 0644]
icewm-ifstate-exact-check.patch [new file with mode: 0644]
icewm-imap-unseen.patch [new file with mode: 0644]

diff --git a/icewm-fix_input_focus_loss_for_deiconified_frame_1.patch b/icewm-fix_input_focus_loss_for_deiconified_frame_1.patch
new file mode 100644 (file)
index 0000000..35c620d
--- /dev/null
@@ -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) {
diff --git a/icewm-ifstate-exact-check.patch b/icewm-ifstate-exact-check.patch
new file mode 100644 (file)
index 0000000..562268b
--- /dev/null
@@ -0,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ifstate_exact_check.dpatch by Eduard Bloch <blade@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)
+
+@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
diff --git a/icewm-imap-unseen.patch b/icewm-imap-unseen.patch
new file mode 100644 (file)
index 0000000..ea04893
--- /dev/null
@@ -0,0 +1,69 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## imap_unseen.dpatch by Alexander Galanin <al@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@debian.org>
+
+@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
This page took 0.073364 seconds and 4 git commands to generate.