[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 180855] New: make window operations available to DBus
From:       Melchior Franz <mfranz () kde ! org>
Date:       2009-01-15 17:59:54
Message-ID: bug-180855-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

http://bugs.kde.org/show_bug.cgi?id=180855

           Summary: make window operations available to DBus
           Product: kwin
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: kwin@kde.org
        ReportedBy: mfranz@kde.org


Version:            (using Devel)
Compiler:          gcc (SUSE Linux) 4.3.1 20080507 
OS:                Linux
Installed from:    Compiled sources

One of the really important operation modes for me is konsole in full-size mode
without window decoration (and running vim :-). I do all my development work in
this setup. To prepare a konsole window for this mode, I needed DBus interface
functions for window operations (maximize was already available via
"/konsole/MainWindow_1 com.trolltech.Qt.QWidget.showMaximized", but NoBorder
was missing).

I've now implemented these DBus functions for KWin:  listWindowOperations()
[returns list of operations, e.g. "NoBorder"], queryWindowOperation(id, name)
[returns state for some given operations], performWindowOperation(id, name).
For example, to turn off the window decoration for the konsole window in which
the script is run:

WINID=$(qdbus $KONSOLE_DBUS_SERVICE /konsole/MainWindow_1
org.kde.KMainWindow.winId) # win id of running konsole
NOBORDER=$(qdbus org.kde.kwin /KWin org.kde.KWin.queryWindowOperation $WINID
NoBorder)

if [ "$NOBORDER" == "false" ]; then
qdbus org.kde.kwin /KWin org.kde.KWin.performWindowOperation $WINID NoBorder
fi



Patch attached, though I have my doubts that it can be taken as is. Of course,
offering the functions directly in the target applications DBus interface
catalog would be nicer than going via KWin+winId, but I guess that's not easily
possible, as this probably only works for operations that are supported by the
WM spec.


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic