added gnome layer stuff
This commit is contained in:
parent
6f1a0490c4
commit
ddce851165
2 changed files with 67 additions and 6 deletions
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: Window.cc,v 1.29 2002/02/17 18:48:22 fluxgen Exp $
|
// $Id: Window.cc,v 1.30 2002/02/26 22:35:58 fluxgen Exp $
|
||||||
|
|
||||||
//use GNU extensions
|
//use GNU extensions
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
|
@ -73,6 +73,7 @@ timer(0),
|
||||||
display(0),
|
display(0),
|
||||||
lastButtonPressTime(0),
|
lastButtonPressTime(0),
|
||||||
windowmenu(0),
|
windowmenu(0),
|
||||||
|
m_layer(LAYER_NORMAL),
|
||||||
tab(0)
|
tab(0)
|
||||||
#ifdef GNOME
|
#ifdef GNOME
|
||||||
,gnome_hints(0)
|
,gnome_hints(0)
|
||||||
|
@ -921,7 +922,19 @@ int FluxboxWindow::getGnomeWindowState() {
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
int FluxboxWindow::getGnomeLayer() {
|
int FluxboxWindow::getGnomeLayer() {
|
||||||
return WIN_LAYER_NORMAL;
|
switch (m_layer) {
|
||||||
|
case LAYER_NORMAL:
|
||||||
|
return WIN_LAYER_NORMAL;
|
||||||
|
case LAYER_BOTTOM:
|
||||||
|
return WIN_LAYER_BELOW;
|
||||||
|
case LAYER_TOP:
|
||||||
|
return WIN_LAYER_ONTOP;
|
||||||
|
case LAYER_BELOW:
|
||||||
|
return WIN_LAYER_BELOW;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return WIN_LAYER_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FluxboxWindow::handleGnomePropertyNotify(Atom atom) {
|
bool FluxboxWindow::handleGnomePropertyNotify(Atom atom) {
|
||||||
|
@ -945,7 +958,7 @@ bool FluxboxWindow::handleGnomePropertyNotify(Atom atom) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cerr<<__FILE__<<"("<<__LINE__<<"): gnome layer"<<endl;
|
cerr<<__FILE__<<"("<<__LINE__<<"): gnome layer"<<endl;
|
||||||
#endif
|
#endif
|
||||||
|
loadGnomeLayerAtom();
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -994,12 +1007,36 @@ void FluxboxWindow::setGnomeState(int state) {
|
||||||
cerr<<"Arrange Ignore"<<endl;
|
cerr<<"Arrange Ignore"<<endl;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FluxboxWindow::setGnomeLayer(int layer) {
|
||||||
|
switch (layer) {
|
||||||
|
case WIN_LAYER_DESKTOP:
|
||||||
|
m_layer = LAYER_BOTTOM;
|
||||||
|
break;
|
||||||
|
case WIN_LAYER_BELOW:
|
||||||
|
m_layer = LAYER_BELOW;
|
||||||
|
break;
|
||||||
|
case WIN_LAYER_NORMAL:
|
||||||
|
m_layer = LAYER_NORMAL;
|
||||||
|
break;
|
||||||
|
case WIN_LAYER_ONTOP:
|
||||||
|
case WIN_LAYER_DOCK:
|
||||||
|
case WIN_LAYER_ABOVE_DOCK:
|
||||||
|
case WIN_LAYER_MENU:
|
||||||
|
m_layer = LAYER_TOP;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
m_layer = LAYER_NORMAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
//------------ loadGnomeAtoms ------------
|
//------------ loadGnomeAtoms ------------
|
||||||
// Loads the values from the atoms
|
// Loads the values from the atoms
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
void FluxboxWindow::loadGnomeAtoms() {
|
void FluxboxWindow::loadGnomeAtoms() {
|
||||||
loadGnomeStateAtom();
|
loadGnomeStateAtom();
|
||||||
loadGnomeHintsAtom();
|
loadGnomeHintsAtom();
|
||||||
|
loadGnomeLayerAtom();
|
||||||
}
|
}
|
||||||
//----------- loadGnomeStateAtom -------
|
//----------- loadGnomeStateAtom -------
|
||||||
// Gets gnome state from the atom
|
// Gets gnome state from the atom
|
||||||
|
@ -1040,7 +1077,26 @@ void FluxboxWindow::loadGnomeHintsAtom() {
|
||||||
XFree (data);
|
XFree (data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//---------- loadGnomeLayerAtom ------------
|
||||||
|
// Gets the gnome layer from the atom
|
||||||
|
//------------------------------------------
|
||||||
|
void FluxboxWindow::loadGnomeLayerAtom() {
|
||||||
|
Atom ret_type;
|
||||||
|
int fmt;
|
||||||
|
unsigned long nitems, bytes_after;
|
||||||
|
long *data = 0;
|
||||||
|
BaseDisplay *bd = screen->getBaseDisplay();
|
||||||
|
if (XGetWindowProperty (bd->getXDisplay(), getClientWindow(),
|
||||||
|
bd->getGnomeLayerAtom(), 0, 1, False, XA_CARDINAL,
|
||||||
|
&ret_type, &fmt, &nitems, &bytes_after,
|
||||||
|
(unsigned char **) &data) == Success && data) {
|
||||||
|
setGnomeLayer(static_cast<int>(*data));
|
||||||
|
#ifdef DEBUG
|
||||||
|
cerr<<__FILE__<<"("<<__LINE__<<"): gnome hints:0x"<<hex<<*data<<dec<<endl;
|
||||||
|
#endif
|
||||||
|
XFree (data);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif //!GNOME
|
#endif //!GNOME
|
||||||
|
|
||||||
#ifdef NEWWMSPEC
|
#ifdef NEWWMSPEC
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: Window.hh,v 1.10 2002/02/17 18:47:45 fluxgen Exp $
|
// $Id: Window.hh,v 1.11 2002/02/26 22:35:58 fluxgen Exp $
|
||||||
|
|
||||||
#ifndef WINDOW_HH
|
#ifndef WINDOW_HH
|
||||||
#define WINDOW_HH
|
#define WINDOW_HH
|
||||||
|
@ -156,7 +156,7 @@ public:
|
||||||
inline const int &getYClient(void) const { return client.y; }
|
inline const int &getYClient(void) const { return client.y; }
|
||||||
inline const int &getWorkspaceNumber(void) const { return workspace_number; }
|
inline const int &getWorkspaceNumber(void) const { return workspace_number; }
|
||||||
inline const int &getWindowNumber(void) const { return window_number; }
|
inline const int &getWindowNumber(void) const { return window_number; }
|
||||||
|
inline const WinLayer getLayer(void) const { return m_layer; }
|
||||||
inline const unsigned int &getWidth(void) const { return frame.width; }
|
inline const unsigned int &getWidth(void) const { return frame.width; }
|
||||||
inline const unsigned int &getHeight(void) const { return frame.height; }
|
inline const unsigned int &getHeight(void) const { return frame.height; }
|
||||||
inline const unsigned int &getClientHeight(void) const
|
inline const unsigned int &getClientHeight(void) const
|
||||||
|
@ -229,6 +229,7 @@ private:
|
||||||
|
|
||||||
int focus_mode, window_number, workspace_number;
|
int focus_mode, window_number, workspace_number;
|
||||||
unsigned long current_state;
|
unsigned long current_state;
|
||||||
|
WinLayer m_layer;
|
||||||
|
|
||||||
struct _client {
|
struct _client {
|
||||||
FluxboxWindow *transient_for, // which window are we a transient for?
|
FluxboxWindow *transient_for, // which window are we a transient for?
|
||||||
|
@ -309,12 +310,16 @@ private:
|
||||||
void updateGnomeLayerAtom();
|
void updateGnomeLayerAtom();
|
||||||
void updateGnomeWorkspaceAtom();
|
void updateGnomeWorkspaceAtom();
|
||||||
|
|
||||||
|
void setGnomeLayer(int layer);
|
||||||
|
|
||||||
int getGnomeWindowState();
|
int getGnomeWindowState();
|
||||||
bool handleGnomePropertyNotify(Atom atom);
|
bool handleGnomePropertyNotify(Atom atom);
|
||||||
int getGnomeLayer();
|
int getGnomeLayer();
|
||||||
void loadGnomeAtoms();
|
void loadGnomeAtoms();
|
||||||
void loadGnomeStateAtom();
|
void loadGnomeStateAtom();
|
||||||
void loadGnomeHintsAtom();
|
void loadGnomeHintsAtom();
|
||||||
|
void loadGnomeLayerAtom();
|
||||||
|
|
||||||
int gnome_hints;
|
int gnome_hints;
|
||||||
#endif //GNOME
|
#endif //GNOME
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue