don't flash original window in the middle of cycling focus
This commit is contained in:
parent
b3da022ee2
commit
269459e1aa
6 changed files with 21 additions and 12 deletions
|
@ -1,6 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.1.2
|
||||
*08/10/01:
|
||||
* Don't flash original window while cycling (Mark)
|
||||
FocusControl.cc FbTk/XLayer.cc/hh
|
||||
* Reset background when screen changes resolution (Mark)
|
||||
Screen.cc RootTheme.cc/hh
|
||||
* Restore missing config files on reconfigure (Mark)
|
||||
|
|
|
@ -43,7 +43,6 @@ public:
|
|||
virtual void raise(ItemType &item);
|
||||
/// move item to bottom
|
||||
virtual void lower(ItemType &item);
|
||||
virtual void restack();
|
||||
/// @return layer item on specific position, on failure 0
|
||||
ItemType *getItem(unsigned int position);
|
||||
/// @return number of elements in layer
|
||||
|
@ -52,6 +51,8 @@ public:
|
|||
const ListType &itemList() const { return m_list; }
|
||||
/// @return layer list
|
||||
ListType &itemList() { return m_list; }
|
||||
protected:
|
||||
virtual void restack();
|
||||
private:
|
||||
ListType m_list;
|
||||
};
|
||||
|
|
|
@ -52,7 +52,6 @@ public:
|
|||
|
||||
void moveToLayer(XLayerItem &item, int layernum);
|
||||
int size();
|
||||
void restack();
|
||||
|
||||
XLayer *getLayer(size_t num);
|
||||
const XLayer *getLayer(size_t num) const;
|
||||
|
@ -62,10 +61,10 @@ public:
|
|||
void unlock() { if (--m_lock == 0) restack(); }
|
||||
|
||||
private:
|
||||
void restack();
|
||||
|
||||
std::vector<XLayer *> m_layers;
|
||||
|
||||
int m_lock;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@ using std::endl;
|
|||
#endif // DEBUG
|
||||
|
||||
XLayer::XLayer(MultLayers &manager, int layernum):
|
||||
m_manager(manager), m_layernum(layernum) {
|
||||
m_manager(manager), m_layernum(layernum), m_needs_restack(false) {
|
||||
}
|
||||
|
||||
XLayer::~XLayer() {
|
||||
|
@ -70,6 +70,7 @@ void XLayer::restack() {
|
|||
|
||||
delete [] winlist;
|
||||
|
||||
m_needs_restack = false;
|
||||
}
|
||||
|
||||
int XLayer::countWindows() {
|
||||
|
@ -177,8 +178,11 @@ void XLayer::remove(XLayerItem &item) {
|
|||
void XLayer::raise(XLayerItem &item) {
|
||||
// assume it is already in this layer
|
||||
|
||||
if (&item == itemList().front())
|
||||
if (&item == itemList().front()) {
|
||||
if (m_needs_restack)
|
||||
restack();
|
||||
return; // nothing to do
|
||||
}
|
||||
|
||||
iterator it = find(itemList().begin(), itemList().end(), &item);
|
||||
if (it != itemList().end())
|
||||
|
@ -198,7 +202,7 @@ void XLayer::raise(XLayerItem &item) {
|
|||
void XLayer::tempRaise(XLayerItem &item) {
|
||||
// assume it is already in this layer
|
||||
|
||||
if (&item == itemList().front())
|
||||
if (!m_needs_restack && &item == itemList().front())
|
||||
return; // nothing to do
|
||||
|
||||
iterator it = find(itemList().begin(), itemList().end(), &item);
|
||||
|
@ -212,14 +216,18 @@ void XLayer::tempRaise(XLayerItem &item) {
|
|||
// don't add it back to the top
|
||||
stackBelowItem(&item, m_manager.getLowestItemAboveLayer(m_layernum));
|
||||
|
||||
m_needs_restack = true;
|
||||
}
|
||||
|
||||
void XLayer::lower(XLayerItem &item) {
|
||||
// assume already in this layer
|
||||
|
||||
// is it already the lowest?
|
||||
if (&item == itemList().back())
|
||||
if (&item == itemList().back()) {
|
||||
if (m_needs_restack)
|
||||
restack();
|
||||
return; // nothing to do
|
||||
}
|
||||
|
||||
iterator it = find(itemList().begin(), itemList().end(), &item);
|
||||
if (it != itemList().end())
|
||||
|
|
|
@ -44,7 +44,6 @@ public:
|
|||
|
||||
void setLayerNum(int layernum) { m_layernum = layernum; };
|
||||
int getLayerNum() { return m_layernum; };
|
||||
void restack();
|
||||
// Put all items on the same layer (called when layer item added to)
|
||||
void alignItem(XLayerItem &item);
|
||||
int countWindows();
|
||||
|
@ -73,9 +72,11 @@ public:
|
|||
void moveToLayer(XLayerItem &item, int layernum);
|
||||
|
||||
private:
|
||||
void restack();
|
||||
|
||||
MultLayers &m_manager;
|
||||
int m_layernum;
|
||||
|
||||
bool m_needs_restack;
|
||||
};
|
||||
|
||||
} // namespace FbTk
|
||||
|
|
|
@ -146,8 +146,6 @@ void FocusControl::cycleFocus(const FocusableList &window_list,
|
|||
|
||||
// if we were already cycling, then restore the old state
|
||||
if (m_cycling_last) {
|
||||
m_screen.layerManager().restack();
|
||||
|
||||
// set back to originally selected window in that group
|
||||
m_cycling_last->fbwindow()->setCurrentClient(*m_cycling_last, false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue