generic: cleanups

This commit is contained in:
Ivailo Monev 2015-05-01 21:53:41 +00:00
parent fbd77beac0
commit 01bca9ae2d
8 changed files with 16 additions and 51 deletions

View file

@ -1,38 +0,0 @@
dnl Check for "struct ucred"
AC_MSG_CHECKING("struct ucred")
AC_EGREP_HEADER([struct ucred], [sys/socket.h], have_ucred=yes)
if test "$have_ucred" = "yes"; then
AC_DEFINE(HAVE_STRUCT_UCRED, 1, [Define if you have the struct ucred])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl Check for the group "nogroup" or "nobody" Use -2 otherwise.
AC_MSG_CHECKING(nogroup)
AC_TRY_RUN([
#include <grp.h>
#include <sys/types.h>
int main()
{
struct group *grp = getgrnam("nogroup");
if (grp) return 0;
return 1;
}
], nogroup=nogroup,
AC_TRY_RUN([
#include <grp.h>
#include <sys/types.h>
int main()
{
struct group *grp = getgrnam("nobody");
if (grp) return 0;
return 1;
}
], nogroup=nobody,
nogroup=65534, nogroup=65534), nogroup=65534)
AC_MSG_RESULT($nogroup)
AC_SUBST(nogroup)
AC_CHECK_FUNCS(getpeereid)

View file

@ -1,11 +1,5 @@
#!/bin/sh
if [ -z "$1" ];then
exit 1
elif ! type -p zcat &>/dev/null || ! type -p groff &>/dev/null;then
exit 2
fi
header='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -24,6 +18,15 @@ header='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
</head>
<body>
'
if [ -z "$1" ];then
echo "$header <p>Nothing to do.</p>"
exit 1
elif ! type -p zcat &>/dev/null || ! type -p groff &>/dev/null;then
echo "$header <p>Either zcat or groff is not present.</p>"
exit 2
fi
base="$(basename "$1")"

View file

@ -326,7 +326,7 @@ int main( int argc, char *argv[] )
options.add("maximize-vertically", ki18n("Maximize the window vertically"));
options.add("maximize-horizontally", ki18n("Maximize the window horizontally"));
options.add("fullscreen", ki18n("Show window fullscreen"));
options.add("type <type>", ki18n("The window type: Normal, Desktop, Dock, Toolbar, \nMenu, Dialog, TopMenu or Override"));
options.add("type <type>", ki18n("The window type: Normal, Desktop, Dock, Toolbar, \nMenu, Dialog or TopMenu"));
options.add("activate", ki18n("Jump to the window even if it is started on a \n"
"different virtual desktop"));
options.add("ontop");

View file

@ -986,7 +986,7 @@ bool KCommonDecoration::eventFilter(QObject* o, QEvent* e)
}
const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::TopMenuMask
| NET::UtilityMask | NET::SplashMask;
bool KCommonDecoration::isToolWindow() const

View file

@ -599,7 +599,7 @@ public:
* @code
* const unsigned long supported_types = NET::NormalMask | NET::DesktopMask
* | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask
* | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask;
* | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask;
*
* NET::WindowType type = windowType( supported_types );
*

View file

@ -315,7 +315,7 @@ bool Workspace::sessionInfoWindowTypeMatch(Client* c, SessionInfo* info)
static const char* const window_type_names[] = {
"Unknown", "Normal" , "Desktop", "Dock", "Toolbar", "Menu", "Dialog",
"Override", "TopMenu", "Utility", "Splash"
"TopMenu", "Utility", "Splash"
};
// change also the two functions below when adding new entries

View file

@ -46,11 +46,11 @@ namespace KWin
// window types that are supported as normal windows (i.e. KWin actually manages them)
const int SUPPORTED_MANAGED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::TopMenuMask
| NET::UtilityMask | NET::SplashMask;
// window types that are supported as unmanaged (mainly for compositing)
const int SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::TopMenuMask
| NET::UtilityMask | NET::SplashMask | NET::DropdownMenuMask | NET::PopupMenuMask
| NET::TooltipMask | NET::NotificationMask | NET::ComboBoxMask | NET::DNDIconMask;

View file

@ -140,7 +140,7 @@ void KWindowListMenu::init()
NET::WindowType windowType = info->windowType( NET::NormalMask | NET::DesktopMask
| NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask
| NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask );
| NET::TopMenuMask | NET::UtilityMask | NET::SplashMask );
if ( (windowType == NET::Normal || windowType == NET::Unknown
|| (windowType == NET::Dialog && standaloneDialog( info, list )))