Compare commits
20 Commits
wip/xinput
...
3.1.4
Author | SHA1 | Date | |
---|---|---|---|
6ff9cae2b1 | |||
d3edcbc11e | |||
779ef582f1 | |||
385887c55b | |||
f396a7aeb4 | |||
ffa2310a34 | |||
fccd626604 | |||
5237b2aa65 | |||
b1ae599c39 | |||
3f694c7335 | |||
3da2f876bd | |||
a6d08fcd71 | |||
73d22a273e | |||
24843f277f | |||
4167ef870c | |||
cd7a968093 | |||
12f71c9795 | |||
b369c75e1b | |||
739eade4fa | |||
d2b63eaf1f |
26
NEWS
26
NEWS
@ -1,3 +1,29 @@
|
||||
3.1.4
|
||||
=====
|
||||
* Use better, much more subtle shadow definitions [Jakub; #649374]
|
||||
* Add the ability to use named GTK+ colors in theme files as
|
||||
gtk:custom(name,fallback) [Florian; #648709]
|
||||
* Port from GdkColor to GdkRGBA and from GtkStyle to GtkStyleContext
|
||||
[Florian; #650586]
|
||||
* Try to fix window bindings using the Super key [Owen; #624869]
|
||||
* Update to using more modern Cogl and Clutter APIs
|
||||
[Adel, Emmanuele, Neil; #654551 #654729 #654730 #655064]
|
||||
* Fix for srcdir != builddir builds [Thierry; #624910]
|
||||
* Make handling of focus appearance for attached dialogs more robust
|
||||
[Dan; #647712]
|
||||
* Misc bug fixes
|
||||
[Dan, Florian, Jasper, Owen, Rui; #642957 #649374 #650661 #654489 #654539]
|
||||
|
||||
Contributors:
|
||||
Emmanuele Bassi, Adel Gadllah, Rui Matos, Florian Müllner, Neil Roberts,
|
||||
Jasper St. Pierre, Jakub Steiner, Owen Taylor
|
||||
|
||||
Translations:
|
||||
Ihar Hrachyshka [be], Jorge González, Daniel Mustieles [es],
|
||||
Fran Dieguez [gl], Yaron Shahrabani [he], Takeshi Aihana [ja],
|
||||
Kjartan Maraas [nb], Rudolfs Mazurs [lv], Matej Urbančič [sl],
|
||||
Abduxukur Abdurixit [ug], Nguyễn Thái Ngọc Duy [vi]
|
||||
|
||||
3.1.3.1
|
||||
=======
|
||||
* Back API version down to "3.0" - the change to Meta-3.1.gir
|
||||
|
45
configure.in
45
configure.in
@ -2,7 +2,7 @@ AC_PREREQ(2.50)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [1])
|
||||
m4_define([mutter_micro_version], [3.1])
|
||||
m4_define([mutter_micro_version], [4])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
@ -185,26 +185,13 @@ else
|
||||
AC_MSG_ERROR([no. Mutter requires the Xcomposite extension to build.])
|
||||
fi
|
||||
|
||||
CLUTTER_VERSION=1.2.0
|
||||
CLUTTER_VERSION=1.7.5
|
||||
CLUTTER_PACKAGE=clutter-1.0
|
||||
AC_SUBST(CLUTTER_PACKAGE)
|
||||
if $PKG_CONFIG --atleast-version $CLUTTER_VERSION $CLUTTER_PACKAGE ; then
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CLUTTER_PACKAGE "
|
||||
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
|
||||
AC_DEFINE(WITH_CLUTTER, , [Building with Clutter compositor])
|
||||
|
||||
dnl Check for the clutter-glx-texture-pixmap header
|
||||
mutter_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $CLUTTER_CFLAGS"
|
||||
AC_CHECK_HEADER([clutter/glx/clutter-glx-texture-pixmap.h],
|
||||
[have_glx_texture_pixmap=yes],
|
||||
[have_glx_texture_pixmap=no])
|
||||
CPPFLAGS="$mutter_save_cppflags"
|
||||
|
||||
if test x$have_glx_texture_pixmap = xyes; then
|
||||
AC_DEFINE(HAVE_GLX_TEXTURE_PIXMAP, ,
|
||||
[Is ClutterGLXTexturePixmap available?])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
|
||||
fi
|
||||
@ -238,33 +225,6 @@ if test x$have_xcursor = xyes; then
|
||||
AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support])
|
||||
fi
|
||||
|
||||
XINPUT2_VERSION=1.4.0
|
||||
|
||||
AC_ARG_ENABLE(xinput2,
|
||||
AC_HELP_STRING([--disable-xinput2],
|
||||
[disable XInput2 usage]),,
|
||||
enable_xinput2=yes)
|
||||
|
||||
if test x$enable_xinput2 = xyes; then
|
||||
AC_MSG_CHECKING([XInput2])
|
||||
if $PKG_CONFIG --atleast-version $XINPUT2_VERSION xi; then
|
||||
have_xinput2=yes
|
||||
else
|
||||
have_xinput2=no
|
||||
fi
|
||||
AC_MSG_RESULT($have_xinput2)
|
||||
else
|
||||
have_xinput2=no
|
||||
fi
|
||||
|
||||
if test x$have_xinput2 = xyes; then
|
||||
echo "Building with XInput2"
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xi"
|
||||
AC_DEFINE(HAVE_XINPUT2, , [Building with XInput2 support])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_XINPUT2, test "$have_xinput2" = "yes")
|
||||
|
||||
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
|
||||
|
||||
AC_PATH_XTRA
|
||||
@ -584,7 +544,6 @@ mutter-$VERSION
|
||||
Shape extension: ${found_shape}
|
||||
Xsync: ${found_xsync}
|
||||
Xcursor: ${have_xcursor}
|
||||
XInput2: ${have_xinput2}
|
||||
"
|
||||
|
||||
|
||||
|
243
po/be.po
243
po/be.po
@ -2,8 +2,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter.master\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-06-25 21:46+0300\n"
|
||||
"PO-Revision-Date: 2011-04-24 13:07+0200\n"
|
||||
"POT-Creation-Date: 2011-07-14 00:21+0300\n"
|
||||
"PO-Revision-Date: 2011-07-14 00:23+0300\n"
|
||||
"Last-Translator: Ігар Грачышка <ihar.hrachyshka@gmail.com>\n"
|
||||
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
|
||||
"Language: be\n"
|
||||
@ -14,6 +14,16 @@ msgstr ""
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Pootle 2.1.6\n"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#: ../src/compositor/compositor.c:509
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
msgstr ""
|
||||
"Іншы кампазітны кіраўнік вокнаў ужо абслугоўвае экран %i дысплея \"%s\"."
|
||||
|
||||
#: ../src/core/all-keybindings.h:88
|
||||
msgid "Switch to workspace 1"
|
||||
msgstr "Перайсці ў прастору працы 1"
|
||||
@ -383,7 +393,7 @@ msgstr ""
|
||||
#. Displayed when a keybinding which is
|
||||
#. * supposed to launch a program fails.
|
||||
#.
|
||||
#: ../src/core/keybindings.c:2468
|
||||
#: ../src/core/keybindings.c:2523
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running <tt>%s</tt>:\n"
|
||||
@ -394,12 +404,12 @@ msgstr ""
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
#: ../src/core/keybindings.c:2558
|
||||
#: ../src/core/keybindings.c:2613
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "Загад %d не быў вызначаны.\n"
|
||||
|
||||
#: ../src/core/keybindings.c:3570
|
||||
#: ../src/core/keybindings.c:3625
|
||||
#, c-format
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "Загад на запуск тэрмінала не быў вызначаны.\n"
|
||||
@ -510,8 +520,8 @@ msgid ""
|
||||
"Workarounds for broken applications disabled. Some applications may not "
|
||||
"behave properly.\n"
|
||||
msgstr ""
|
||||
"Асаблівыя паводзіны для некаторых хібных праграм выключаныя. Некаторыя праграмы "
|
||||
"могуць перастаць працаваць, як мае быць.\n"
|
||||
"Асаблівыя паводзіны для некаторых хібных праграм выключаныя. Некаторыя "
|
||||
"праграмы могуць перастаць працаваць, як мае быць.\n"
|
||||
|
||||
#: ../src/core/prefs.c:1524
|
||||
#, c-format
|
||||
@ -693,7 +703,7 @@ msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:6886
|
||||
#: ../src/core/window.c:6903
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@ -709,7 +719,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7549
|
||||
#: ../src/core/window.c:7566
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
||||
@ -729,11 +739,16 @@ msgstr "Праграма прызначыла памылковае значэн
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (на %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1484
|
||||
#: ../src/core/window-props.c:1488
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Для %2$s вызначана хібнае акно WM_TRANSIENT_FOR 0x%1$lx.\n"
|
||||
|
||||
#: ../src/core/window-props.c:1500
|
||||
#, c-format
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr "WM_TRANSIENT_FOR акно 0x%lx для %s стварыла б цыкл.\n"
|
||||
|
||||
#: ../src/core/xprops.c:155
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -752,14 +767,14 @@ msgstr ""
|
||||
#: ../src/core/xprops.c:411
|
||||
#, c-format
|
||||
msgid "Property %s on window 0x%lx contained invalid UTF-8\n"
|
||||
msgstr "Уласцівасць %s акна 0x%lx утрымлівала хібныя для UTF-8 знакі\n"
|
||||
msgstr "Уласцівасць %s акна 0x%lx змяшчала хібныя для UTF-8 знакі\n"
|
||||
|
||||
#: ../src/core/xprops.c:494
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||
msgstr ""
|
||||
"Уласцівасць %s акна 0x%lx утрымлівала хібныя для UTF-8 знакі ў складніку %d "
|
||||
"Уласцівасць %s акна 0x%lx змяшчала хібныя для UTF-8 знакі ў складніку %d "
|
||||
"спіса\n"
|
||||
|
||||
#: ../src/mutter.schemas.in.h:1
|
||||
@ -815,47 +830,47 @@ msgstr "Працоўныя прасторы толькі на галоўным
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Правілы выкарыстання: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1280
|
||||
#: ../src/ui/frames.c:1289
|
||||
msgid "Close Window"
|
||||
msgstr "Зачыніць акно"
|
||||
|
||||
#: ../src/ui/frames.c:1283
|
||||
#: ../src/ui/frames.c:1292
|
||||
msgid "Window Menu"
|
||||
msgstr "Меню акна"
|
||||
|
||||
#: ../src/ui/frames.c:1286
|
||||
#: ../src/ui/frames.c:1295
|
||||
msgid "Minimize Window"
|
||||
msgstr "Прыхаваць акно"
|
||||
|
||||
#: ../src/ui/frames.c:1289
|
||||
#: ../src/ui/frames.c:1298
|
||||
msgid "Maximize Window"
|
||||
msgstr "Разгарнуць акно"
|
||||
|
||||
#: ../src/ui/frames.c:1292
|
||||
#: ../src/ui/frames.c:1301
|
||||
msgid "Restore Window"
|
||||
msgstr "Аднавіць былы памер акна"
|
||||
|
||||
#: ../src/ui/frames.c:1295
|
||||
#: ../src/ui/frames.c:1304
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Скруціць акно ў загаловак"
|
||||
|
||||
#: ../src/ui/frames.c:1298
|
||||
#: ../src/ui/frames.c:1307
|
||||
msgid "Unroll Window"
|
||||
msgstr "Раскруціць акно з загалоўка"
|
||||
|
||||
#: ../src/ui/frames.c:1301
|
||||
#: ../src/ui/frames.c:1310
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Трымаць акно над астатнімі"
|
||||
|
||||
#: ../src/ui/frames.c:1304
|
||||
#: ../src/ui/frames.c:1313
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Прыбраць акно з верху"
|
||||
|
||||
#: ../src/ui/frames.c:1307
|
||||
#: ../src/ui/frames.c:1316
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Заўсёды на бачнай прасторы працы"
|
||||
|
||||
#: ../src/ui/frames.c:1310
|
||||
#: ../src/ui/frames.c:1319
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Змясціць акно на адзінай прасторы працы"
|
||||
|
||||
@ -1058,246 +1073,262 @@ msgstr "Mod5"
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/ui/theme.c:255
|
||||
#: ../src/ui/theme.c:252
|
||||
msgid "top"
|
||||
msgstr "верхнюю"
|
||||
|
||||
#: ../src/ui/theme.c:257
|
||||
#: ../src/ui/theme.c:254
|
||||
msgid "bottom"
|
||||
msgstr "ніжнюю"
|
||||
|
||||
#: ../src/ui/theme.c:259
|
||||
#: ../src/ui/theme.c:256
|
||||
msgid "left"
|
||||
msgstr "левую"
|
||||
|
||||
#: ../src/ui/theme.c:261
|
||||
#: ../src/ui/theme.c:258
|
||||
msgid "right"
|
||||
msgstr "правую"
|
||||
|
||||
#: ../src/ui/theme.c:288
|
||||
#: ../src/ui/theme.c:285
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify \"%s\" dimension"
|
||||
msgstr "апісанне геаметрыі рамкі акна не вызначае %s граніцу"
|
||||
|
||||
#: ../src/ui/theme.c:307
|
||||
#: ../src/ui/theme.c:304
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
msgstr ""
|
||||
"апісанне геаметрыі рамкі акна не вызначае %s граніцу для аблямоўкі \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:344
|
||||
#: ../src/ui/theme.c:341
|
||||
#, c-format
|
||||
msgid "Button aspect ratio %g is not reasonable"
|
||||
msgstr "Прапорцыі кнопкі %g не маюць сэнсу"
|
||||
|
||||
#: ../src/ui/theme.c:356
|
||||
#: ../src/ui/theme.c:353
|
||||
#, c-format
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr "Апісанне геаметрыі рамкі акна не вызначае памер кнопак"
|
||||
|
||||
#: ../src/ui/theme.c:1064
|
||||
#: ../src/ui/theme.c:1061
|
||||
#, c-format
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "Градыент мусіць мець прынамсі два колеры"
|
||||
|
||||
#: ../src/ui/theme.c:1202
|
||||
#: ../src/ui/theme.c:1206
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1222
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||
"_ are valid"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||
"fit the format"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1272
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
"where NORMAL is the state; could not parse \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1216
|
||||
#: ../src/ui/theme.c:1286
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1227
|
||||
#: ../src/ui/theme.c:1297
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1240
|
||||
#: ../src/ui/theme.c:1310
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1270
|
||||
#: ../src/ui/theme.c:1340
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
"format"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1281
|
||||
#: ../src/ui/theme.c:1351
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1291
|
||||
#: ../src/ui/theme.c:1361
|
||||
#, c-format
|
||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1338
|
||||
#: ../src/ui/theme.c:1408
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1349
|
||||
#: ../src/ui/theme.c:1419
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1359
|
||||
#: ../src/ui/theme.c:1429
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1388
|
||||
#: ../src/ui/theme.c:1458
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1481
|
||||
#, c-format
|
||||
msgid "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1713
|
||||
#: ../src/ui/theme.c:1769
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1740
|
||||
#: ../src/ui/theme.c:1796
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1754
|
||||
#: ../src/ui/theme.c:1810
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1876
|
||||
#: ../src/ui/theme.c:1932
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
"\"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:1933
|
||||
#: ../src/ui/theme.c:1989
|
||||
#, c-format
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2044 ../src/ui/theme.c:2054 ../src/ui/theme.c:2088
|
||||
#: ../src/ui/theme.c:2100 ../src/ui/theme.c:2110 ../src/ui/theme.c:2144
|
||||
#, c-format
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2096
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2152
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2208
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2161
|
||||
#: ../src/ui/theme.c:2217
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2169
|
||||
#: ../src/ui/theme.c:2225
|
||||
#, c-format
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2179
|
||||
#: ../src/ui/theme.c:2235
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
"operand in between"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2330 ../src/ui/theme.c:2375
|
||||
#: ../src/ui/theme.c:2386 ../src/ui/theme.c:2431
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2429
|
||||
#: ../src/ui/theme.c:2485
|
||||
#, c-format
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2458
|
||||
#: ../src/ui/theme.c:2514
|
||||
#, c-format
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2522
|
||||
#: ../src/ui/theme.c:2578
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2533
|
||||
#: ../src/ui/theme.c:2589
|
||||
#, c-format
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:2745 ../src/ui/theme.c:2765 ../src/ui/theme.c:2785
|
||||
#: ../src/ui/theme.c:2801 ../src/ui/theme.c:2821 ../src/ui/theme.c:2841
|
||||
#, c-format
|
||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:4482
|
||||
#: ../src/ui/theme.c:4512
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
"specified for this frame style"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:5012 ../src/ui/theme.c:5037
|
||||
#: ../src/ui/theme.c:5042 ../src/ui/theme.c:5067
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:5085
|
||||
#: ../src/ui/theme.c:5115
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "Не ўдалося загрузіць матыў аздаблення \"%s\": %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:5221 ../src/ui/theme.c:5228 ../src/ui/theme.c:5235
|
||||
#: ../src/ui/theme.c:5242 ../src/ui/theme.c:5249
|
||||
#: ../src/ui/theme.c:5251 ../src/ui/theme.c:5258 ../src/ui/theme.c:5265
|
||||
#: ../src/ui/theme.c:5272 ../src/ui/theme.c:5279
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "Для матыва аздаблення \"%2$s\" не прызначана <%1$s>"
|
||||
|
||||
#: ../src/ui/theme.c:5257
|
||||
#: ../src/ui/theme.c:5287
|
||||
#, c-format
|
||||
msgid ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:5707 ../src/ui/theme.c:5769 ../src/ui/theme.c:5832
|
||||
#: ../src/ui/theme.c:5737 ../src/ui/theme.c:5799 ../src/ui/theme.c:5862
|
||||
#, c-format
|
||||
msgid ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme.c:5715 ../src/ui/theme.c:5777 ../src/ui/theme.c:5840
|
||||
#: ../src/ui/theme.c:5745 ../src/ui/theme.c:5807 ../src/ui/theme.c:5870
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Канстанта \"%s\" ужо азначана"
|
||||
@ -1729,92 +1760,92 @@ msgstr ""
|
||||
msgid "Fake menu item %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:370
|
||||
#: ../src/ui/theme-viewer.c:371
|
||||
msgid "Border-only window"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:372
|
||||
#: ../src/ui/theme-viewer.c:373
|
||||
msgid "Bar"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:389
|
||||
#: ../src/ui/theme-viewer.c:390
|
||||
msgid "Normal Application Window"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:393
|
||||
#: ../src/ui/theme-viewer.c:394
|
||||
msgid "Dialog Box"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:397
|
||||
#: ../src/ui/theme-viewer.c:398
|
||||
msgid "Modal Dialog Box"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:401
|
||||
#: ../src/ui/theme-viewer.c:402
|
||||
msgid "Utility Palette"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:405
|
||||
#: ../src/ui/theme-viewer.c:406
|
||||
msgid "Torn-off Menu"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:409
|
||||
#: ../src/ui/theme-viewer.c:410
|
||||
msgid "Border"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:413
|
||||
#: ../src/ui/theme-viewer.c:414
|
||||
msgid "Attached Modal Dialog"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:744
|
||||
#: ../src/ui/theme-viewer.c:747
|
||||
#, c-format
|
||||
msgid "Button layout test %d"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:773
|
||||
#: ../src/ui/theme-viewer.c:776
|
||||
#, c-format
|
||||
msgid "%g milliseconds to draw one window frame"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:818
|
||||
#: ../src/ui/theme-viewer.c:821
|
||||
#, c-format
|
||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:825
|
||||
#: ../src/ui/theme-viewer.c:828
|
||||
#, c-format
|
||||
msgid "Error loading theme: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:831
|
||||
#: ../src/ui/theme-viewer.c:834
|
||||
#, c-format
|
||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:875
|
||||
#: ../src/ui/theme-viewer.c:878
|
||||
msgid "Normal Title Font"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:881
|
||||
#: ../src/ui/theme-viewer.c:884
|
||||
msgid "Small Title Font"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:887
|
||||
#: ../src/ui/theme-viewer.c:890
|
||||
msgid "Large Title Font"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:892
|
||||
#: ../src/ui/theme-viewer.c:895
|
||||
msgid "Button Layouts"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:897
|
||||
#: ../src/ui/theme-viewer.c:900
|
||||
msgid "Benchmark"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:949
|
||||
#: ../src/ui/theme-viewer.c:952
|
||||
msgid "Window Title Goes Here"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1055
|
||||
#: ../src/ui/theme-viewer.c:1058
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
|
||||
@ -1822,39 +1853,39 @@ msgid ""
|
||||
"frame)\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1274
|
||||
#: ../src/ui/theme-viewer.c:1277
|
||||
msgid "position expression test returned TRUE but set error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1276
|
||||
#: ../src/ui/theme-viewer.c:1279
|
||||
msgid "position expression test returned FALSE but didn't set error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1280
|
||||
#: ../src/ui/theme-viewer.c:1283
|
||||
msgid "Error was expected but none given"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1282
|
||||
#: ../src/ui/theme-viewer.c:1285
|
||||
#, c-format
|
||||
msgid "Error %d was expected but %d given"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1288
|
||||
#: ../src/ui/theme-viewer.c:1291
|
||||
#, c-format
|
||||
msgid "Error not expected but one was returned: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1292
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#, c-format
|
||||
msgid "x value was %d, %d was expected"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#: ../src/ui/theme-viewer.c:1298
|
||||
#, c-format
|
||||
msgid "y value was %d, %d was expected"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1360
|
||||
#: ../src/ui/theme-viewer.c:1363
|
||||
#, c-format
|
||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
msgstr ""
|
||||
|
236
po/he.po
236
po/he.po
@ -9,8 +9,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity.HEAD.he\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-07-01 19:31+0300\n"
|
||||
"PO-Revision-Date: 2011-07-01 19:33+0200\n"
|
||||
"POT-Creation-Date: 2011-07-15 10:38+0300\n"
|
||||
"PO-Revision-Date: 2011-07-15 10:38+0200\n"
|
||||
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
|
||||
"Language-Team: Hebrew <he@li.org>\n"
|
||||
"Language: he\n"
|
||||
@ -389,7 +389,7 @@ msgstr "תוכנית אחרת כבר משתמשת במקש %s עם המקש %x
|
||||
#. Displayed when a keybinding which is
|
||||
#. * supposed to launch a program fails.
|
||||
#.
|
||||
#: ../src/core/keybindings.c:2468
|
||||
#: ../src/core/keybindings.c:2523
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running <tt>%s</tt>:\n"
|
||||
@ -400,12 +400,12 @@ msgstr ""
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
#: ../src/core/keybindings.c:2558
|
||||
#: ../src/core/keybindings.c:2613
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "אף פקודה %d לא הוגדרה.\n"
|
||||
|
||||
#: ../src/core/keybindings.c:3570
|
||||
#: ../src/core/keybindings.c:3625
|
||||
#, c-format
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "אף פקודת מסוף לא הוגדרה.\n"
|
||||
@ -691,7 +691,7 @@ msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:6886
|
||||
#: ../src/core/window.c:6903
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@ -707,7 +707,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7549
|
||||
#: ../src/core/window.c:7566
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
||||
@ -726,11 +726,16 @@ msgstr "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (מעל %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1484
|
||||
#: ../src/core/window-props.c:1488
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
|
||||
#: ../src/core/window-props.c:1500
|
||||
#, c-format
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
|
||||
#: ../src/core/xprops.c:155
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -817,47 +822,47 @@ msgstr "Workspaces only on primary"
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "שימוש: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1280
|
||||
#: ../src/ui/frames.c:1289
|
||||
msgid "Close Window"
|
||||
msgstr "סגור חלון"
|
||||
|
||||
#: ../src/ui/frames.c:1283
|
||||
#: ../src/ui/frames.c:1292
|
||||
msgid "Window Menu"
|
||||
msgstr "תפריט חלון"
|
||||
|
||||
#: ../src/ui/frames.c:1286
|
||||
#: ../src/ui/frames.c:1295
|
||||
msgid "Minimize Window"
|
||||
msgstr "מזער חלון"
|
||||
|
||||
#: ../src/ui/frames.c:1289
|
||||
#: ../src/ui/frames.c:1298
|
||||
msgid "Maximize Window"
|
||||
msgstr "הגדל חלון"
|
||||
|
||||
#: ../src/ui/frames.c:1292
|
||||
#: ../src/ui/frames.c:1301
|
||||
msgid "Restore Window"
|
||||
msgstr "שחזר חלון"
|
||||
|
||||
#: ../src/ui/frames.c:1295
|
||||
#: ../src/ui/frames.c:1304
|
||||
msgid "Roll Up Window"
|
||||
msgstr "גלול חלון מעלה"
|
||||
|
||||
#: ../src/ui/frames.c:1298
|
||||
#: ../src/ui/frames.c:1307
|
||||
msgid "Unroll Window"
|
||||
msgstr "בטל גלילה"
|
||||
|
||||
#: ../src/ui/frames.c:1301
|
||||
#: ../src/ui/frames.c:1310
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "שמור על החלון גלוי"
|
||||
|
||||
#: ../src/ui/frames.c:1304
|
||||
#: ../src/ui/frames.c:1313
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "בטל שמירת החלון גלוי"
|
||||
|
||||
#: ../src/ui/frames.c:1307
|
||||
#: ../src/ui/frames.c:1316
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "הראה בכל סביבות העבודה"
|
||||
|
||||
#: ../src/ui/frames.c:1310
|
||||
#: ../src/ui/frames.c:1319
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "הראה את החלון על סביבת עבודה אחת בלבד"
|
||||
|
||||
@ -1060,48 +1065,75 @@ msgstr "Mod5"
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/ui/theme.c:255
|
||||
#: ../src/ui/theme.c:252
|
||||
msgid "top"
|
||||
msgstr "top"
|
||||
|
||||
#: ../src/ui/theme.c:257
|
||||
#: ../src/ui/theme.c:254
|
||||
msgid "bottom"
|
||||
msgstr "bottom"
|
||||
|
||||
#: ../src/ui/theme.c:259
|
||||
#: ../src/ui/theme.c:256
|
||||
msgid "left"
|
||||
msgstr "left"
|
||||
|
||||
#: ../src/ui/theme.c:261
|
||||
#: ../src/ui/theme.c:258
|
||||
msgid "right"
|
||||
msgstr "right"
|
||||
|
||||
#: ../src/ui/theme.c:288
|
||||
#: ../src/ui/theme.c:285
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify \"%s\" dimension"
|
||||
msgstr "frame geometry does not specify \"%s\" dimension"
|
||||
|
||||
#: ../src/ui/theme.c:307
|
||||
#: ../src/ui/theme.c:304
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
msgstr "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:344
|
||||
#: ../src/ui/theme.c:341
|
||||
#, c-format
|
||||
msgid "Button aspect ratio %g is not reasonable"
|
||||
msgstr "Button aspect ratio %g is not reasonable"
|
||||
|
||||
#: ../src/ui/theme.c:356
|
||||
#: ../src/ui/theme.c:353
|
||||
#, c-format
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr "Frame geometry does not specify size of buttons"
|
||||
|
||||
#: ../src/ui/theme.c:1064
|
||||
#: ../src/ui/theme.c:1061
|
||||
#, c-format
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "Gradients should have at least two colors"
|
||||
|
||||
#: ../src/ui/theme.c:1202
|
||||
#: ../src/ui/theme.c:1206
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1222
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||
"_ are valid"
|
||||
msgstr ""
|
||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||
"_ are valid"
|
||||
|
||||
#: ../src/ui/theme.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||
"fit the format"
|
||||
msgstr ""
|
||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||
"fit the format"
|
||||
|
||||
#: ../src/ui/theme.c:1272
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
@ -1110,7 +1142,7 @@ msgstr ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
"where NORMAL is the state; could not parse \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1216
|
||||
#: ../src/ui/theme.c:1286
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
@ -1119,17 +1151,17 @@ msgstr ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1227
|
||||
#: ../src/ui/theme.c:1297
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr "Did not understand state \"%s\" in color specification"
|
||||
|
||||
#: ../src/ui/theme.c:1240
|
||||
#: ../src/ui/theme.c:1310
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr "Did not understand color component \"%s\" in color specification"
|
||||
|
||||
#: ../src/ui/theme.c:1270
|
||||
#: ../src/ui/theme.c:1340
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
@ -1138,49 +1170,44 @@ msgstr ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
"format"
|
||||
|
||||
#: ../src/ui/theme.c:1281
|
||||
#: ../src/ui/theme.c:1351
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr "Could not parse alpha value \"%s\" in blended color"
|
||||
|
||||
#: ../src/ui/theme.c:1291
|
||||
#: ../src/ui/theme.c:1361
|
||||
#, c-format
|
||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
msgstr "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
|
||||
#: ../src/ui/theme.c:1338
|
||||
#: ../src/ui/theme.c:1408
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
msgstr ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
|
||||
#: ../src/ui/theme.c:1349
|
||||
#: ../src/ui/theme.c:1419
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr "Could not parse shade factor \"%s\" in shaded color"
|
||||
|
||||
#: ../src/ui/theme.c:1359
|
||||
#: ../src/ui/theme.c:1429
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr "Shade factor \"%s\" in shaded color is negative"
|
||||
|
||||
#: ../src/ui/theme.c:1388
|
||||
#: ../src/ui/theme.c:1458
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr "Could not parse color \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1481
|
||||
#, c-format
|
||||
msgid "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
msgstr "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
|
||||
#: ../src/ui/theme.c:1713
|
||||
#: ../src/ui/theme.c:1769
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr "Coordinate expression contains character '%s' which is not allowed"
|
||||
|
||||
#: ../src/ui/theme.c:1740
|
||||
#: ../src/ui/theme.c:1796
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
@ -1189,12 +1216,12 @@ msgstr ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
|
||||
#: ../src/ui/theme.c:1754
|
||||
#: ../src/ui/theme.c:1810
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
|
||||
#: ../src/ui/theme.c:1876
|
||||
#: ../src/ui/theme.c:1932
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
@ -1203,41 +1230,41 @@ msgstr ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
"\"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1933
|
||||
#: ../src/ui/theme.c:1989
|
||||
#, c-format
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr "Coordinate expression was empty or not understood"
|
||||
|
||||
#: ../src/ui/theme.c:2044 ../src/ui/theme.c:2054 ../src/ui/theme.c:2088
|
||||
#: ../src/ui/theme.c:2100 ../src/ui/theme.c:2110 ../src/ui/theme.c:2144
|
||||
#, c-format
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr "Coordinate expression results in division by zero"
|
||||
|
||||
#: ../src/ui/theme.c:2096
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
|
||||
#: ../src/ui/theme.c:2152
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
|
||||
#: ../src/ui/theme.c:2208
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
|
||||
#: ../src/ui/theme.c:2161
|
||||
#: ../src/ui/theme.c:2217
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr "Coordinate expression had an operand where an operator was expected"
|
||||
|
||||
#: ../src/ui/theme.c:2169
|
||||
#: ../src/ui/theme.c:2225
|
||||
#, c-format
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr "Coordinate expression ended with an operator instead of an operand"
|
||||
|
||||
#: ../src/ui/theme.c:2179
|
||||
#: ../src/ui/theme.c:2235
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
@ -1246,38 +1273,38 @@ msgstr ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
"operand in between"
|
||||
|
||||
#: ../src/ui/theme.c:2330 ../src/ui/theme.c:2375
|
||||
#: ../src/ui/theme.c:2386 ../src/ui/theme.c:2431
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr "Coordinate expression had unknown variable or constant \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:2429
|
||||
#: ../src/ui/theme.c:2485
|
||||
#, c-format
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr "Coordinate expression parser overflowed its buffer."
|
||||
|
||||
#: ../src/ui/theme.c:2458
|
||||
#: ../src/ui/theme.c:2514
|
||||
#, c-format
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
|
||||
#: ../src/ui/theme.c:2522
|
||||
#: ../src/ui/theme.c:2578
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr ""
|
||||
"Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
|
||||
#: ../src/ui/theme.c:2533
|
||||
#: ../src/ui/theme.c:2589
|
||||
#, c-format
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr "Coordinate expression doesn't seem to have any operators or operands"
|
||||
|
||||
#: ../src/ui/theme.c:2745 ../src/ui/theme.c:2765 ../src/ui/theme.c:2785
|
||||
#: ../src/ui/theme.c:2801 ../src/ui/theme.c:2821 ../src/ui/theme.c:2841
|
||||
#, c-format
|
||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||
msgstr "Theme contained an expression that resulted in an error: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:4482
|
||||
#: ../src/ui/theme.c:4512
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
@ -1286,25 +1313,25 @@ msgstr ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
"specified for this frame style"
|
||||
|
||||
#: ../src/ui/theme.c:5012 ../src/ui/theme.c:5037
|
||||
#: ../src/ui/theme.c:5042 ../src/ui/theme.c:5067
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr ""
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
|
||||
#: ../src/ui/theme.c:5085
|
||||
#: ../src/ui/theme.c:5115
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "Failed to load theme \"%s\": %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:5221 ../src/ui/theme.c:5228 ../src/ui/theme.c:5235
|
||||
#: ../src/ui/theme.c:5242 ../src/ui/theme.c:5249
|
||||
#: ../src/ui/theme.c:5251 ../src/ui/theme.c:5258 ../src/ui/theme.c:5265
|
||||
#: ../src/ui/theme.c:5272 ../src/ui/theme.c:5279
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "No <%s> set for theme \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:5257
|
||||
#: ../src/ui/theme.c:5287
|
||||
#, c-format
|
||||
msgid ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
@ -1313,14 +1340,14 @@ msgstr ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||
|
||||
#: ../src/ui/theme.c:5707 ../src/ui/theme.c:5769 ../src/ui/theme.c:5832
|
||||
#: ../src/ui/theme.c:5737 ../src/ui/theme.c:5799 ../src/ui/theme.c:5862
|
||||
#, c-format
|
||||
msgid ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
|
||||
#: ../src/ui/theme.c:5715 ../src/ui/theme.c:5777 ../src/ui/theme.c:5840
|
||||
#: ../src/ui/theme.c:5745 ../src/ui/theme.c:5807 ../src/ui/theme.c:5870
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Constant \"%s\" has already been defined"
|
||||
@ -1768,92 +1795,92 @@ msgstr "This is a sample message in a sample dialog"
|
||||
msgid "Fake menu item %d\n"
|
||||
msgstr "Fake menu item %d\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:370
|
||||
#: ../src/ui/theme-viewer.c:371
|
||||
msgid "Border-only window"
|
||||
msgstr "Border-only window"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:372
|
||||
#: ../src/ui/theme-viewer.c:373
|
||||
msgid "Bar"
|
||||
msgstr "Bar"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:389
|
||||
#: ../src/ui/theme-viewer.c:390
|
||||
msgid "Normal Application Window"
|
||||
msgstr "Normal Application Window"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:393
|
||||
#: ../src/ui/theme-viewer.c:394
|
||||
msgid "Dialog Box"
|
||||
msgstr "Dialog Box"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:397
|
||||
#: ../src/ui/theme-viewer.c:398
|
||||
msgid "Modal Dialog Box"
|
||||
msgstr "Modal Dialog Box"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:401
|
||||
#: ../src/ui/theme-viewer.c:402
|
||||
msgid "Utility Palette"
|
||||
msgstr "Utility Palette"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:405
|
||||
#: ../src/ui/theme-viewer.c:406
|
||||
msgid "Torn-off Menu"
|
||||
msgstr "Torn-off Menu"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:409
|
||||
#: ../src/ui/theme-viewer.c:410
|
||||
msgid "Border"
|
||||
msgstr "Border"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:413
|
||||
#: ../src/ui/theme-viewer.c:414
|
||||
msgid "Attached Modal Dialog"
|
||||
msgstr "Attached Modal Dialog"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:744
|
||||
#: ../src/ui/theme-viewer.c:747
|
||||
#, c-format
|
||||
msgid "Button layout test %d"
|
||||
msgstr "Button layout test %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:773
|
||||
#: ../src/ui/theme-viewer.c:776
|
||||
#, c-format
|
||||
msgid "%g milliseconds to draw one window frame"
|
||||
msgstr "%g milliseconds to draw one window frame"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:818
|
||||
#: ../src/ui/theme-viewer.c:821
|
||||
#, c-format
|
||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||
msgstr "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:825
|
||||
#: ../src/ui/theme-viewer.c:828
|
||||
#, c-format
|
||||
msgid "Error loading theme: %s\n"
|
||||
msgstr "Error loading theme: %s\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:831
|
||||
#: ../src/ui/theme-viewer.c:834
|
||||
#, c-format
|
||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||
msgstr "Loaded theme \"%s\" in %g seconds\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:875
|
||||
#: ../src/ui/theme-viewer.c:878
|
||||
msgid "Normal Title Font"
|
||||
msgstr "Normal Title Font"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:881
|
||||
#: ../src/ui/theme-viewer.c:884
|
||||
msgid "Small Title Font"
|
||||
msgstr "Small Title Font"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:887
|
||||
#: ../src/ui/theme-viewer.c:890
|
||||
msgid "Large Title Font"
|
||||
msgstr "Large Title Font"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:892
|
||||
#: ../src/ui/theme-viewer.c:895
|
||||
msgid "Button Layouts"
|
||||
msgstr "Button Layouts"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:897
|
||||
#: ../src/ui/theme-viewer.c:900
|
||||
msgid "Benchmark"
|
||||
msgstr "Benchmark"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:949
|
||||
#: ../src/ui/theme-viewer.c:952
|
||||
msgid "Window Title Goes Here"
|
||||
msgstr "Window Title Goes Here"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1055
|
||||
#: ../src/ui/theme-viewer.c:1058
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
|
||||
@ -1864,43 +1891,46 @@ msgstr ""
|
||||
"seconds wall clock time including X server resources (%g milliseconds per "
|
||||
"frame)\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1274
|
||||
#: ../src/ui/theme-viewer.c:1277
|
||||
msgid "position expression test returned TRUE but set error"
|
||||
msgstr "position expression test returned TRUE but set error"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1276
|
||||
#: ../src/ui/theme-viewer.c:1279
|
||||
msgid "position expression test returned FALSE but didn't set error"
|
||||
msgstr "position expression test returned FALSE but didn't set error"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1280
|
||||
#: ../src/ui/theme-viewer.c:1283
|
||||
msgid "Error was expected but none given"
|
||||
msgstr "Error was expected but none given"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1282
|
||||
#: ../src/ui/theme-viewer.c:1285
|
||||
#, c-format
|
||||
msgid "Error %d was expected but %d given"
|
||||
msgstr "Error %d was expected but %d given"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1288
|
||||
#: ../src/ui/theme-viewer.c:1291
|
||||
#, c-format
|
||||
msgid "Error not expected but one was returned: %s"
|
||||
msgstr "Error not expected but one was returned: %s"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1292
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#, c-format
|
||||
msgid "x value was %d, %d was expected"
|
||||
msgstr "x value was %d, %d was expected"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#: ../src/ui/theme-viewer.c:1298
|
||||
#, c-format
|
||||
msgid "y value was %d, %d was expected"
|
||||
msgstr "y value was %d, %d was expected"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1360
|
||||
#: ../src/ui/theme-viewer.c:1363
|
||||
#, c-format
|
||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
msgstr "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
|
||||
#~ msgid "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
#~ msgstr "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
|
||||
#~ msgid "Turn compositing on"
|
||||
#~ msgstr "Turn compositing on"
|
||||
|
||||
|
293
po/lv.po
293
po/lv.po
@ -5,14 +5,15 @@
|
||||
# Peteris Krisjanis <pecisk@inbox.lv>, 2002.
|
||||
# Raivis Dejus <orvils@gmail.com>, 2006, 2007, 2009.
|
||||
# Rudolfs <rudolfs.mazurs@gmail.com>, 2011.
|
||||
# Rūdofls Mazurs <rudolfs.mazurs@gmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: lv\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
|
||||
"cgi?product=mutter&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-03-21 19:31+0000\n"
|
||||
"PO-Revision-Date: 2011-03-26 13:54+0200\n"
|
||||
"Last-Translator: Rudolfs <rudolfs.mazurs@gmail.com>\n"
|
||||
"POT-Creation-Date: 2011-07-08 20:41+0000\n"
|
||||
"PO-Revision-Date: 2011-07-09 22:03+0300\n"
|
||||
"Last-Translator: Rūdofls Mazurs <rudolfs.mazurs@gmail.com>\n"
|
||||
"Language-Team: Latvian <locale@laka.lv>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -21,6 +22,18 @@ msgstr ""
|
||||
"2);\n"
|
||||
"X-Generator: Lokalize 1.1\n"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#: ../src/compositor/compositor.c:509
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
msgstr ""
|
||||
"Cits kompozīcijas pārvaldnieks jau darbojas ekrānā %d displejā \"%s\"."
|
||||
|
||||
#: ../src/core/all-keybindings.h:88
|
||||
msgid "Switch to workspace 1"
|
||||
msgstr "Pārslēgties uz 1. darbvietu"
|
||||
@ -339,13 +352,17 @@ msgstr "Zvana notikums"
|
||||
msgid "Unknown window information request: %d"
|
||||
msgstr "Nezināms logu informācijas pieprasījums: %d"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: ../src/core/delete.c:94
|
||||
#: ../src/core/delete.c:111
|
||||
#, c-format
|
||||
msgid "<tt>%s</tt> is not responding."
|
||||
msgstr "<tt>%s</tt> nereaģē."
|
||||
|
||||
#: ../src/core/delete.c:99
|
||||
#: ../src/core/delete.c:114
|
||||
#| msgid "<tt>%s</tt> is not responding."
|
||||
msgid "Application is not responding."
|
||||
msgstr "Lietotne nereaģē."
|
||||
|
||||
#: ../src/core/delete.c:119
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
@ -353,11 +370,11 @@ msgstr ""
|
||||
"Jūs varat uzgaidīt neilgu brīdi, līdz tā atgūstas, vai arī aizvērt to "
|
||||
"piespiedu kārtā."
|
||||
|
||||
#: ../src/core/delete.c:108
|
||||
#: ../src/core/delete.c:126
|
||||
msgid "_Wait"
|
||||
msgstr "_Gaidīt"
|
||||
|
||||
#: ../src/core/delete.c:108
|
||||
#: ../src/core/delete.c:126
|
||||
msgid "_Force Quit"
|
||||
msgstr "Aizvērt _piespiedu kārtā"
|
||||
|
||||
@ -427,12 +444,12 @@ msgstr "Inicializēt sesiju no saglabātā faila"
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Padarīt X izsaukumus sinhronus"
|
||||
|
||||
#: ../src/core/main.c:506
|
||||
#: ../src/core/main.c:504
|
||||
#, c-format
|
||||
msgid "Failed to scan themes directory: %s\n"
|
||||
msgstr "Neizdevās noskanēt tēmu direktoriju: %s\n"
|
||||
|
||||
#: ../src/core/main.c:522
|
||||
#: ../src/core/main.c:520
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
|
||||
@ -559,12 +576,12 @@ msgstr "Kļūda, iestatot dzīvo slēptā loga statusu: %s\n"
|
||||
msgid "Error setting no tab popup status: %s\n"
|
||||
msgstr "Kļūda, iestatot bez ciļņu uzvednes statusu: %s\n"
|
||||
|
||||
#: ../src/core/screen.c:623
|
||||
#: ../src/core/screen.c:663
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Ekrāna %d displejs \"%s\" ir nederīgs\n"
|
||||
|
||||
#: ../src/core/screen.c:639
|
||||
#: ../src/core/screen.c:679
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
@ -573,70 +590,70 @@ msgstr ""
|
||||
"Ekrāna %d displejam \"%s\" jau ir logu pārvaldnieks; mēģiniet lietot --"
|
||||
"replace iespēju, lai aizvietotu pašreizējo logu pārvaldnieku.\n"
|
||||
|
||||
#: ../src/core/screen.c:666
|
||||
#: ../src/core/screen.c:706
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
msgstr "Neizdevās iegūt logu pārvaldnieka izvēli ekrāna %d displejā \"%s\"\n"
|
||||
|
||||
#: ../src/core/screen.c:721
|
||||
#: ../src/core/screen.c:761
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||
msgstr "Ekrāna %d displejam \"%s\" jau ir logu pārvaldnieks\n"
|
||||
|
||||
#: ../src/core/screen.c:906
|
||||
#: ../src/core/screen.c:946
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Neizdevās atlaist ekrānu %d uz displeja \"%s\"\n"
|
||||
|
||||
#: ../src/core/session.c:837 ../src/core/session.c:844
|
||||
#: ../src/core/session.c:843 ../src/core/session.c:850
|
||||
#, c-format
|
||||
msgid "Could not create directory '%s': %s\n"
|
||||
msgstr "Neizdevās izveidot mapi '%s': %s\n"
|
||||
|
||||
#: ../src/core/session.c:854
|
||||
#: ../src/core/session.c:860
|
||||
#, c-format
|
||||
msgid "Could not open session file '%s' for writing: %s\n"
|
||||
msgstr "Neizdevās atvērt sesijas failu '%s' rakstīšanai: %s\n"
|
||||
|
||||
#: ../src/core/session.c:995
|
||||
#: ../src/core/session.c:1001
|
||||
#, c-format
|
||||
msgid "Error writing session file '%s': %s\n"
|
||||
msgstr "Kļūda, ierakstot sesijas failu '%s': %s\n"
|
||||
|
||||
#: ../src/core/session.c:1000
|
||||
#: ../src/core/session.c:1006
|
||||
#, c-format
|
||||
msgid "Error closing session file '%s': %s\n"
|
||||
msgstr "Kļūda, aizverot sesijas failu '%s': %s\n"
|
||||
|
||||
#: ../src/core/session.c:1130
|
||||
#: ../src/core/session.c:1136
|
||||
#, c-format
|
||||
msgid "Failed to parse saved session file: %s\n"
|
||||
msgstr "Kļūda, parsējot saglabāto sesijas failu: %s\n"
|
||||
|
||||
#: ../src/core/session.c:1179
|
||||
#: ../src/core/session.c:1185
|
||||
#, c-format
|
||||
msgid "<mutter_session> attribute seen but we already have the session ID"
|
||||
msgstr "<mutter_session> atribūts pamanits, bet mums jau ir sesijas ID"
|
||||
|
||||
#: ../src/core/session.c:1192 ../src/core/session.c:1267
|
||||
#: ../src/core/session.c:1299 ../src/core/session.c:1371
|
||||
#: ../src/core/session.c:1431
|
||||
#: ../src/core/session.c:1198 ../src/core/session.c:1273
|
||||
#: ../src/core/session.c:1305 ../src/core/session.c:1377
|
||||
#: ../src/core/session.c:1437
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <%s> element"
|
||||
msgstr "Nezināms atribūts %s <%s> elementam"
|
||||
|
||||
#: ../src/core/session.c:1209
|
||||
#: ../src/core/session.c:1215
|
||||
#, c-format
|
||||
msgid "nested <window> tag"
|
||||
msgstr "ligzdota <window> birka"
|
||||
|
||||
#: ../src/core/session.c:1451
|
||||
#: ../src/core/session.c:1457
|
||||
#, c-format
|
||||
msgid "Unknown element %s"
|
||||
msgstr "Nezināms elements %s"
|
||||
|
||||
#: ../src/core/session.c:1803
|
||||
#: ../src/core/session.c:1809
|
||||
msgid ""
|
||||
"These windows do not support "save current setup" and will have to "
|
||||
"be restarted manually next time you log in."
|
||||
@ -681,13 +698,13 @@ msgid "Window manager error: "
|
||||
msgstr "Logu pārvaldnieka kļūda: "
|
||||
|
||||
#. Translators: This is the title used on dialog boxes
|
||||
#: ../src/core/util.c:615 ../src/mutter.desktop.in.h:1
|
||||
#: ../src/core/util.c:632 ../src/mutter.desktop.in.h:1
|
||||
#: ../src/mutter-wm.desktop.in.h:1
|
||||
msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:6752
|
||||
#: ../src/core/window.c:6903
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@ -703,7 +720,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7415
|
||||
#: ../src/core/window.c:7566
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||
@ -722,11 +739,17 @@ msgstr "Lietotne iestatīja neīstu _NET_WM_PID %lu\n"
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (uz %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1479
|
||||
#: ../src/core/window-props.c:1488
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Nederīgs WM_TRANSIENT_FOR logs 0x%lx norādīts %s.\n"
|
||||
|
||||
#: ../src/core/window-props.c:1500
|
||||
#, c-format
|
||||
#| msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr "WM_TRANSIENT_FOR logs 0x%lx priekš %s veidotu cilpu.\n"
|
||||
|
||||
#: ../src/core/xprops.c:155
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -767,9 +790,6 @@ msgstr ""
|
||||
"atrodas citās darbvietās) uzturēt pie dzīvības."
|
||||
|
||||
#: ../src/mutter.schemas.in.h:3
|
||||
#| msgid ""
|
||||
#| "Determines whether workspace switching should happen for windows on all "
|
||||
#| "monitors or only the primary window."
|
||||
msgid ""
|
||||
"Determines whether workspace switching should happen for windows on all "
|
||||
"monitors or only for windows on the primary monitor."
|
||||
@ -816,47 +836,47 @@ msgstr "Darbvietas tikai uz galvenā"
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Lietojums: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1099
|
||||
#: ../src/ui/frames.c:1280
|
||||
msgid "Close Window"
|
||||
msgstr "Aizvērt logu"
|
||||
|
||||
#: ../src/ui/frames.c:1102
|
||||
#: ../src/ui/frames.c:1283
|
||||
msgid "Window Menu"
|
||||
msgstr "Loga izvēlne"
|
||||
|
||||
#: ../src/ui/frames.c:1105
|
||||
#: ../src/ui/frames.c:1286
|
||||
msgid "Minimize Window"
|
||||
msgstr "Minimizēt logu"
|
||||
|
||||
#: ../src/ui/frames.c:1108
|
||||
#: ../src/ui/frames.c:1289
|
||||
msgid "Maximize Window"
|
||||
msgstr "Maksimizēt logu"
|
||||
|
||||
#: ../src/ui/frames.c:1111
|
||||
#: ../src/ui/frames.c:1292
|
||||
msgid "Restore Window"
|
||||
msgstr "Atjaunot logu"
|
||||
|
||||
#: ../src/ui/frames.c:1114
|
||||
#: ../src/ui/frames.c:1295
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Uzrullēt logu"
|
||||
|
||||
#: ../src/ui/frames.c:1117
|
||||
#: ../src/ui/frames.c:1298
|
||||
msgid "Unroll Window"
|
||||
msgstr "Norullēt logu"
|
||||
|
||||
#: ../src/ui/frames.c:1120
|
||||
#: ../src/ui/frames.c:1301
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Turēt logu virspusē"
|
||||
|
||||
#: ../src/ui/frames.c:1123
|
||||
#: ../src/ui/frames.c:1304
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Aizvākt logu no virspuses"
|
||||
|
||||
#: ../src/ui/frames.c:1126
|
||||
#: ../src/ui/frames.c:1307
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Vienmēr redzamajā darbvietā"
|
||||
|
||||
#: ../src/ui/frames.c:1129
|
||||
#: ../src/ui/frames.c:1310
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Turēt logu tikai vienā darbvietā"
|
||||
|
||||
@ -1059,48 +1079,83 @@ msgstr "Mod5"
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/ui/theme.c:255
|
||||
#: ../src/ui/theme.c:252
|
||||
msgid "top"
|
||||
msgstr "augša"
|
||||
|
||||
#: ../src/ui/theme.c:257
|
||||
#: ../src/ui/theme.c:254
|
||||
msgid "bottom"
|
||||
msgstr "apakša"
|
||||
|
||||
#: ../src/ui/theme.c:259
|
||||
#: ../src/ui/theme.c:256
|
||||
msgid "left"
|
||||
msgstr "pa kreisi"
|
||||
|
||||
#: ../src/ui/theme.c:261
|
||||
#: ../src/ui/theme.c:258
|
||||
msgid "right"
|
||||
msgstr "pa labi"
|
||||
|
||||
#: ../src/ui/theme.c:288
|
||||
#: ../src/ui/theme.c:285
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify \"%s\" dimension"
|
||||
msgstr "rāmja ģeometrija nenosaka \"%s\" dimensiju"
|
||||
|
||||
#: ../src/ui/theme.c:307
|
||||
#: ../src/ui/theme.c:304
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
msgstr "rāmja ģeometrija nenosaka dimensiju \"%s\" robežai \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:344
|
||||
#: ../src/ui/theme.c:341
|
||||
#, c-format
|
||||
msgid "Button aspect ratio %g is not reasonable"
|
||||
msgstr "Pogas samērs %g nav saprātīgs"
|
||||
|
||||
#: ../src/ui/theme.c:356
|
||||
#: ../src/ui/theme.c:353
|
||||
#, c-format
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr "Rāmja ģeometrija nenosaka pogu izmēru"
|
||||
|
||||
#: ../src/ui/theme.c:1064
|
||||
#: ../src/ui/theme.c:1061
|
||||
#, c-format
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "Krāsu pārejās ir jābūt vismaz divām krāsām"
|
||||
|
||||
#: ../src/ui/theme.c:1202
|
||||
#: ../src/ui/theme.c:1206
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "GTK color specification must have a close bracket after the state, e.g. "
|
||||
#| "gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
msgid ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr ""
|
||||
"GTK pielāgotajā krāsu specifikācijā ir jābūt krāsas nosaukumam un atkāpšanās "
|
||||
"ceļam iekavās, piem., gtk:custom(foo,bar); neizdevās parsēt \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1222
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||
"_ are valid"
|
||||
msgstr ""
|
||||
"Nederīga rakstzīme '%c' iekš color_name parameter no gtk:custom, tikai "
|
||||
"A-Za-z0-9-"
|
||||
"_ ir derīgas"
|
||||
|
||||
#: ../src/ui/theme.c:1236
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "Shade format is \"shade/base_color/factor\", \"%s\" does not fit the "
|
||||
#| "format"
|
||||
msgid ""
|
||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||
"fit the format"
|
||||
msgstr ""
|
||||
"Gtk:custom formāts ir \"gtk:custom(color_name,fallback)\", \"%s\" "
|
||||
"neiekļaujas "
|
||||
"formātā"
|
||||
|
||||
#: ../src/ui/theme.c:1272
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
@ -1109,7 +1164,7 @@ msgstr ""
|
||||
"GTK krāsas specifikācijā ir jābūt stāvoklim iekavās, piem., gtk:fg[NORMAL], "
|
||||
"kur NORMAL ir stāvoklis; neizdevās parsēt \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1216
|
||||
#: ../src/ui/theme.c:1286
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
@ -1118,17 +1173,17 @@ msgstr ""
|
||||
"GTK krāsas specifikācijā ir jābūt kvadrātiekavām pēc stāvokļa, piem., gtk:fg"
|
||||
"[NORMAL], kur NORMAL ir stāvoklis; neizdevās parsēt \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1227
|
||||
#: ../src/ui/theme.c:1297
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr "Nesaprotams stāvoklis \"%s\" krāsas specifikācijā"
|
||||
|
||||
#: ../src/ui/theme.c:1240
|
||||
#: ../src/ui/theme.c:1310
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr "Nesaprotams krāsas komponents \"%s\" krāsas specifikācijā"
|
||||
|
||||
#: ../src/ui/theme.c:1270
|
||||
#: ../src/ui/theme.c:1340
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
@ -1137,96 +1192,96 @@ msgstr ""
|
||||
"Saplūšanas formāts ir \"blend/bg_color/fg_color/alpha\", \"%s\" neatbilst "
|
||||
"formātam"
|
||||
|
||||
#: ../src/ui/theme.c:1281
|
||||
#: ../src/ui/theme.c:1351
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr "Neizdevās parsēt alfa vērtību \"%s\" sapludinātajā krāsā"
|
||||
|
||||
#: ../src/ui/theme.c:1291
|
||||
#: ../src/ui/theme.c:1361
|
||||
#, c-format
|
||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
msgstr "Alfa vērtība \"%s\" sapludinātajā krāsā nav starp 0.0 un 1.0"
|
||||
|
||||
#: ../src/ui/theme.c:1338
|
||||
#: ../src/ui/theme.c:1408
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
msgstr ""
|
||||
"Ēnošanas formāts ir \"shade/base_color/factor\", \"%s\" neatbilst formātam"
|
||||
|
||||
#: ../src/ui/theme.c:1349
|
||||
#: ../src/ui/theme.c:1419
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr "Neizdevās parsēt ēnas faktoru \"%s\" ēnotajā krāsā"
|
||||
|
||||
#: ../src/ui/theme.c:1359
|
||||
#: ../src/ui/theme.c:1429
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr "Ēnošanas faktors \"%s\" ēnotajā krāsā ir negatīvs"
|
||||
|
||||
#: ../src/ui/theme.c:1388
|
||||
#: ../src/ui/theme.c:1458
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr "Neizdevās parsēt krāsu \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1646
|
||||
#: ../src/ui/theme.c:1769
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr "Koordinātu izteiksme satur rakstzīmi '%s', kas nav atļauta"
|
||||
|
||||
#: ../src/ui/theme.c:1673
|
||||
#: ../src/ui/theme.c:1796
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
msgstr "Koordinātu izteiksme satur neparsējamu peldošā punkta skaitli '%s'"
|
||||
|
||||
#: ../src/ui/theme.c:1687
|
||||
#: ../src/ui/theme.c:1810
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr "Koordinātu izteiksme satur neparsējamu veselu skaitli '%s'"
|
||||
|
||||
#: ../src/ui/theme.c:1809
|
||||
#: ../src/ui/theme.c:1932
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
"\"%s\""
|
||||
msgstr "Koordinātu izteiksme satur nezināmu operatoru šī teksta sākumā: \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1866
|
||||
#: ../src/ui/theme.c:1989
|
||||
#, c-format
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr "Koordinātu izteiksme bija tukša vai nesaprasta"
|
||||
|
||||
#: ../src/ui/theme.c:1977 ../src/ui/theme.c:1987 ../src/ui/theme.c:2021
|
||||
#: ../src/ui/theme.c:2100 ../src/ui/theme.c:2110 ../src/ui/theme.c:2144
|
||||
#, c-format
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr "Koordinātu izteiksme noved pie dalīšanas ar nulli"
|
||||
|
||||
#: ../src/ui/theme.c:2029
|
||||
#: ../src/ui/theme.c:2152
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr ""
|
||||
"Koordinātu izteiksme mēģina lietot mod operatoru uz peldošā punkta skaitļa"
|
||||
|
||||
#: ../src/ui/theme.c:2085
|
||||
#: ../src/ui/theme.c:2208
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr "Koordinātu izteiksmei ir operators \"%s\", kur tika gaidīts operands"
|
||||
|
||||
#: ../src/ui/theme.c:2094
|
||||
#: ../src/ui/theme.c:2217
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr "Koordinātu izteiksmei bija operands, kur tika gaidīts operators"
|
||||
|
||||
#: ../src/ui/theme.c:2102
|
||||
#: ../src/ui/theme.c:2225
|
||||
#, c-format
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr "Koordinātu izteiksme beidzās ar operatoru, nevis ar operandu"
|
||||
|
||||
#: ../src/ui/theme.c:2112
|
||||
#: ../src/ui/theme.c:2235
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
@ -1235,39 +1290,39 @@ msgstr ""
|
||||
"Koordinātu izteiksmē ir operatoram \"%c\" sekojošais operators \"%c\" bez "
|
||||
"operanda to starpā"
|
||||
|
||||
#: ../src/ui/theme.c:2263 ../src/ui/theme.c:2308
|
||||
#: ../src/ui/theme.c:2386 ../src/ui/theme.c:2431
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr "Koordinātu izteiksmē bija nezināms mainīgais vai konstante \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:2362
|
||||
#: ../src/ui/theme.c:2485
|
||||
#, c-format
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr "Koordinātu izteiksme pārpildīja parsera buferi."
|
||||
|
||||
#: ../src/ui/theme.c:2391
|
||||
#: ../src/ui/theme.c:2514
|
||||
#, c-format
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr ""
|
||||
"Koordinātu izteiksmei bija aizvērtās iekavas bez nevienas atvērtās iekavas"
|
||||
|
||||
#: ../src/ui/theme.c:2455
|
||||
#: ../src/ui/theme.c:2578
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr ""
|
||||
"Koordinātu izteiksmei bija atvērtās iekavas bez nevienas aizvērtās iekavas"
|
||||
|
||||
#: ../src/ui/theme.c:2466
|
||||
#: ../src/ui/theme.c:2589
|
||||
#, c-format
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr "Šķiet, ka koordinātu izteiksmē nav ne operatoru, ne operandu"
|
||||
|
||||
#: ../src/ui/theme.c:2676 ../src/ui/theme.c:2696 ../src/ui/theme.c:2716
|
||||
#: ../src/ui/theme.c:2801 ../src/ui/theme.c:2821 ../src/ui/theme.c:2841
|
||||
#, c-format
|
||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||
msgstr "Tēma saturēja izteiksmi, kas noveda pie kļūdas: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:4410
|
||||
#: ../src/ui/theme.c:4512
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
@ -1276,25 +1331,25 @@ msgstr ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"jebkas\"/> jābūt noteiktam "
|
||||
"šajā rāmja stilā"
|
||||
|
||||
#: ../src/ui/theme.c:4940 ../src/ui/theme.c:4965
|
||||
#: ../src/ui/theme.c:5042 ../src/ui/theme.c:5067
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr ""
|
||||
"Iztrūkst <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"jebkas\"/>"
|
||||
|
||||
#: ../src/ui/theme.c:5013
|
||||
#: ../src/ui/theme.c:5115
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "Neizdevās ielādēt tēmu \"%s\": %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:5149 ../src/ui/theme.c:5156 ../src/ui/theme.c:5163
|
||||
#: ../src/ui/theme.c:5170 ../src/ui/theme.c:5177
|
||||
#: ../src/ui/theme.c:5251 ../src/ui/theme.c:5258 ../src/ui/theme.c:5265
|
||||
#: ../src/ui/theme.c:5272 ../src/ui/theme.c:5279
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "Nav iestatīts <%s> tēmai \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:5185
|
||||
#: ../src/ui/theme.c:5287
|
||||
#, c-format
|
||||
msgid ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
@ -1303,14 +1358,14 @@ msgstr ""
|
||||
"Nav rāmja stila kopas loga tipam \"%s\" tēmā \"%s\"; pievienojiet <window "
|
||||
"type=\"%s\" style_set=\"jebkas\"/> elementu"
|
||||
|
||||
#: ../src/ui/theme.c:5635 ../src/ui/theme.c:5697 ../src/ui/theme.c:5760
|
||||
#: ../src/ui/theme.c:5737 ../src/ui/theme.c:5799 ../src/ui/theme.c:5862
|
||||
#, c-format
|
||||
msgid ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr ""
|
||||
"Lietotāja definētajām konstantēm jāsākas ar lielo burtu; \"%s\" nesākas"
|
||||
|
||||
#: ../src/ui/theme.c:5643 ../src/ui/theme.c:5705 ../src/ui/theme.c:5768
|
||||
#: ../src/ui/theme.c:5745 ../src/ui/theme.c:5807 ../src/ui/theme.c:5870
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Konstante \"%s\" jau tikusi definēta"
|
||||
@ -1758,92 +1813,92 @@ msgstr "Šis ir paraugpaziņojums parauga dialogā"
|
||||
msgid "Fake menu item %d\n"
|
||||
msgstr "Neīsts izvēlnes elements %d\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:370
|
||||
#: ../src/ui/theme-viewer.c:371
|
||||
msgid "Border-only window"
|
||||
msgstr "Logs tikai ar apmali"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:372
|
||||
#: ../src/ui/theme-viewer.c:373
|
||||
msgid "Bar"
|
||||
msgstr "Josla"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:389
|
||||
#: ../src/ui/theme-viewer.c:390
|
||||
msgid "Normal Application Window"
|
||||
msgstr "Normāls lietotnes logs"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:393
|
||||
#: ../src/ui/theme-viewer.c:394
|
||||
msgid "Dialog Box"
|
||||
msgstr "Dialoglodziņš"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:397
|
||||
#: ../src/ui/theme-viewer.c:398
|
||||
msgid "Modal Dialog Box"
|
||||
msgstr "Modālais dialoglodziņš"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:401
|
||||
#: ../src/ui/theme-viewer.c:402
|
||||
msgid "Utility Palette"
|
||||
msgstr "Utilītpalete"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:405
|
||||
#: ../src/ui/theme-viewer.c:406
|
||||
msgid "Torn-off Menu"
|
||||
msgstr "Atrauta izvēlne"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:409
|
||||
#: ../src/ui/theme-viewer.c:410
|
||||
msgid "Border"
|
||||
msgstr "Apmale"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:413
|
||||
#: ../src/ui/theme-viewer.c:414
|
||||
msgid "Attached Modal Dialog"
|
||||
msgstr "Piesaistītais modālais dialogs"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:744
|
||||
#: ../src/ui/theme-viewer.c:747
|
||||
#, c-format
|
||||
msgid "Button layout test %d"
|
||||
msgstr "Pogu izkārtojuma tests %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:773
|
||||
#: ../src/ui/theme-viewer.c:776
|
||||
#, c-format
|
||||
msgid "%g milliseconds to draw one window frame"
|
||||
msgstr "%g milisekundes, lai uzzīmētu loga rāmi"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:818
|
||||
#: ../src/ui/theme-viewer.c:821
|
||||
#, c-format
|
||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||
msgstr "Pielietojums: metacity-theme-viewer [TĒMASNOSAUKUMS]\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:825
|
||||
#: ../src/ui/theme-viewer.c:828
|
||||
#, c-format
|
||||
msgid "Error loading theme: %s\n"
|
||||
msgstr "Kļūda, ielādējot tēmu: %s\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:831
|
||||
#: ../src/ui/theme-viewer.c:834
|
||||
#, c-format
|
||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||
msgstr "Tēma \"%s\" ielādēta \"%g\"sekundēs\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:875
|
||||
#: ../src/ui/theme-viewer.c:878
|
||||
msgid "Normal Title Font"
|
||||
msgstr "Normāls virsraksta fonts"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:881
|
||||
#: ../src/ui/theme-viewer.c:884
|
||||
msgid "Small Title Font"
|
||||
msgstr "Mazs virsraksta fonts"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:887
|
||||
#: ../src/ui/theme-viewer.c:890
|
||||
msgid "Large Title Font"
|
||||
msgstr "Liels virsraksta fonts"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:892
|
||||
#: ../src/ui/theme-viewer.c:895
|
||||
msgid "Button Layouts"
|
||||
msgstr "Pogu izkārtojumi"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:897
|
||||
#: ../src/ui/theme-viewer.c:900
|
||||
msgid "Benchmark"
|
||||
msgstr "Etalonuzdevums"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:949
|
||||
#: ../src/ui/theme-viewer.c:952
|
||||
msgid "Window Title Goes Here"
|
||||
msgstr "Šeit paredzēts loga virsraksts"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1055
|
||||
#: ../src/ui/theme-viewer.c:1058
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
|
||||
@ -1854,39 +1909,39 @@ msgstr ""
|
||||
"g sekundēs pēc ierastā laika, ieskaitot X servera resursus (%g milisekundes "
|
||||
"uz kadru)\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1274
|
||||
#: ../src/ui/theme-viewer.c:1277
|
||||
msgid "position expression test returned TRUE but set error"
|
||||
msgstr "pozīcijas izteiksmes tests atgrieza TRUE, bet ziņoja par kļūdu"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1276
|
||||
#: ../src/ui/theme-viewer.c:1279
|
||||
msgid "position expression test returned FALSE but didn't set error"
|
||||
msgstr "pozīcijas izteiksmes tests atgrieza FALSE, bet nenorādīja kļūdu"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1280
|
||||
#: ../src/ui/theme-viewer.c:1283
|
||||
msgid "Error was expected but none given"
|
||||
msgstr "Tika gaidīta kļūda, taču tā netika dota"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1282
|
||||
#: ../src/ui/theme-viewer.c:1285
|
||||
#, c-format
|
||||
msgid "Error %d was expected but %d given"
|
||||
msgstr "Tika gaidīta kļūda %d, bet saņemta kļūda %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1288
|
||||
#: ../src/ui/theme-viewer.c:1291
|
||||
#, c-format
|
||||
msgid "Error not expected but one was returned: %s"
|
||||
msgstr "Kļūda netika gaidīta, taču tika saņemta: %s"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1292
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#, c-format
|
||||
msgid "x value was %d, %d was expected"
|
||||
msgstr "x vērtība bija %d, tika gaidīta %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#: ../src/ui/theme-viewer.c:1298
|
||||
#, c-format
|
||||
msgid "y value was %d, %d was expected"
|
||||
msgstr "y vērtība bija %d, tika gaidīta %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1360
|
||||
#: ../src/ui/theme-viewer.c:1363
|
||||
#, c-format
|
||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
msgstr "%d koordinātas izteiksme noparsēta %g sekundēs (vidēji %g sekundēs)\n"
|
||||
|
219
po/nb.po
219
po/nb.po
@ -4,10 +4,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter 2.91.x\n"
|
||||
"Project-Id-Version: mutter 3.1.x\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-07-02 00:15+0200\n"
|
||||
"PO-Revision-Date: 2011-07-02 00:16+0200\n"
|
||||
"POT-Creation-Date: 2011-07-18 14:00+0200\n"
|
||||
"PO-Revision-Date: 2011-07-18 14:03+0200\n"
|
||||
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
|
||||
"Language-Team: Norwegian bokmål <i18n-no@lister.ping.uio.no>\n"
|
||||
"Language: \n"
|
||||
@ -388,7 +388,7 @@ msgstr ""
|
||||
#. Displayed when a keybinding which is
|
||||
#. * supposed to launch a program fails.
|
||||
#.
|
||||
#: ../src/core/keybindings.c:2468
|
||||
#: ../src/core/keybindings.c:2523
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running <tt>%s</tt>:\n"
|
||||
@ -399,12 +399,12 @@ msgstr ""
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
#: ../src/core/keybindings.c:2558
|
||||
#: ../src/core/keybindings.c:2613
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "Ingen kommando %d er definert\n"
|
||||
|
||||
#: ../src/core/keybindings.c:3570
|
||||
#: ../src/core/keybindings.c:3625
|
||||
#, c-format
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "Ingen terminalkommando er definert\n"
|
||||
@ -693,7 +693,7 @@ msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:6886
|
||||
#: ../src/core/window.c:6903
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@ -709,7 +709,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7549
|
||||
#: ../src/core/window.c:7566
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
||||
@ -729,11 +729,16 @@ msgstr "Programmet satte en feil _NET_WM_PID %lu\n"
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (på %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1484
|
||||
#: ../src/core/window-props.c:1488
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Ugyldig WM_TRANSIENT_FOR vindu 0x%lx oppgitt for %s.\n"
|
||||
|
||||
#: ../src/core/window-props.c:1500
|
||||
#, c-format
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr "WM_TRANSIENT_FOR vindu 0x%lx for %s ville skapt en løkke.\n"
|
||||
|
||||
#: ../src/core/xprops.c:155
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -821,47 +826,47 @@ msgstr "Arbeidsområder kun på primær skjerm"
|
||||
msgid "Usage: %s\n"
|
||||
msgstr " Bruk: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1280
|
||||
#: ../src/ui/frames.c:1289
|
||||
msgid "Close Window"
|
||||
msgstr "Lukk vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1283
|
||||
#: ../src/ui/frames.c:1292
|
||||
msgid "Window Menu"
|
||||
msgstr "Vindumeny"
|
||||
|
||||
#: ../src/ui/frames.c:1286
|
||||
#: ../src/ui/frames.c:1295
|
||||
msgid "Minimize Window"
|
||||
msgstr "Minimer vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1289
|
||||
#: ../src/ui/frames.c:1298
|
||||
msgid "Maximize Window"
|
||||
msgstr "Maksimer vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1292
|
||||
#: ../src/ui/frames.c:1301
|
||||
msgid "Restore Window"
|
||||
msgstr "Gjenopprett vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1295
|
||||
#: ../src/ui/frames.c:1304
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Rull opp vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1298
|
||||
#: ../src/ui/frames.c:1307
|
||||
msgid "Unroll Window"
|
||||
msgstr "Rull ned vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1301
|
||||
#: ../src/ui/frames.c:1310
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Plasser vindu i forgrunnen"
|
||||
|
||||
#: ../src/ui/frames.c:1304
|
||||
#: ../src/ui/frames.c:1313
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Fjern vindu fra forgrunnen"
|
||||
|
||||
#: ../src/ui/frames.c:1307
|
||||
#: ../src/ui/frames.c:1316
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Alltid på synlig arbeidsområde"
|
||||
|
||||
#: ../src/ui/frames.c:1310
|
||||
#: ../src/ui/frames.c:1319
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Plasser vindu kun på ett arbeidsområde"
|
||||
|
||||
@ -1064,48 +1069,69 @@ msgstr "Mod5"
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/ui/theme.c:255
|
||||
#: ../src/ui/theme.c:252
|
||||
msgid "top"
|
||||
msgstr "topp"
|
||||
|
||||
#: ../src/ui/theme.c:257
|
||||
#: ../src/ui/theme.c:254
|
||||
msgid "bottom"
|
||||
msgstr "bunn"
|
||||
|
||||
#: ../src/ui/theme.c:259
|
||||
#: ../src/ui/theme.c:256
|
||||
msgid "left"
|
||||
msgstr "venstre"
|
||||
|
||||
#: ../src/ui/theme.c:261
|
||||
#: ../src/ui/theme.c:258
|
||||
msgid "right"
|
||||
msgstr "høyre"
|
||||
|
||||
#: ../src/ui/theme.c:288
|
||||
#: ../src/ui/theme.c:285
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify \"%s\" dimension"
|
||||
msgstr "rammegeometrien spesifiserer ikke «%s»-dimensjon"
|
||||
|
||||
#: ../src/ui/theme.c:307
|
||||
#: ../src/ui/theme.c:304
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
msgstr "rammegeometri spesifiserer ikke dimensjon «%s» for kant «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:344
|
||||
#: ../src/ui/theme.c:341
|
||||
#, c-format
|
||||
msgid "Button aspect ratio %g is not reasonable"
|
||||
msgstr "Aspektrate %g for knapp er ikke fornuftig"
|
||||
|
||||
#: ../src/ui/theme.c:356
|
||||
#: ../src/ui/theme.c:353
|
||||
#, c-format
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr "Rammegeometrien spesifiserer ikke størrelse på knapper"
|
||||
|
||||
#: ../src/ui/theme.c:1064
|
||||
#: ../src/ui/theme.c:1061
|
||||
#, c-format
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "Gradienter må ha minst to farger"
|
||||
|
||||
#: ../src/ui/theme.c:1202
|
||||
#: ../src/ui/theme.c:1206
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr "Egendefinert GTK-fargespesifikasjon må ha fargenavn og reserve i parantes, f.eks gtk:custom(foo,bar); kunne ikke lese «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:1222
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||
"_ are valid"
|
||||
msgstr "Ugyldig tegn «%c» i parameter color_name for gtk:custom, kun A-Za-z0-9-_ er gyldig"
|
||||
|
||||
#: ../src/ui/theme.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||
"fit the format"
|
||||
msgstr "Gtk:custom-format er «gtk:custom(color_name,fallback)», «%s» passer ikke i formatet"
|
||||
|
||||
#: ../src/ui/theme.c:1272
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
@ -1114,7 +1140,7 @@ msgstr ""
|
||||
"GTK-fargespesifikasjon må ha tilstand i klammer, f.eks. gtk:fg[NORMAL], hvor "
|
||||
"NORMAL er tilstanden; kunne ikke lese «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:1216
|
||||
#: ../src/ui/theme.c:1286
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
@ -1123,17 +1149,17 @@ msgstr ""
|
||||
"GTK-fargespesifikasjon må ha en avsluttende klamme etter tilstanden, f.eks. "
|
||||
"gtk:fg[NORMAL], hvor NORMAL er tilstanden; kunne ikke lese «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:1227
|
||||
#: ../src/ui/theme.c:1297
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr "Forsto ikke tilstand «%s» i fargespesifikasjonen"
|
||||
|
||||
#: ../src/ui/theme.c:1240
|
||||
#: ../src/ui/theme.c:1310
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr "Forsto ikke fargekomponent «%s» i fargespesifikasjonen"
|
||||
|
||||
#: ../src/ui/theme.c:1270
|
||||
#: ../src/ui/theme.c:1340
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
@ -1142,61 +1168,56 @@ msgstr ""
|
||||
"Blandingsformat er «blend/bg_color/fg_color/alpha», «%s» passer ikke i "
|
||||
"formatet"
|
||||
|
||||
#: ../src/ui/theme.c:1281
|
||||
#: ../src/ui/theme.c:1351
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr "Kunne ikke lese alpha-verdi «%s» i blandet farge"
|
||||
|
||||
#: ../src/ui/theme.c:1291
|
||||
#: ../src/ui/theme.c:1361
|
||||
#, c-format
|
||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
msgstr "Alpha-verdi «%s» i blandet farge er ikke mellom 0.0 og 1.0"
|
||||
|
||||
#: ../src/ui/theme.c:1338
|
||||
#: ../src/ui/theme.c:1408
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
msgstr ""
|
||||
"Skyggeformatet er «shade/base_color/factor», «%s» passer ikke i formatet"
|
||||
|
||||
#: ../src/ui/theme.c:1349
|
||||
#: ../src/ui/theme.c:1419
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr "Kunne ikke lese skyggefaktor «%s» i skyggelagt farge"
|
||||
|
||||
#: ../src/ui/theme.c:1359
|
||||
#: ../src/ui/theme.c:1429
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr "Skyggefaktor «%s» i skyggelagt farge er negativ"
|
||||
|
||||
#: ../src/ui/theme.c:1388
|
||||
#: ../src/ui/theme.c:1458
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr "Kunne ikke lese farge «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:1481
|
||||
#, c-format
|
||||
msgid "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
msgstr "Klarte ikke å hente farge %s[%s] fra GTK+-tema.\n"
|
||||
|
||||
#: ../src/ui/theme.c:1713
|
||||
#: ../src/ui/theme.c:1769
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr "Koordinatuttrykk inneholder tegn «%s» som ikke er tillatt"
|
||||
|
||||
#: ../src/ui/theme.c:1740
|
||||
#: ../src/ui/theme.c:1796
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
msgstr "Koordinatuttrykk inneholder flyttall «%s» som ikke kunne tolkes"
|
||||
|
||||
#: ../src/ui/theme.c:1754
|
||||
#: ../src/ui/theme.c:1810
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr "Koordinatuttrykk inneholder heltall «%s» som ikke kunne tolkes"
|
||||
|
||||
#: ../src/ui/theme.c:1876
|
||||
#: ../src/ui/theme.c:1932
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
@ -1205,39 +1226,39 @@ msgstr ""
|
||||
"Koordinatuttrykket inneholdt en ukjent operator ved begynnelsen av denne "
|
||||
"teksten: «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:1933
|
||||
#: ../src/ui/theme.c:1989
|
||||
#, c-format
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr "Koordinatuttrykket var tomt eller ble ikke forstått"
|
||||
|
||||
#: ../src/ui/theme.c:2044 ../src/ui/theme.c:2054 ../src/ui/theme.c:2088
|
||||
#: ../src/ui/theme.c:2100 ../src/ui/theme.c:2110 ../src/ui/theme.c:2144
|
||||
#, c-format
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr "Koordinatuttrykket resulterer i divisjon med null"
|
||||
|
||||
#: ../src/ui/theme.c:2096
|
||||
#: ../src/ui/theme.c:2152
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr "Koordinatuttrykket prøver å bruke mod-operator på et flyttall"
|
||||
|
||||
#: ../src/ui/theme.c:2152
|
||||
#: ../src/ui/theme.c:2208
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr "Koordinatuttrykket har en operator «%s» hvor en operand var ventet"
|
||||
|
||||
#: ../src/ui/theme.c:2161
|
||||
#: ../src/ui/theme.c:2217
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr "Koordinatuttrykket hadde en operand hvor en operator var ventet"
|
||||
|
||||
#: ../src/ui/theme.c:2169
|
||||
#: ../src/ui/theme.c:2225
|
||||
#, c-format
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr "Koordinatuttrykket sluttet med en operator i stedet for en operand"
|
||||
|
||||
#: ../src/ui/theme.c:2179
|
||||
#: ../src/ui/theme.c:2235
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
@ -1246,38 +1267,38 @@ msgstr ""
|
||||
"Koordinatuttrykket har en operator «%c» etter en operator «%c» og ingen "
|
||||
"operand mellom dem."
|
||||
|
||||
#: ../src/ui/theme.c:2330 ../src/ui/theme.c:2375
|
||||
#: ../src/ui/theme.c:2386 ../src/ui/theme.c:2431
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr "Koordinatuttrykket haddeen ukjent variabel eller konstant «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:2429
|
||||
#: ../src/ui/theme.c:2485
|
||||
#, c-format
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr "Tolkeren for koordinatuttrykk oversteg buffergrensen."
|
||||
|
||||
#: ../src/ui/theme.c:2458
|
||||
#: ../src/ui/theme.c:2514
|
||||
#, c-format
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr "Koordinatuttrykket hadde en parantes slutt uten parantes start"
|
||||
|
||||
#: ../src/ui/theme.c:2522
|
||||
#: ../src/ui/theme.c:2578
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr "Koordinatuttrykket hadde en åpen parantes uten en avsluttende parantes"
|
||||
|
||||
#: ../src/ui/theme.c:2533
|
||||
#: ../src/ui/theme.c:2589
|
||||
#, c-format
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr ""
|
||||
"Koordinatuttrykket ser ikke ut til å ha noen operatorer eller operander"
|
||||
|
||||
#: ../src/ui/theme.c:2745 ../src/ui/theme.c:2765 ../src/ui/theme.c:2785
|
||||
#: ../src/ui/theme.c:2801 ../src/ui/theme.c:2821 ../src/ui/theme.c:2841
|
||||
#, c-format
|
||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||
msgstr "Tema inneholdt et uttrykk som resulterte i en feil: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:4482
|
||||
#: ../src/ui/theme.c:4512
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
@ -1286,25 +1307,25 @@ msgstr ""
|
||||
"<button function=«%s» state=«%s» draw_ops=«ett-eller-annet»/> må "
|
||||
"spesifiseres for denne rammestilen"
|
||||
|
||||
#: ../src/ui/theme.c:5012 ../src/ui/theme.c:5037
|
||||
#: ../src/ui/theme.c:5042 ../src/ui/theme.c:5067
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr ""
|
||||
"Mangler <frame state=«%s» resize=«%s» focus=«%s» stil=«ett-eller-annet»/>"
|
||||
|
||||
#: ../src/ui/theme.c:5085
|
||||
#: ../src/ui/theme.c:5115
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "Klarte ikke å laste tema «%s»: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:5221 ../src/ui/theme.c:5228 ../src/ui/theme.c:5235
|
||||
#: ../src/ui/theme.c:5242 ../src/ui/theme.c:5249
|
||||
#: ../src/ui/theme.c:5251 ../src/ui/theme.c:5258 ../src/ui/theme.c:5265
|
||||
#: ../src/ui/theme.c:5272 ../src/ui/theme.c:5279
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "<%s> er ikke satt for tema «%s»"
|
||||
|
||||
#: ../src/ui/theme.c:5257
|
||||
#: ../src/ui/theme.c:5287
|
||||
#, c-format
|
||||
msgid ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
@ -1313,14 +1334,14 @@ msgstr ""
|
||||
"Ingen rammestil satt for vindutype «%s» i tema «%s», legg til et <window "
|
||||
"type=«%s» style_set=«ett-eller-annet»/>-element"
|
||||
|
||||
#: ../src/ui/theme.c:5707 ../src/ui/theme.c:5769 ../src/ui/theme.c:5832
|
||||
#: ../src/ui/theme.c:5737 ../src/ui/theme.c:5799 ../src/ui/theme.c:5862
|
||||
#, c-format
|
||||
msgid ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr ""
|
||||
"Brukerdefinerte konstanter må begynne med stor bokstav; «%s» gjør ikke det"
|
||||
|
||||
#: ../src/ui/theme.c:5715 ../src/ui/theme.c:5777 ../src/ui/theme.c:5840
|
||||
#: ../src/ui/theme.c:5745 ../src/ui/theme.c:5807 ../src/ui/theme.c:5870
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Konstant «%s» er allerede definert"
|
||||
@ -1771,92 +1792,92 @@ msgstr "Dette er en eksempelbeskjed i en eksempeldialog"
|
||||
msgid "Fake menu item %d\n"
|
||||
msgstr "Falsk menyoppføring %d\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:370
|
||||
#: ../src/ui/theme-viewer.c:371
|
||||
msgid "Border-only window"
|
||||
msgstr "Vindu uten innhold"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:372
|
||||
#: ../src/ui/theme-viewer.c:373
|
||||
msgid "Bar"
|
||||
msgstr "Linje"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:389
|
||||
#: ../src/ui/theme-viewer.c:390
|
||||
msgid "Normal Application Window"
|
||||
msgstr "Normalt programvindu"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:393
|
||||
#: ../src/ui/theme-viewer.c:394
|
||||
msgid "Dialog Box"
|
||||
msgstr "Dialogboks"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:397
|
||||
#: ../src/ui/theme-viewer.c:398
|
||||
msgid "Modal Dialog Box"
|
||||
msgstr "Modal dialogboks"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:401
|
||||
#: ../src/ui/theme-viewer.c:402
|
||||
msgid "Utility Palette"
|
||||
msgstr "Verktøypalett"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:405
|
||||
#: ../src/ui/theme-viewer.c:406
|
||||
msgid "Torn-off Menu"
|
||||
msgstr "Avrevet meny"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:409
|
||||
#: ../src/ui/theme-viewer.c:410
|
||||
msgid "Border"
|
||||
msgstr "Kant"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:413
|
||||
#: ../src/ui/theme-viewer.c:414
|
||||
msgid "Attached Modal Dialog"
|
||||
msgstr "Festet modal dialog"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:744
|
||||
#: ../src/ui/theme-viewer.c:747
|
||||
#, c-format
|
||||
msgid "Button layout test %d"
|
||||
msgstr "Test av knappeplassering %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:773
|
||||
#: ../src/ui/theme-viewer.c:776
|
||||
#, c-format
|
||||
msgid "%g milliseconds to draw one window frame"
|
||||
msgstr "%g millisekunder for å tegne en vindusramme"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:818
|
||||
#: ../src/ui/theme-viewer.c:821
|
||||
#, c-format
|
||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||
msgstr "Bruk: metacity-theme-viewer [TEMANAVN]\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:825
|
||||
#: ../src/ui/theme-viewer.c:828
|
||||
#, c-format
|
||||
msgid "Error loading theme: %s\n"
|
||||
msgstr "Feil under lasting av tema: %s\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:831
|
||||
#: ../src/ui/theme-viewer.c:834
|
||||
#, c-format
|
||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||
msgstr "Lastet tema «%s» på %g sekunder\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:875
|
||||
#: ../src/ui/theme-viewer.c:878
|
||||
msgid "Normal Title Font"
|
||||
msgstr "Normal tittelskrift"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:881
|
||||
#: ../src/ui/theme-viewer.c:884
|
||||
msgid "Small Title Font"
|
||||
msgstr "Liten tittelskrift"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:887
|
||||
#: ../src/ui/theme-viewer.c:890
|
||||
msgid "Large Title Font"
|
||||
msgstr "Stor tittelskrift"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:892
|
||||
#: ../src/ui/theme-viewer.c:895
|
||||
msgid "Button Layouts"
|
||||
msgstr "Knappeplasseringer"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:897
|
||||
#: ../src/ui/theme-viewer.c:900
|
||||
msgid "Benchmark"
|
||||
msgstr "Ytelsestest"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:949
|
||||
#: ../src/ui/theme-viewer.c:952
|
||||
msgid "Window Title Goes Here"
|
||||
msgstr "Vindutittel skal her"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1055
|
||||
#: ../src/ui/theme-viewer.c:1058
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
|
||||
@ -1867,39 +1888,39 @@ msgstr ""
|
||||
"%g sekunder på klokken inklusive ressurser på X-tjener (%g millisekunder per "
|
||||
"ramme)\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1274
|
||||
#: ../src/ui/theme-viewer.c:1277
|
||||
msgid "position expression test returned TRUE but set error"
|
||||
msgstr "test av posisjonsuttrykk returnerte TRUE, men satte en feilkode"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1276
|
||||
#: ../src/ui/theme-viewer.c:1279
|
||||
msgid "position expression test returned FALSE but didn't set error"
|
||||
msgstr "test av posisjonsuttrykk returnerte FALSE, men satte ikke en feilkode"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1280
|
||||
#: ../src/ui/theme-viewer.c:1283
|
||||
msgid "Error was expected but none given"
|
||||
msgstr "Feil var ventet men ingen ble gitt"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1282
|
||||
#: ../src/ui/theme-viewer.c:1285
|
||||
#, c-format
|
||||
msgid "Error %d was expected but %d given"
|
||||
msgstr "Feil %d var ventet men %d ble gitt"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1288
|
||||
#: ../src/ui/theme-viewer.c:1291
|
||||
#, c-format
|
||||
msgid "Error not expected but one was returned: %s"
|
||||
msgstr "Feil ikke ventet men en ble returnert: %s"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1292
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#, c-format
|
||||
msgid "x value was %d, %d was expected"
|
||||
msgstr "x-verdi var %d, %d var ventet"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#: ../src/ui/theme-viewer.c:1298
|
||||
#, c-format
|
||||
msgid "y value was %d, %d was expected"
|
||||
msgstr "y-verdi var %d, %d var ventet"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1360
|
||||
#: ../src/ui/theme-viewer.c:1363
|
||||
#, c-format
|
||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
msgstr "%d koordinatuttrykk lest på %g sekunder (%g sekunder i snitt)\n"
|
||||
|
242
po/sl.po
242
po/sl.po
@ -10,14 +10,14 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-07-02 06:54+0000\n"
|
||||
"PO-Revision-Date: 2011-07-02 20:25+0100\n"
|
||||
"POT-Creation-Date: 2011-07-13 21:26+0000\n"
|
||||
"PO-Revision-Date: 2011-07-14 08:09+0100\n"
|
||||
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
||||
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: \n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
|
||||
"X-Poedit-Language: Slovenian\n"
|
||||
"X-Poedit-Country: SLOVENIA\n"
|
||||
@ -392,7 +392,7 @@ msgstr "Tipko %s s spremenilnikom %x uporablja že nek drug program\n"
|
||||
#. Displayed when a keybinding which is
|
||||
#. * supposed to launch a program fails.
|
||||
#.
|
||||
#: ../src/core/keybindings.c:2468
|
||||
#: ../src/core/keybindings.c:2523
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running <tt>%s</tt>:\n"
|
||||
@ -403,12 +403,12 @@ msgstr ""
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
#: ../src/core/keybindings.c:2558
|
||||
#: ../src/core/keybindings.c:2613
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "Ukaz %d ni bil naveden.\n"
|
||||
|
||||
#: ../src/core/keybindings.c:3570
|
||||
#: ../src/core/keybindings.c:3625
|
||||
#, c-format
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "Ni navedenih ukazov terminala.\n"
|
||||
@ -688,7 +688,7 @@ msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:6886
|
||||
#: ../src/core/window.c:6903
|
||||
#, c-format
|
||||
msgid "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"
|
||||
msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LEADER kot je zavedeno v ICCCM.\n"
|
||||
@ -700,7 +700,7 @@ msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LE
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7549
|
||||
#: ../src/core/window.c:7566
|
||||
#, c-format
|
||||
msgid "Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||
msgstr "Okno %s določi namig MWM, ki pove, da ni mogoče spremeniti velikosti, hkrati pa določi najmanjšo velikost na %d x %d in največjo na %d x %d; vrednost ni smiselna.\n"
|
||||
@ -715,11 +715,16 @@ msgstr "Program je nastavil pokvarjen _NET_WM_PID %lu\n"
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (na %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1484
|
||||
#: ../src/core/window-props.c:1488
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Neveljaven WM_TRANSIENT_FOR za okno 0x%lx naveden za %s.\n"
|
||||
|
||||
#: ../src/core/window-props.c:1500
|
||||
#, c-format
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr "Predmet WM_TRANSIENT_FOR okna 0x%lx za %s lahko ustvari zanko.\n"
|
||||
|
||||
#: ../src/core/xprops.c:155
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -782,51 +787,51 @@ msgstr "Delovne površine le na prvem zaslonu"
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Uporaba: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1280
|
||||
#: ../src/ui/frames.c:1289
|
||||
msgid "Close Window"
|
||||
msgstr "Zapri okno"
|
||||
|
||||
# G:1 K:1 O:0
|
||||
#: ../src/ui/frames.c:1283
|
||||
#: ../src/ui/frames.c:1292
|
||||
msgid "Window Menu"
|
||||
msgstr "Meni okna"
|
||||
|
||||
# G:0 K:1 O:0
|
||||
#: ../src/ui/frames.c:1286
|
||||
#: ../src/ui/frames.c:1295
|
||||
msgid "Minimize Window"
|
||||
msgstr "Skrči okno"
|
||||
|
||||
#: ../src/ui/frames.c:1289
|
||||
#: ../src/ui/frames.c:1298
|
||||
msgid "Maximize Window"
|
||||
msgstr "Razpni okno"
|
||||
|
||||
#: ../src/ui/frames.c:1292
|
||||
#: ../src/ui/frames.c:1301
|
||||
msgid "Restore Window"
|
||||
msgstr "Obnovi okno"
|
||||
|
||||
# G:2 K:0 O:0
|
||||
#: ../src/ui/frames.c:1295
|
||||
#: ../src/ui/frames.c:1304
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Zavij okno"
|
||||
|
||||
#: ../src/ui/frames.c:1298
|
||||
#: ../src/ui/frames.c:1307
|
||||
msgid "Unroll Window"
|
||||
msgstr "Odvij okno"
|
||||
|
||||
#: ../src/ui/frames.c:1301
|
||||
#: ../src/ui/frames.c:1310
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Ohrani okno na vrhu"
|
||||
|
||||
#: ../src/ui/frames.c:1304
|
||||
#: ../src/ui/frames.c:1313
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Odstrani okno z vrha"
|
||||
|
||||
# G:1 K:0 O:0
|
||||
#: ../src/ui/frames.c:1307
|
||||
#: ../src/ui/frames.c:1316
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Vedno na vidni delovni površini"
|
||||
|
||||
#: ../src/ui/frames.c:1310
|
||||
#: ../src/ui/frames.c:1319
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Postavi okno na samo eno delovno površino"
|
||||
|
||||
@ -1048,241 +1053,251 @@ msgstr "Mod5"
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/ui/theme.c:255
|
||||
#: ../src/ui/theme.c:252
|
||||
msgid "top"
|
||||
msgstr "zgoraj"
|
||||
|
||||
# G:12 K:5 O:0
|
||||
#: ../src/ui/theme.c:257
|
||||
#: ../src/ui/theme.c:254
|
||||
msgid "bottom"
|
||||
msgstr "spodaj"
|
||||
|
||||
# G:10 K:4 O:0
|
||||
#: ../src/ui/theme.c:259
|
||||
#: ../src/ui/theme.c:256
|
||||
msgid "left"
|
||||
msgstr "levo"
|
||||
|
||||
# G:1 K:0 O:0
|
||||
#: ../src/ui/theme.c:261
|
||||
#: ../src/ui/theme.c:258
|
||||
msgid "right"
|
||||
msgstr "desno"
|
||||
|
||||
# G:1 K:0 O:0
|
||||
#: ../src/ui/theme.c:288
|
||||
#: ../src/ui/theme.c:285
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify \"%s\" dimension"
|
||||
msgstr "geometrija okvirja ne navaja dimenzije \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:307
|
||||
#: ../src/ui/theme.c:304
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
msgstr "geometrija okvirja ne navaja dimenzije \"%s\" za rob \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:344
|
||||
#: ../src/ui/theme.c:341
|
||||
#, c-format
|
||||
msgid "Button aspect ratio %g is not reasonable"
|
||||
msgstr "Vrednost razmerja gumba %g ni smiselna"
|
||||
|
||||
#: ../src/ui/theme.c:356
|
||||
#: ../src/ui/theme.c:353
|
||||
#, c-format
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr "Geometrija okvirja ne navaja velikosti gumbov"
|
||||
|
||||
#: ../src/ui/theme.c:1064
|
||||
#: ../src/ui/theme.c:1061
|
||||
#, c-format
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "Prelivi bi morali imeti vsaj dve barvi"
|
||||
|
||||
#: ../src/ui/theme.c:1202
|
||||
#: ../src/ui/theme.c:1206
|
||||
#, c-format
|
||||
msgid "GTK custom color specification must have color name and fallback in parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr "Navedba barve GTK mora biti opredeljena z imenom barve in v navednicah povrnjeno barvo , npr. gtk:izbirno(ime_barve,povrnjena_barva); ni mogoče razčleniti \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1222
|
||||
#, c-format
|
||||
msgid "Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-_ are valid"
|
||||
msgstr "Neveljaven znak '%c' v imenu barve gtk:izbirno; dovoljeni znaki so le A-Za-z0-9-_."
|
||||
|
||||
#: ../src/ui/theme.c:1236
|
||||
#, c-format
|
||||
msgid "Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not fit the format"
|
||||
msgstr "Gtk:zapis po meri \"gtk:izbirno(ime_barve,povrnjena_barva)\", \"%s\" ne ustreza pravilni obliki."
|
||||
|
||||
#: ../src/ui/theme.c:1272
|
||||
#, c-format
|
||||
msgid "GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
msgstr "Navedba barve GTK mora vsebovati stanje v oglatih oklepajih, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1216
|
||||
#: ../src/ui/theme.c:1286
|
||||
#, c-format
|
||||
msgid "GTK color specification must have a close bracket after the state, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
msgstr "Navedbi barve GTK manjka oglati zaklepaj za stanjem, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1227
|
||||
#: ../src/ui/theme.c:1297
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr "Ni mogoče razumeti stanja \"%s\" v navedbi barve "
|
||||
|
||||
#: ../src/ui/theme.c:1240
|
||||
#: ../src/ui/theme.c:1310
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr "Ni mogoče razumeti barvne komponente \"%s\" v navedbi barve"
|
||||
|
||||
#: ../src/ui/theme.c:1270
|
||||
#: ../src/ui/theme.c:1340
|
||||
#, c-format
|
||||
msgid "Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the format"
|
||||
msgstr "Oblika zapisa preliva je \"blend/bg_color/fg_color/alpha\", \"%s\" ne ustreza pravilni obliki"
|
||||
|
||||
#: ../src/ui/theme.c:1281
|
||||
#: ../src/ui/theme.c:1351
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr "V prelivni barvi ni mogoče razčleniti vrednosti alfa \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1291
|
||||
#: ../src/ui/theme.c:1361
|
||||
#, c-format
|
||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
msgstr "V prelivni barvi alfa vrednost \"%s\" ni med 0.0 in 1.0"
|
||||
|
||||
#: ../src/ui/theme.c:1338
|
||||
#: ../src/ui/theme.c:1408
|
||||
#, c-format
|
||||
msgid "Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
msgstr "Oblika zapisa barve senčenja je \"shade/base_color/factor\", \"%s\" ne ustreza pravilni obliki."
|
||||
|
||||
#: ../src/ui/theme.c:1349
|
||||
#: ../src/ui/theme.c:1419
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr "Ni mogoče razčleniti vrednosti senčenja \"%s\" v senčeni barvi"
|
||||
|
||||
#: ../src/ui/theme.c:1359
|
||||
#: ../src/ui/theme.c:1429
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr "V senčeni barvi je vrednost senčenja \"%s\" negativna"
|
||||
|
||||
#: ../src/ui/theme.c:1388
|
||||
#: ../src/ui/theme.c:1458
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr "Ni mogoče razčleniti barve \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1481
|
||||
#, c-format
|
||||
msgid "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
msgstr "Pridobivanje barve %s[%s] iz teme GTK+ je spodletelo.\n"
|
||||
|
||||
#: ../src/ui/theme.c:1713
|
||||
#: ../src/ui/theme.c:1769
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr "Izraz koordinat vsebuje znak '%s', ki pa ni dovoljen"
|
||||
|
||||
#: ../src/ui/theme.c:1740
|
||||
#: ../src/ui/theme.c:1796
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains floating point number '%s' which could not be parsed"
|
||||
msgstr "Izraz koordinat vsebuje številko s plavajočo vejico '%s', ki je ni mogoče razčleniti"
|
||||
|
||||
#: ../src/ui/theme.c:1754
|
||||
#: ../src/ui/theme.c:1810
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr "Izraz koordinat vsebuje celo število '%s', ki ga ni mogoče razčleniti"
|
||||
|
||||
#: ../src/ui/theme.c:1876
|
||||
#: ../src/ui/theme.c:1932
|
||||
#, c-format
|
||||
msgid "Coordinate expression contained unknown operator at the start of this text: \"%s\""
|
||||
msgstr "Izraz koordinat vsebuje neznan operator na začetku besedila: \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1933
|
||||
#: ../src/ui/theme.c:1989
|
||||
#, c-format
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr "Izraz koordinat je prazen ali pa ni v razumljivem zapisu"
|
||||
|
||||
#: ../src/ui/theme.c:2044
|
||||
#: ../src/ui/theme.c:2054
|
||||
#: ../src/ui/theme.c:2088
|
||||
#: ../src/ui/theme.c:2100
|
||||
#: ../src/ui/theme.c:2110
|
||||
#: ../src/ui/theme.c:2144
|
||||
#, c-format
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr "Izraz koordinat povzroči deljenje z vrednostjo nič"
|
||||
|
||||
#: ../src/ui/theme.c:2096
|
||||
#: ../src/ui/theme.c:2152
|
||||
#, c-format
|
||||
msgid "Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr "Izraz koordinat poskuša uporabiti operator mod ali številko s plavajočo vejico"
|
||||
|
||||
#: ../src/ui/theme.c:2152
|
||||
#: ../src/ui/theme.c:2208
|
||||
#, c-format
|
||||
msgid "Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr "Izraz koordinat vsebuje operator \"%s\", kjer je pričakovan operand"
|
||||
|
||||
#: ../src/ui/theme.c:2161
|
||||
#: ../src/ui/theme.c:2217
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr "Izraz koordinat vsebuje operand kjer je pričakovan operator"
|
||||
|
||||
#: ../src/ui/theme.c:2169
|
||||
#: ../src/ui/theme.c:2225
|
||||
#, c-format
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr "Izraz koordinat se konča z operatorjem namesto z operandom"
|
||||
|
||||
#: ../src/ui/theme.c:2179
|
||||
#: ../src/ui/theme.c:2235
|
||||
#, c-format
|
||||
msgid "Coordinate expression has operator \"%c\" following operator \"%c\" with no operand in between"
|
||||
msgstr "Izraz koordinat vsebuje operator \"%c\", ki sledi operatorju \"%c\", brez vmesnega operanda"
|
||||
|
||||
#: ../src/ui/theme.c:2330
|
||||
#: ../src/ui/theme.c:2375
|
||||
#: ../src/ui/theme.c:2386
|
||||
#: ../src/ui/theme.c:2431
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr "Izraz koordinat vsebuje neznano spremenljivko ali konstanto \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:2429
|
||||
#: ../src/ui/theme.c:2485
|
||||
#, c-format
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr "Razčlenjevalnik izrazov koordinat je preplavil medpomnilnik."
|
||||
|
||||
#: ../src/ui/theme.c:2458
|
||||
#: ../src/ui/theme.c:2514
|
||||
#, c-format
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr "Izraz koordinat vsebuje zaklepaj, ne pa tudi uklepaja"
|
||||
|
||||
#: ../src/ui/theme.c:2522
|
||||
#: ../src/ui/theme.c:2578
|
||||
#, c-format
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr "Izraz koordinat vsebuje uklepaj, vendar je brez zaklepaja"
|
||||
|
||||
#: ../src/ui/theme.c:2533
|
||||
#: ../src/ui/theme.c:2589
|
||||
#, c-format
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr "Videti je, da izraz koordinat ne vsebuje operatorjev ali operandov"
|
||||
|
||||
#: ../src/ui/theme.c:2745
|
||||
#: ../src/ui/theme.c:2765
|
||||
#: ../src/ui/theme.c:2785
|
||||
#: ../src/ui/theme.c:2801
|
||||
#: ../src/ui/theme.c:2821
|
||||
#: ../src/ui/theme.c:2841
|
||||
#, c-format
|
||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||
msgstr "Tema vsebuje izraz, ki povzroča napako: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:4482
|
||||
#: ../src/ui/theme.c:4512
|
||||
#, c-format
|
||||
msgid "<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be specified for this frame style"
|
||||
msgstr "Za ta slog okvirja mora biti naveden <button function=\"%s\" state=\"%s\" draw_ops=\"karkoli\"/>"
|
||||
|
||||
#: ../src/ui/theme.c:5012
|
||||
#: ../src/ui/theme.c:5037
|
||||
#: ../src/ui/theme.c:5042
|
||||
#: ../src/ui/theme.c:5067
|
||||
#, c-format
|
||||
msgid "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr "Manjka <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"karkoli\"/>"
|
||||
|
||||
#: ../src/ui/theme.c:5085
|
||||
#: ../src/ui/theme.c:5115
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "Napaka med nalaganjem teme \"%s\": %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:5221
|
||||
#: ../src/ui/theme.c:5228
|
||||
#: ../src/ui/theme.c:5235
|
||||
#: ../src/ui/theme.c:5242
|
||||
#: ../src/ui/theme.c:5249
|
||||
#: ../src/ui/theme.c:5251
|
||||
#: ../src/ui/theme.c:5258
|
||||
#: ../src/ui/theme.c:5265
|
||||
#: ../src/ui/theme.c:5272
|
||||
#: ../src/ui/theme.c:5279
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "Ni nastavljena vrednost <%s> za temo \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:5257
|
||||
#: ../src/ui/theme.c:5287
|
||||
#, c-format
|
||||
msgid "No frame style set for window type \"%s\" in theme \"%s\", add a <window type=\"%s\" style_set=\"whatever\"/> element"
|
||||
msgstr "Ni določenega sloga okvirja okna vrste \"%s\" v temi \"%s\". Dodajte predmet <window type=\"%s\" style_set=\"whatever\"/>"
|
||||
|
||||
#: ../src/ui/theme.c:5707
|
||||
#: ../src/ui/theme.c:5769
|
||||
#: ../src/ui/theme.c:5832
|
||||
#: ../src/ui/theme.c:5737
|
||||
#: ../src/ui/theme.c:5799
|
||||
#: ../src/ui/theme.c:5862
|
||||
#, c-format
|
||||
msgid "User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr "Uporabniško določene konstante se morajo začeti z veliko črko; vrednost \"%s\" se ne"
|
||||
|
||||
#: ../src/ui/theme.c:5715
|
||||
#: ../src/ui/theme.c:5777
|
||||
#: ../src/ui/theme.c:5840
|
||||
#: ../src/ui/theme.c:5745
|
||||
#: ../src/ui/theme.c:5807
|
||||
#: ../src/ui/theme.c:5870
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Konstanta \"%s\" je že določena"
|
||||
@ -1724,133 +1739,136 @@ msgstr "To je preizkusno sporočilo v pogovornem oknu"
|
||||
msgid "Fake menu item %d\n"
|
||||
msgstr "Lažni predmet menija %d\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:370
|
||||
#: ../src/ui/theme-viewer.c:371
|
||||
msgid "Border-only window"
|
||||
msgstr "Okno samo z okvirjem"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:372
|
||||
#: ../src/ui/theme-viewer.c:373
|
||||
msgid "Bar"
|
||||
msgstr "Vrstica"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:389
|
||||
#: ../src/ui/theme-viewer.c:390
|
||||
msgid "Normal Application Window"
|
||||
msgstr "Običajno okno programa"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:393
|
||||
#: ../src/ui/theme-viewer.c:394
|
||||
msgid "Dialog Box"
|
||||
msgstr "Pogovorno okno"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:397
|
||||
#: ../src/ui/theme-viewer.c:398
|
||||
msgid "Modal Dialog Box"
|
||||
msgstr "Modalno pogovorno okno"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:401
|
||||
#: ../src/ui/theme-viewer.c:402
|
||||
msgid "Utility Palette"
|
||||
msgstr "Paleta pripomočkov"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:405
|
||||
#: ../src/ui/theme-viewer.c:406
|
||||
msgid "Torn-off Menu"
|
||||
msgstr "Odtrgan meni"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:409
|
||||
#: ../src/ui/theme-viewer.c:410
|
||||
msgid "Border"
|
||||
msgstr "Okvir"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:413
|
||||
#: ../src/ui/theme-viewer.c:414
|
||||
msgid "Attached Modal Dialog"
|
||||
msgstr "Pripeto modalno okno"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:744
|
||||
#: ../src/ui/theme-viewer.c:747
|
||||
#, c-format
|
||||
msgid "Button layout test %d"
|
||||
msgstr "Preizkus razporeditve gumbov %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:773
|
||||
#: ../src/ui/theme-viewer.c:776
|
||||
#, c-format
|
||||
msgid "%g milliseconds to draw one window frame"
|
||||
msgstr "%g milisekund za risanje ene sličice okna"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:818
|
||||
#: ../src/ui/theme-viewer.c:821
|
||||
#, c-format
|
||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||
msgstr "Uporaba: metacity-theme-viewer [IMETEME]\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:825
|
||||
#: ../src/ui/theme-viewer.c:828
|
||||
#, c-format
|
||||
msgid "Error loading theme: %s\n"
|
||||
msgstr "Napaka med nalaganjem teme: %s\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:831
|
||||
#: ../src/ui/theme-viewer.c:834
|
||||
#, c-format
|
||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||
msgstr "Tema \"%s\" naložena v %g sekundah\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:875
|
||||
#: ../src/ui/theme-viewer.c:878
|
||||
msgid "Normal Title Font"
|
||||
msgstr "Običajna pisava naziva"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:881
|
||||
#: ../src/ui/theme-viewer.c:884
|
||||
msgid "Small Title Font"
|
||||
msgstr "Majhna pisava naziva"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:887
|
||||
#: ../src/ui/theme-viewer.c:890
|
||||
msgid "Large Title Font"
|
||||
msgstr "Velika pisava naziva"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:892
|
||||
#: ../src/ui/theme-viewer.c:895
|
||||
msgid "Button Layouts"
|
||||
msgstr "Razpored gumbov"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:897
|
||||
#: ../src/ui/theme-viewer.c:900
|
||||
msgid "Benchmark"
|
||||
msgstr "Meritev"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:949
|
||||
#: ../src/ui/theme-viewer.c:952
|
||||
msgid "Window Title Goes Here"
|
||||
msgstr "Tukaj je izpisan naziv okna"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1055
|
||||
#: ../src/ui/theme-viewer.c:1058
|
||||
#, c-format
|
||||
msgid "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g seconds wall clock time including X server resources (%g milliseconds per frame)\n"
|
||||
msgstr "Izrisanih %d sličic v %g sekundah odjemalca (%g milisekund na sličico) in %g sekund v času stenske ure, upoštevajoč sredstva strežnika X (%g milisekund na sličico)\n"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1274
|
||||
#: ../src/ui/theme-viewer.c:1277
|
||||
msgid "position expression test returned TRUE but set error"
|
||||
msgstr "preizkus izjave položaja je vrnil logični PRAV, vendar je določil tudi napako"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1276
|
||||
#: ../src/ui/theme-viewer.c:1279
|
||||
msgid "position expression test returned FALSE but didn't set error"
|
||||
msgstr "preizkus izjave položaja je vrnil logični NAPAK in ni določil napake"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1280
|
||||
#: ../src/ui/theme-viewer.c:1283
|
||||
msgid "Error was expected but none given"
|
||||
msgstr "Pričakovana je napaka, vendar ni odziva"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1282
|
||||
#: ../src/ui/theme-viewer.c:1285
|
||||
#, c-format
|
||||
msgid "Error %d was expected but %d given"
|
||||
msgstr "Pričakovana je napaka %d, vrnjena pa je bila %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1288
|
||||
#: ../src/ui/theme-viewer.c:1291
|
||||
#, c-format
|
||||
msgid "Error not expected but one was returned: %s"
|
||||
msgstr "Napaka ni pričakovana, vendar je vrnjen odziv: %s"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1292
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#, c-format
|
||||
msgid "x value was %d, %d was expected"
|
||||
msgstr "vrednost x je %d, pričakovana pa je %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1295
|
||||
#: ../src/ui/theme-viewer.c:1298
|
||||
#, c-format
|
||||
msgid "y value was %d, %d was expected"
|
||||
msgstr "vrednost y je %d, pričakovana pa je %d"
|
||||
|
||||
#: ../src/ui/theme-viewer.c:1360
|
||||
#: ../src/ui/theme-viewer.c:1363
|
||||
#, c-format
|
||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\n"
|
||||
|
||||
#~ msgid "Failed to retrieve color %s[%s] from GTK+ theme.\n"
|
||||
#~ msgstr "Pridobivanje barve %s[%s] iz teme GTK+ je spodletelo.\n"
|
||||
|
||||
#~ msgid "Turn compositing on"
|
||||
#~ msgstr "Vključi skladanje"
|
||||
|
||||
|
@ -55,6 +55,8 @@ libmutter_la_SOURCES = \
|
||||
compositor/meta-shadow-factory-private.h \
|
||||
compositor/meta-shaped-texture.c \
|
||||
compositor/meta-shaped-texture.h \
|
||||
compositor/meta-texture-rectangle.c \
|
||||
compositor/meta-texture-rectangle.h \
|
||||
compositor/meta-texture-tower.c \
|
||||
compositor/meta-texture-tower.h \
|
||||
compositor/meta-window-actor.c \
|
||||
@ -75,20 +77,6 @@ libmutter_la_SOURCES = \
|
||||
core/constraints.h \
|
||||
core/core.c \
|
||||
core/delete.c \
|
||||
core/device.c \
|
||||
meta/device.h \
|
||||
core/device-keyboard.c \
|
||||
core/device-keyboard.h \
|
||||
core/device-pointer.c \
|
||||
core/device-pointer.h \
|
||||
core/device-private.h \
|
||||
core/device-map.c \
|
||||
meta/device-map.h \
|
||||
core/device-map-private.h \
|
||||
core/device-map-core.c \
|
||||
core/device-map-core.h \
|
||||
core/devices-core.c \
|
||||
core/devices-core.h \
|
||||
core/display.c \
|
||||
core/display-private.h \
|
||||
meta/display.h \
|
||||
@ -111,8 +99,6 @@ libmutter_la_SOURCES = \
|
||||
meta/group.h \
|
||||
core/iconcache.c \
|
||||
core/iconcache.h \
|
||||
core/input-events.c \
|
||||
core/input-events.h \
|
||||
core/keybindings.c \
|
||||
core/keybindings-private.h \
|
||||
core/main.c \
|
||||
@ -170,14 +156,6 @@ libmutter_la_SOURCES = \
|
||||
ui/preview-widget.c \
|
||||
$(mutter_built_sources)
|
||||
|
||||
if HAVE_XINPUT2
|
||||
libmutter_la_SOURCES += \
|
||||
core/device-map-xi2.c \
|
||||
core/device-map-xi2.h \
|
||||
core/devices-xi2.c \
|
||||
core/devices-xi2.h
|
||||
endif
|
||||
|
||||
libmutter_la_LDFLAGS = -no-undefined
|
||||
libmutter_la_LIBADD = $(MUTTER_LIBS)
|
||||
|
||||
@ -188,8 +166,6 @@ libmutterinclude_base_headers = \
|
||||
meta/common.h \
|
||||
meta/compositor-mutter.h \
|
||||
meta/compositor.h \
|
||||
meta/device.h \
|
||||
meta/device-map.h \
|
||||
meta/display.h \
|
||||
meta/errors.h \
|
||||
meta/gradient.h \
|
||||
|
@ -18,8 +18,6 @@
|
||||
#include "meta-background-actor.h"
|
||||
#include "window-private.h" /* to check window->hidden */
|
||||
#include "display-private.h" /* for meta_display_lookup_x_window() */
|
||||
#include "core.h" /* for meta_core_select_events() */
|
||||
#include "input-events.h"
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
|
||||
@ -180,6 +178,7 @@ get_output_window (MetaScreen *screen)
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
Window output, xroot;
|
||||
XWindowAttributes attr;
|
||||
long event_mask;
|
||||
|
||||
xroot = meta_screen_get_xroot (screen);
|
||||
@ -193,7 +192,13 @@ get_output_window (MetaScreen *screen)
|
||||
KeyPressMask | KeyReleaseMask;
|
||||
|
||||
output = XCompositeGetOverlayWindow (xdisplay, xroot);
|
||||
meta_core_select_events (xdisplay, output, event_mask, TRUE);
|
||||
|
||||
if (XGetWindowAttributes (xdisplay, output, &attr))
|
||||
{
|
||||
event_mask |= attr.your_event_mask;
|
||||
}
|
||||
|
||||
XSelectInput (xdisplay, output, event_mask);
|
||||
|
||||
return output;
|
||||
}
|
||||
@ -359,34 +364,26 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||
* merge the two.
|
||||
*/
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
MetaCompositor *compositor = display->compositor;
|
||||
gboolean pointer_grabbed = FALSE;
|
||||
gboolean keyboard_grabbed = FALSE;
|
||||
gboolean result;
|
||||
MetaDevice *device;
|
||||
MetaGrabInfo *grab_info;
|
||||
int result;
|
||||
|
||||
/* FIXME: need a real device here, and probably
|
||||
* some exclusion mode for other devices */
|
||||
device = meta_device_map_lookup (display->device_map,
|
||||
META_CORE_POINTER_ID);
|
||||
|
||||
grab_info = meta_display_get_grab_info (display, device);
|
||||
|
||||
if (compositor->modal_plugin != NULL || grab_info != NULL)
|
||||
if (compositor->modal_plugin != NULL || display->grab_op != META_GRAB_OP_NONE)
|
||||
return FALSE;
|
||||
|
||||
if ((options & META_MODAL_POINTER_ALREADY_GRABBED) == 0)
|
||||
{
|
||||
result = meta_device_grab (device,
|
||||
grab_window,
|
||||
(ButtonPressMask | ButtonReleaseMask |
|
||||
EnterWindowMask | LeaveWindowMask | PointerMotionMask),
|
||||
cursor,
|
||||
FALSE,
|
||||
FALSE,
|
||||
timestamp);
|
||||
if (!result)
|
||||
result = XGrabPointer (xdpy, grab_window,
|
||||
False, /* owner_events */
|
||||
(ButtonPressMask | ButtonReleaseMask |
|
||||
EnterWindowMask | LeaveWindowMask | PointerMotionMask),
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
None, /* confine to */
|
||||
cursor,
|
||||
timestamp);
|
||||
if (result != Success)
|
||||
goto fail;
|
||||
|
||||
pointer_grabbed = TRUE;
|
||||
@ -394,25 +391,22 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||
|
||||
if ((options & META_MODAL_KEYBOARD_ALREADY_GRABBED) == 0)
|
||||
{
|
||||
result = meta_device_grab (meta_device_get_paired_device (device),
|
||||
grab_window,
|
||||
(KeyPressMask | KeyReleaseMask),
|
||||
META_CURSOR_DEFAULT,
|
||||
FALSE, FALSE,
|
||||
timestamp);
|
||||
if (!result)
|
||||
result = XGrabKeyboard (xdpy, grab_window,
|
||||
False, /* owner_events */
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
timestamp);
|
||||
|
||||
if (result != Success)
|
||||
goto fail;
|
||||
|
||||
keyboard_grabbed = TRUE;
|
||||
}
|
||||
|
||||
grab_info = meta_display_create_grab_info (display, device);
|
||||
|
||||
grab_info->grab_op = META_GRAB_OP_COMPOSITOR;
|
||||
grab_info->grab_window = NULL;
|
||||
grab_info->grab_screen = screen;
|
||||
grab_info->grab_have_pointer = TRUE;
|
||||
grab_info->grab_have_keyboard = TRUE;
|
||||
display->grab_op = META_GRAB_OP_COMPOSITOR;
|
||||
display->grab_window = NULL;
|
||||
display->grab_screen = screen;
|
||||
display->grab_have_pointer = TRUE;
|
||||
display->grab_have_keyboard = TRUE;
|
||||
|
||||
compositor->modal_plugin = plugin;
|
||||
|
||||
@ -420,9 +414,9 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||
|
||||
fail:
|
||||
if (pointer_grabbed)
|
||||
meta_device_ungrab (device, timestamp);
|
||||
XUngrabPointer (xdpy, timestamp);
|
||||
if (keyboard_grabbed)
|
||||
meta_device_ungrab (meta_device_get_paired_device (device), timestamp);
|
||||
XUngrabKeyboard (xdpy, timestamp);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -433,19 +427,20 @@ meta_end_modal_for_plugin (MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
MetaCompositor *compositor = display->compositor;
|
||||
MetaDevice *device;
|
||||
|
||||
g_return_if_fail (compositor->modal_plugin == plugin);
|
||||
|
||||
/* FIXME: need a real device here */
|
||||
device = meta_device_map_lookup (display->device_map,
|
||||
META_CORE_POINTER_ID);
|
||||
XUngrabPointer (xdpy, timestamp);
|
||||
XUngrabKeyboard (xdpy, timestamp);
|
||||
|
||||
meta_device_ungrab (device, timestamp);
|
||||
meta_device_ungrab (meta_device_get_paired_device (device), timestamp);
|
||||
display->grab_op = META_GRAB_OP_NONE;
|
||||
display->grab_window = NULL;
|
||||
display->grab_screen = NULL;
|
||||
display->grab_have_pointer = FALSE;
|
||||
display->grab_have_keyboard = FALSE;
|
||||
|
||||
meta_display_remove_grab_info (display, device);
|
||||
compositor->modal_plugin = NULL;
|
||||
}
|
||||
|
||||
@ -478,6 +473,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
Window xroot = meta_screen_get_xroot (screen);
|
||||
Window xwin;
|
||||
gint width, height;
|
||||
XWindowAttributes attr;
|
||||
long event_mask;
|
||||
guint n_retries;
|
||||
guint max_retries;
|
||||
@ -552,7 +548,12 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
KeyPressMask | KeyReleaseMask |
|
||||
StructureNotifyMask;
|
||||
|
||||
meta_core_select_events (xdisplay, xwin, event_mask, TRUE);
|
||||
if (XGetWindowAttributes (xdisplay, xwin, &attr))
|
||||
{
|
||||
event_mask |= attr.your_event_mask;
|
||||
}
|
||||
|
||||
XSelectInput (xdisplay, xwin, event_mask);
|
||||
|
||||
info->window_group = meta_window_group_new (screen);
|
||||
info->background_actor = meta_background_actor_new (screen);
|
||||
@ -657,15 +658,9 @@ meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_grabbed_event (MetaDisplay *display,
|
||||
XEvent *event)
|
||||
is_grabbed_event (XEvent *event)
|
||||
{
|
||||
guint evtype;
|
||||
|
||||
if (!meta_input_event_get_type (display, event, &evtype))
|
||||
return FALSE;
|
||||
|
||||
switch (evtype)
|
||||
switch (event->xany.type)
|
||||
{
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
@ -688,8 +683,7 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window)
|
||||
{
|
||||
if (compositor->modal_plugin &&
|
||||
is_grabbed_event (compositor->display, event))
|
||||
if (compositor->modal_plugin && is_grabbed_event (event))
|
||||
{
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (compositor->modal_plugin);
|
||||
|
||||
|
@ -233,7 +233,6 @@ meta_background_actor_paint (ClutterActor *actor)
|
||||
}
|
||||
}
|
||||
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
static gboolean
|
||||
meta_background_actor_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
@ -248,7 +247,6 @@ meta_background_actor_get_paint_volume (ClutterActor *actor,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
meta_background_actor_class_init (MetaBackgroundActorClass *klass)
|
||||
@ -261,9 +259,7 @@ meta_background_actor_class_init (MetaBackgroundActorClass *klass)
|
||||
actor_class->get_preferred_width = meta_background_actor_get_preferred_width;
|
||||
actor_class->get_preferred_height = meta_background_actor_get_preferred_height;
|
||||
actor_class->paint = meta_background_actor_paint;
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "meta-shaped-texture.h"
|
||||
#include "meta-texture-tower.h"
|
||||
#include "meta-texture-rectangle.h"
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <cogl/cogl.h>
|
||||
@ -49,13 +50,8 @@ static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
||||
|
||||
static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex);
|
||||
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||
CLUTTER_GLX_TYPE_TEXTURE_PIXMAP);
|
||||
#else /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||
CLUTTER_X11_TYPE_TEXTURE_PIXMAP);
|
||||
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||
|
||||
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
||||
@ -181,17 +177,6 @@ meta_shaped_texture_dirty_mask (MetaShapedTexture *stex)
|
||||
|
||||
if (priv->mask_texture != COGL_INVALID_HANDLE)
|
||||
{
|
||||
GLuint mask_gl_tex;
|
||||
GLenum mask_gl_target;
|
||||
|
||||
cogl_texture_get_gl_texture (priv->mask_texture,
|
||||
&mask_gl_tex, &mask_gl_target);
|
||||
|
||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
||||
if (mask_gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
glDeleteTextures (1, &mask_gl_tex);
|
||||
#endif
|
||||
|
||||
cogl_handle_unref (priv->mask_texture);
|
||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||
|
||||
@ -258,24 +243,18 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
||||
if (paint_gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
{
|
||||
GLuint tex;
|
||||
|
||||
glGenTextures (1, &tex);
|
||||
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, tex_width);
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
|
||||
glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0);
|
||||
glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
|
||||
GL_ALPHA, tex_width, tex_height,
|
||||
0, GL_ALPHA, GL_UNSIGNED_BYTE, mask_data);
|
||||
|
||||
priv->mask_texture
|
||||
= cogl_texture_new_from_foreign (tex,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
tex_width, tex_height,
|
||||
0, 0,
|
||||
COGL_PIXEL_FORMAT_A_8);
|
||||
= meta_texture_rectangle_new (tex_width, tex_height,
|
||||
0, /* flags */
|
||||
/* data format */
|
||||
COGL_PIXEL_FORMAT_A_8,
|
||||
/* internal GL format */
|
||||
GL_ALPHA,
|
||||
/* internal cogl format */
|
||||
COGL_PIXEL_FORMAT_A_8,
|
||||
/* rowstride */
|
||||
tex_width,
|
||||
mask_data);
|
||||
}
|
||||
else
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
|
@ -29,11 +29,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
#include <clutter/glx/clutter-glx.h>
|
||||
#else
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -50,20 +46,12 @@ typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate;
|
||||
|
||||
struct _MetaShapedTextureClass
|
||||
{
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
ClutterGLXTexturePixmapClass parent_class;
|
||||
#else
|
||||
ClutterX11TexturePixmapClass parent_class;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct _MetaShapedTexture
|
||||
{
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
ClutterGLXTexturePixmap parent;
|
||||
#else
|
||||
ClutterX11TexturePixmap parent;
|
||||
#endif
|
||||
|
||||
MetaShapedTexturePrivate *priv;
|
||||
};
|
||||
|
118
src/compositor/meta-texture-rectangle.c
Normal file
118
src/compositor/meta-texture-rectangle.c
Normal file
@ -0,0 +1,118 @@
|
||||
/*
|
||||
* texture rectangle
|
||||
*
|
||||
* A small utility function to help create a rectangle texture
|
||||
*
|
||||
* Authored By Neil Roberts <neil@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2011 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "meta-texture-rectangle.h"
|
||||
|
||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
||||
|
||||
static void (* pf_glGetIntegerv) (GLenum pname, GLint *params);
|
||||
static void (* pf_glTexImage2D) (GLenum target, GLint level,
|
||||
GLint internalFormat,
|
||||
GLsizei width, GLsizei height,
|
||||
GLint border, GLenum format, GLenum type,
|
||||
const GLvoid *pixels);
|
||||
static void (* pf_glGenTextures) (GLsizei n, GLuint *textures);
|
||||
static void (* pf_glDeleteTextures) (GLsizei n, const GLuint *texture);
|
||||
static void (* pf_glBindTexture) (GLenum target, GLuint texture);
|
||||
|
||||
static void
|
||||
rectangle_texture_destroy_cb (void *user_data)
|
||||
{
|
||||
GLuint tex = GPOINTER_TO_UINT (user_data);
|
||||
|
||||
pf_glDeleteTextures (1, &tex);
|
||||
}
|
||||
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
|
||||
CoglHandle
|
||||
meta_texture_rectangle_new (unsigned int width,
|
||||
unsigned int height,
|
||||
CoglTextureFlags flags,
|
||||
CoglPixelFormat format,
|
||||
GLenum internal_gl_format,
|
||||
GLenum internal_format,
|
||||
unsigned int rowstride,
|
||||
const guint8 *data)
|
||||
{
|
||||
CoglHandle cogl_tex = COGL_INVALID_HANDLE;
|
||||
|
||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
||||
|
||||
static CoglUserDataKey user_data_key;
|
||||
GLint old_binding;
|
||||
GLuint tex;
|
||||
|
||||
if (pf_glGenTextures == NULL)
|
||||
{
|
||||
pf_glGetIntegerv = (void *) cogl_get_proc_address ("glGetIntegerv");
|
||||
pf_glTexImage2D = (void *) cogl_get_proc_address ("glTexImage2D");
|
||||
pf_glGenTextures = (void *) cogl_get_proc_address ("glGenTextures");
|
||||
pf_glDeleteTextures = (void *) cogl_get_proc_address ("glDeleteTextures");
|
||||
pf_glBindTexture = (void *) cogl_get_proc_address ("glBindTexture");
|
||||
}
|
||||
|
||||
pf_glGenTextures (1, &tex);
|
||||
pf_glGetIntegerv (GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding);
|
||||
pf_glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
|
||||
pf_glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
|
||||
internal_gl_format, width, height,
|
||||
0, internal_gl_format,
|
||||
GL_UNSIGNED_BYTE, NULL);
|
||||
pf_glBindTexture (GL_TEXTURE_RECTANGLE_ARB, old_binding);
|
||||
|
||||
cogl_tex = cogl_texture_new_from_foreign (tex,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
width, height,
|
||||
0, 0, /* no waste */
|
||||
internal_format);
|
||||
|
||||
/* Cogl won't destroy the GL texture when a foreign texture is used
|
||||
so we need to destroy it manually. We can set a destroy
|
||||
notification callback to do this transparently */
|
||||
cogl_object_set_user_data (cogl_tex,
|
||||
&user_data_key,
|
||||
GUINT_TO_POINTER (tex),
|
||||
rectangle_texture_destroy_cb);
|
||||
|
||||
/* Use cogl_texture_set_region instead of uploading the data
|
||||
directly with GL calls so that we can let Cogl deal with setting
|
||||
the pixel store parameters and handling format conversion */
|
||||
if (data)
|
||||
cogl_texture_set_region (cogl_tex,
|
||||
0, 0, /* src x/y */
|
||||
0, 0, /* dst x/y */
|
||||
width, height, /* dst width/height */
|
||||
width, height, /* src width/height */
|
||||
format,
|
||||
rowstride,
|
||||
data);
|
||||
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
|
||||
return cogl_tex;
|
||||
}
|
45
src/compositor/meta-texture-rectangle.h
Normal file
45
src/compositor/meta-texture-rectangle.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* texture rectangle
|
||||
*
|
||||
* A small utility function to help create a rectangle texture
|
||||
*
|
||||
* Authored By Neil Roberts <neil@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2011 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __META_TEXTURE_RECTANGLE_H__
|
||||
#define __META_TEXTURE_RECTANGLE_H__
|
||||
|
||||
#include <cogl/cogl.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CoglHandle
|
||||
meta_texture_rectangle_new (unsigned int width,
|
||||
unsigned int height,
|
||||
CoglTextureFlags flags,
|
||||
CoglPixelFormat format,
|
||||
GLenum internal_gl_format,
|
||||
GLenum internal_format,
|
||||
unsigned int rowstride,
|
||||
const guint8 *data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __META_TEXTURE_RECTANGLE_H__ */
|
@ -26,6 +26,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "meta-texture-tower.h"
|
||||
#include "meta-texture-rectangle.h"
|
||||
|
||||
#ifndef M_LOG2E
|
||||
#define M_LOG2E 1.4426950408889634074
|
||||
@ -109,22 +110,6 @@ texture_is_rectangle (CoglHandle texture)
|
||||
}
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
|
||||
static void
|
||||
free_texture (CoglHandle texture)
|
||||
{
|
||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
||||
GLuint gl_tex;
|
||||
GLenum gl_target;
|
||||
|
||||
cogl_texture_get_gl_texture (texture, &gl_tex, &gl_target);
|
||||
|
||||
if (gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
glDeleteTextures (1, &gl_tex);
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
|
||||
cogl_handle_unref (texture);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_texture_tower_update_area:
|
||||
* @tower: a MetaTextureTower
|
||||
@ -152,7 +137,7 @@ meta_texture_tower_set_base_texture (MetaTextureTower *tower,
|
||||
{
|
||||
if (tower->textures[i] != COGL_INVALID_HANDLE)
|
||||
{
|
||||
free_texture (tower->textures[i]);
|
||||
cogl_handle_unref (tower->textures[i]);
|
||||
tower->textures[i] = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
@ -384,23 +369,18 @@ texture_tower_create_texture (MetaTextureTower *tower,
|
||||
if ((!is_power_of_two (width) || !is_power_of_two (height)) &&
|
||||
texture_is_rectangle (tower->textures[level - 1]))
|
||||
{
|
||||
GLuint tex = 0;
|
||||
|
||||
glGenTextures (1, &tex);
|
||||
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
|
||||
glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
|
||||
GL_RGBA, width,height,
|
||||
#if TEXTURE_FORMAT == COGL_PIXEL_FORMAT_BGRA_8888_PRE
|
||||
0, GL_BGRA, GL_UNSIGNED_BYTE,
|
||||
#else /* assume big endian */
|
||||
0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
#endif
|
||||
NULL);
|
||||
|
||||
tower->textures[level] = cogl_texture_new_from_foreign (tex, GL_TEXTURE_RECTANGLE_ARB,
|
||||
width, height,
|
||||
0, 0,
|
||||
TEXTURE_FORMAT);
|
||||
tower->textures[level] =
|
||||
meta_texture_rectangle_new (width, height,
|
||||
0, /* flags */
|
||||
/* data format */
|
||||
TEXTURE_FORMAT,
|
||||
/* internal GL format */
|
||||
GL_RGBA,
|
||||
/* internal cogl format */
|
||||
TEXTURE_FORMAT,
|
||||
/* rowstride */
|
||||
width * 4,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
@ -430,12 +410,7 @@ texture_tower_revalidate_fbo (MetaTextureTower *tower,
|
||||
CoglMatrix modelview;
|
||||
|
||||
if (tower->fbos[level] == COGL_INVALID_HANDLE)
|
||||
{
|
||||
/* Work around http://bugzilla.openedhand.com/show_bug.cgi?id=2110 */
|
||||
cogl_flush();
|
||||
|
||||
tower->fbos[level] = cogl_offscreen_new_to_texture (dest_texture);
|
||||
}
|
||||
tower->fbos[level] = cogl_offscreen_new_to_texture (dest_texture);
|
||||
|
||||
if (tower->fbos[level] == COGL_INVALID_HANDLE)
|
||||
return FALSE;
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include <X11/extensions/Xrender.h>
|
||||
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||
#include <gdk/gdk.h> /* for gdk_rectangle_union() */
|
||||
|
||||
#include <meta/display.h>
|
||||
@ -142,10 +144,10 @@ static void meta_window_actor_get_property (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void meta_window_actor_paint (ClutterActor *actor);
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
|
||||
static gboolean meta_window_actor_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume);
|
||||
#endif
|
||||
|
||||
|
||||
static void meta_window_actor_detach (MetaWindowActor *self);
|
||||
static gboolean meta_window_actor_has_shadow (MetaWindowActor *self);
|
||||
@ -220,9 +222,7 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
||||
object_class->constructed = meta_window_actor_constructed;
|
||||
|
||||
actor_class->paint = meta_window_actor_paint;
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
actor_class->get_paint_volume = meta_window_actor_get_paint_volume;
|
||||
#endif
|
||||
|
||||
pspec = g_param_spec_object ("meta-window",
|
||||
"MetaWindow",
|
||||
@ -679,7 +679,6 @@ meta_window_actor_get_shape_bounds (MetaWindowActor *self,
|
||||
bounds->x = bounds->y = bounds->width = bounds->height = 0;
|
||||
}
|
||||
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
static void
|
||||
meta_window_actor_get_shadow_bounds (MetaWindowActor *self,
|
||||
gboolean appears_focused,
|
||||
@ -700,7 +699,6 @@ meta_window_actor_get_shadow_bounds (MetaWindowActor *self,
|
||||
shape_bounds.height,
|
||||
bounds);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If we have an ARGB32 window that we decorate with a frame, it's
|
||||
* probably something like a translucent terminal - something where
|
||||
@ -769,7 +767,6 @@ meta_window_actor_paint (ClutterActor *actor)
|
||||
CLUTTER_ACTOR_CLASS (meta_window_actor_parent_class)->paint (actor);
|
||||
}
|
||||
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
static gboolean
|
||||
meta_window_actor_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
@ -811,7 +808,6 @@ meta_window_actor_get_paint_volume (ClutterActor *actor,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* CLUTTER_CHECK_VERSION */
|
||||
|
||||
static gboolean
|
||||
is_shaped (MetaDisplay *display, Window xwindow)
|
||||
@ -1774,7 +1770,7 @@ dump_region (cairo_region_t *region)
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
cairo_region_get_rectangle (region, &rect);
|
||||
cairo_region_get_rectangle (region, i, &rect);
|
||||
g_print ("+%d+%dx%dx%d ",
|
||||
rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
@ -1875,6 +1871,19 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
||||
meta_window_actor_clear_shadow_clip (self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
texture_pixmap_using_extension (ClutterX11TexturePixmap *texture)
|
||||
{
|
||||
ClutterTexture *self = CLUTTER_TEXTURE (texture);
|
||||
CoglHandle handle;
|
||||
|
||||
handle = clutter_texture_get_cogl_texture (self);
|
||||
|
||||
return handle != NULL &&
|
||||
cogl_is_texture_pixmap_x11 (handle) &&
|
||||
cogl_texture_pixmap_x11_is_using_tfp_extension (handle);
|
||||
}
|
||||
|
||||
static void
|
||||
check_needs_pixmap (MetaWindowActor *self)
|
||||
{
|
||||
@ -1945,11 +1954,8 @@ check_needs_pixmap (MetaWindowActor *self)
|
||||
* do it here.
|
||||
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
|
||||
*/
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
if (G_UNLIKELY (!clutter_glx_texture_pixmap_using_extension (
|
||||
CLUTTER_GLX_TEXTURE_PIXMAP (priv->actor))))
|
||||
if (G_UNLIKELY (!texture_pixmap_using_extension (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor))))
|
||||
g_warning ("NOTE: Not using GLX TFP!\n");
|
||||
#endif
|
||||
|
||||
g_object_get (priv->actor,
|
||||
"pixmap-width", &pxm_width,
|
||||
|
@ -103,11 +103,9 @@ actor_is_untransformed (ClutterActor *actor,
|
||||
static void
|
||||
meta_window_group_paint (ClutterActor *actor)
|
||||
{
|
||||
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
|
||||
cairo_region_t *visible_region;
|
||||
GLboolean scissor_test;
|
||||
cairo_rectangle_int_t screen_rect = { 0 };
|
||||
cairo_rectangle_int_t scissor_rect;
|
||||
ClutterActor *stage;
|
||||
cairo_rectangle_int_t visible_rect;
|
||||
GList *children, *l;
|
||||
|
||||
/* We walk the list from top to bottom (opposite of painting order),
|
||||
@ -117,39 +115,17 @@ meta_window_group_paint (ClutterActor *actor)
|
||||
children = clutter_container_get_children (CLUTTER_CONTAINER (actor));
|
||||
children = g_list_reverse (children);
|
||||
|
||||
/* Start off with the full screen area (for a multihead setup, we
|
||||
* might want to use a more accurate union of the monitors to avoid
|
||||
* painting in holes from mismatched monitor sizes. That's just an
|
||||
* optimization, however.)
|
||||
*/
|
||||
meta_screen_get_size (window_group->screen, &screen_rect.width, &screen_rect.height);
|
||||
/* Get the clipped redraw bounds from Clutter so that we can avoid
|
||||
* painting shadows on windows that don't need to be painted in this
|
||||
* frame. In the case of a multihead setup with mismatched monitor
|
||||
* sizes, we could intersect this with an accurate union of the
|
||||
* monitors to avoid painting shadows that are visible only in the
|
||||
* holes. */
|
||||
stage = clutter_actor_get_stage (actor);
|
||||
clutter_stage_get_redraw_clip_bounds (CLUTTER_STAGE (stage),
|
||||
&visible_rect);
|
||||
|
||||
/* When doing a partial stage paint, Clutter will set the GL scissor
|
||||
* box to the clip rectangle for the partial repaint. We combine the screen
|
||||
* rectangle with the scissor box to get the region we need to
|
||||
* paint. (Strangely, the scissor box sometimes seems to be bigger
|
||||
* than the stage ... Clutter should probably be clampimg)
|
||||
*/
|
||||
glGetBooleanv (GL_SCISSOR_TEST, &scissor_test);
|
||||
|
||||
if (scissor_test)
|
||||
{
|
||||
GLint scissor_box[4];
|
||||
glGetIntegerv (GL_SCISSOR_BOX, scissor_box);
|
||||
|
||||
scissor_rect.x = scissor_box[0];
|
||||
scissor_rect.y = screen_rect.height - (scissor_box[1] + scissor_box[3]);
|
||||
scissor_rect.width = scissor_box[2];
|
||||
scissor_rect.height = scissor_box[3];
|
||||
|
||||
gdk_rectangle_intersect (&scissor_rect, &screen_rect, &scissor_rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
scissor_rect = screen_rect;
|
||||
}
|
||||
|
||||
visible_region = cairo_region_create_rectangle (&scissor_rect);
|
||||
visible_region = cairo_region_create_rectangle (&visible_rect);
|
||||
|
||||
for (l = children; l; l = l->next)
|
||||
{
|
||||
|
@ -230,35 +230,6 @@ bell_flash_window_frame (MetaWindow *window)
|
||||
bell_unflash_frame, window->frame, NULL);
|
||||
}
|
||||
|
||||
static MetaWindow *
|
||||
get_flash_window (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
XkbBellNotifyEvent *xkb_bell_event;
|
||||
MetaWindow *window;
|
||||
|
||||
g_assert (xkb_ev->xkb_type == XkbBellNotify);
|
||||
|
||||
xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
|
||||
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
||||
|
||||
if (!window &&
|
||||
g_hash_table_size (display->focus_info) == 1)
|
||||
{
|
||||
GHashTableIter iter;
|
||||
MetaFocusInfo *info;
|
||||
|
||||
/* If there is only one focused window, use it */
|
||||
g_hash_table_iter_init (&iter, display->focus_info);
|
||||
|
||||
if (g_hash_table_iter_next (&iter, NULL, (gpointer *) &info) &&
|
||||
info->focus_window && info->focus_window->frame)
|
||||
window = info->focus_window;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flashes the frame of the focussed window. If there is no focussed window,
|
||||
* flashes the screen.
|
||||
@ -270,11 +241,15 @@ static void
|
||||
bell_flash_frame (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
|
||||
MetaWindow *window;
|
||||
|
||||
g_assert (xkb_ev->xkb_type == XkbBellNotify);
|
||||
window = get_flash_window (display, xkb_ev);
|
||||
|
||||
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
||||
if (!window && (display->focus_window))
|
||||
{
|
||||
window = display->focus_window;
|
||||
}
|
||||
if (window && window->frame)
|
||||
{
|
||||
bell_flash_window_frame (window);
|
||||
@ -335,7 +310,9 @@ meta_bell_notify (MetaDisplay *display,
|
||||
ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Bell event"));
|
||||
ca_proplist_sets (p, CA_PROP_CANBERRA_CACHE_CONTROL, "permanent");
|
||||
|
||||
window = get_flash_window (display, xkb_ev);
|
||||
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
||||
if (!window && (display->focus_window) && (display->focus_window->frame))
|
||||
window = display->focus_window;
|
||||
|
||||
if (window)
|
||||
{
|
||||
|
@ -885,7 +885,6 @@ constrain_tiling (MetaWindow *window,
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
MetaDevice *pointer;
|
||||
|
||||
if (priority > PRIORITY_TILING)
|
||||
return TRUE;
|
||||
@ -894,12 +893,10 @@ constrain_tiling (MetaWindow *window,
|
||||
if (!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
return TRUE;
|
||||
|
||||
pointer = meta_window_guess_grab_pointer (window);
|
||||
|
||||
/* Calculate target_size - as the tile previews need this as well, we
|
||||
* use an external function for the actual calculation
|
||||
*/
|
||||
meta_window_get_current_tile_area (window, pointer, &target_size);
|
||||
meta_window_get_current_tile_area (window, &target_size);
|
||||
unextend_by_frame (&target_size, info->fgeom);
|
||||
|
||||
/* Check min size constraints; max size constraints are ignored as for
|
||||
@ -1365,18 +1362,15 @@ constrain_titlebar_visible (MetaWindow *window,
|
||||
int bottom_amount;
|
||||
int horiz_amount_offscreen, vert_amount_offscreen;
|
||||
int horiz_amount_onscreen, vert_amount_onscreen;
|
||||
MetaGrabInfo *grab_info;
|
||||
|
||||
if (priority > PRIORITY_TITLEBAR_VISIBLE)
|
||||
return TRUE;
|
||||
|
||||
grab_info = window->cur_grab;
|
||||
|
||||
/* Allow the titlebar beyond the top of the screen only if the user wasn't
|
||||
* clicking on the frame to start the move.
|
||||
*/
|
||||
unconstrained_user_action =
|
||||
info->is_user_action && (!grab_info || !grab_info->grab_frame_action);
|
||||
info->is_user_action && !window->display->grab_frame_action;
|
||||
|
||||
/* Exit early if we know the constraint won't apply--note that this constraint
|
||||
* is only meant for normal windows (e.g. we don't want docks to be shoved
|
||||
|
198
src/core/core.c
198
src/core/core.c
@ -30,11 +30,6 @@
|
||||
#include <meta/prefs.h>
|
||||
#include <meta/errors.h>
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include "devices-xi2.h"
|
||||
#endif
|
||||
|
||||
/* Looks up the MetaWindow representing the frame of the given X window.
|
||||
* Used as a helper function by a bunch of the functions below.
|
||||
*
|
||||
@ -250,19 +245,9 @@ lower_window_and_transients (MetaWindow *window,
|
||||
void
|
||||
meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int device_id,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDevice *pointer;
|
||||
|
||||
pointer = meta_device_map_lookup (window->display->device_map, device_id);
|
||||
|
||||
if (pointer == NULL)
|
||||
return;
|
||||
|
||||
if (!META_IS_DEVICE_POINTER (pointer))
|
||||
pointer = meta_device_get_paired_device (pointer);
|
||||
|
||||
lower_window_and_transients (window, NULL);
|
||||
|
||||
@ -271,7 +256,6 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
* this will be invoked via keyboard action or by a mouse action;
|
||||
* in either case the window or a modal child will have been focused.) */
|
||||
meta_workspace_focus_default_window (window->screen->active_workspace,
|
||||
pointer,
|
||||
NULL,
|
||||
timestamp);
|
||||
}
|
||||
@ -279,21 +263,16 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
void
|
||||
meta_core_lower_beneath_grab_window (Display *xdisplay,
|
||||
Window xwindow,
|
||||
int device_id,
|
||||
guint32 timestamp)
|
||||
{
|
||||
XWindowChanges changes;
|
||||
MetaDisplay *display;
|
||||
MetaScreen *screen;
|
||||
MetaWindow *grab_window;
|
||||
MetaDevice *pointer;
|
||||
MetaGrabInfo *grab_info;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
screen = meta_display_screen_for_xwindow (display, xwindow);
|
||||
pointer = meta_device_map_lookup (display->device_map, device_id);
|
||||
grab_info = meta_display_get_grab_info (display, pointer);
|
||||
grab_window = grab_info->grab_window;
|
||||
grab_window = display->grab_window;
|
||||
|
||||
if (grab_window == NULL)
|
||||
return;
|
||||
@ -512,27 +491,18 @@ meta_core_get_active_workspace (Screen *xscreen)
|
||||
void
|
||||
meta_core_show_window_menu (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int device_id,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDevice *device;
|
||||
|
||||
/* There is already a menu popped up,
|
||||
* most likely from another device
|
||||
*/
|
||||
if (window->menu)
|
||||
return;
|
||||
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
meta_window_focus (window, timestamp);
|
||||
|
||||
device = meta_device_map_lookup (window->display->device_map, device_id);
|
||||
meta_window_show_menu (window, device, root_x, root_y, button, timestamp);
|
||||
meta_window_show_menu (window, root_x, root_y, button, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
@ -668,7 +638,6 @@ meta_core_get_workspace_name_with_index (Display *xdisplay,
|
||||
gboolean
|
||||
meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int device_id,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
gboolean frame_action,
|
||||
@ -681,16 +650,13 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDisplay *display;
|
||||
MetaScreen *screen;
|
||||
MetaDevice *device;
|
||||
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
screen = meta_display_screen_for_xwindow (display, frame_xwindow);
|
||||
|
||||
g_assert (screen != NULL);
|
||||
|
||||
device = meta_device_map_lookup (display->device_map, device_id);
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window, device,
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
frame_action,
|
||||
button, modmask,
|
||||
@ -699,58 +665,57 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
|
||||
void
|
||||
meta_core_end_grab_op (Display *xdisplay,
|
||||
int device_id,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaDevice *device;
|
||||
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
device = meta_device_map_lookup (display->device_map, device_id);
|
||||
|
||||
meta_display_end_grab_op (display, device, timestamp);
|
||||
meta_display_end_grab_op (display, timestamp);
|
||||
}
|
||||
|
||||
MetaGrabOp
|
||||
meta_core_frame_has_grab (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
gint *device_id,
|
||||
gint *button_ret)
|
||||
meta_core_get_grab_op (Display *xdisplay)
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
||||
window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (window != NULL &&
|
||||
window->cur_grab != NULL)
|
||||
{
|
||||
if (button_ret)
|
||||
*button_ret = window->cur_grab->grab_button;
|
||||
|
||||
if (device_id)
|
||||
*device_id = meta_device_get_id (window->cur_grab->grab_pointer);
|
||||
|
||||
return window->cur_grab->grab_op;
|
||||
}
|
||||
|
||||
return META_GRAB_OP_NONE;
|
||||
return display->grab_op;
|
||||
}
|
||||
|
||||
Window
|
||||
meta_core_get_frame (Display *xdisplay,
|
||||
Window client_xwindow)
|
||||
meta_core_get_grab_frame (Display *xdisplay)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, client_xwindow);
|
||||
|
||||
if (window &&
|
||||
window->frame)
|
||||
return window->frame->xwindow;
|
||||
g_assert (display != NULL);
|
||||
g_assert (display->grab_op == META_GRAB_OP_NONE ||
|
||||
display->grab_screen != NULL);
|
||||
g_assert (display->grab_op == META_GRAB_OP_NONE ||
|
||||
display->grab_screen->display->xdisplay == xdisplay);
|
||||
|
||||
if (display->grab_op != META_GRAB_OP_NONE &&
|
||||
display->grab_window &&
|
||||
display->grab_window->frame)
|
||||
return display->grab_window->frame->xwindow;
|
||||
else
|
||||
return None;
|
||||
}
|
||||
|
||||
return None;
|
||||
int
|
||||
meta_core_get_grab_button (Display *xdisplay)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return -1;
|
||||
|
||||
return display->grab_button;
|
||||
}
|
||||
|
||||
void
|
||||
@ -766,24 +731,13 @@ meta_core_grab_buttons (Display *xdisplay,
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_set_screen_cursor (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
gint device_id,
|
||||
MetaCursor cursor)
|
||||
meta_core_set_screen_cursor (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_on_screen);
|
||||
MetaDevice *pointer;
|
||||
|
||||
pointer = meta_device_map_lookup (window->display->device_map,
|
||||
device_id);
|
||||
|
||||
if (pointer == NULL)
|
||||
return;
|
||||
|
||||
if (!META_IS_DEVICE_POINTER (pointer))
|
||||
pointer = meta_device_get_paired_device (pointer);
|
||||
|
||||
meta_frame_set_screen_cursor (window->frame, pointer, cursor);
|
||||
meta_frame_set_screen_cursor (window->frame, cursor);
|
||||
}
|
||||
|
||||
void
|
||||
@ -821,69 +775,3 @@ meta_invalidate_default_icons (void)
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
||||
/* Selects events on an xwindow, using XInput2 if available/in use,
|
||||
* this function doesn't require the xwindow to have a backing
|
||||
* MetaWindow.
|
||||
*/
|
||||
void
|
||||
meta_core_select_events (Display *xdisplay,
|
||||
Window xwindow,
|
||||
gint evmask,
|
||||
gboolean preserve_old_mask)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (display->have_xinput2)
|
||||
{
|
||||
XIEventMask mask;
|
||||
|
||||
mask.deviceid = XIAllMasterDevices;
|
||||
mask.mask = meta_device_xi2_translate_event_mask (evmask,
|
||||
&mask.mask_len);
|
||||
|
||||
if (preserve_old_mask)
|
||||
{
|
||||
XIEventMask *prev;
|
||||
gint n_masks, i, j;
|
||||
|
||||
prev = XIGetSelectedEvents (xdisplay, xwindow, &n_masks);
|
||||
|
||||
for (i = 0; i < n_masks; i++)
|
||||
{
|
||||
if (prev[i].deviceid != XIAllMasterDevices)
|
||||
continue;
|
||||
|
||||
for (j = 0; j < MIN (mask.mask_len, prev[i].mask_len); j++)
|
||||
mask.mask[j] |= prev[i].mask[j];
|
||||
}
|
||||
|
||||
XFree (prev);
|
||||
}
|
||||
|
||||
XISelectEvents (xdisplay, xwindow, &mask, 1);
|
||||
|
||||
/* Unset any input event so they are only handled via XInput2 */
|
||||
evmask &= ~(KeyPressMask | KeyReleaseMask |
|
||||
ButtonPressMask | ButtonReleaseMask |
|
||||
EnterWindowMask | LeaveWindowMask |
|
||||
PointerMotionMask | PointerMotionHintMask |
|
||||
Button1MotionMask | Button2MotionMask |
|
||||
Button3MotionMask | Button4MotionMask |
|
||||
Button5MotionMask | ButtonMotionMask |
|
||||
FocusChangeMask);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (preserve_old_mask)
|
||||
{
|
||||
XWindowAttributes attr;
|
||||
|
||||
if (XGetWindowAttributes (xdisplay, xwindow, &attr))
|
||||
evmask |= attr.your_event_mask;
|
||||
}
|
||||
|
||||
XSelectInput (xdisplay, xwindow, evmask);
|
||||
}
|
||||
|
@ -110,7 +110,6 @@ void meta_core_user_raise (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int device_id,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_core_user_focus (Display *xdisplay,
|
||||
@ -119,7 +118,6 @@ void meta_core_user_focus (Display *xdisplay,
|
||||
|
||||
void meta_core_lower_beneath_grab_window (Display *xdisplay,
|
||||
Window xwindow,
|
||||
int device_id,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_core_minimize (Display *xdisplay,
|
||||
@ -165,7 +163,6 @@ const char* meta_core_get_workspace_name_with_index (Display *xdisplay,
|
||||
|
||||
void meta_core_show_window_menu (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int device_id,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
@ -178,7 +175,6 @@ void meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
|
||||
gboolean meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int device_id,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
gboolean frame_action,
|
||||
@ -188,29 +184,18 @@ gboolean meta_core_begin_grab_op (Display *xdisplay,
|
||||
int root_x,
|
||||
int root_y);
|
||||
void meta_core_end_grab_op (Display *xdisplay,
|
||||
int device_id,
|
||||
guint32 timestamp);
|
||||
MetaGrabOp meta_core_get_grab_op (Display *xdisplay);
|
||||
Window meta_core_get_grab_frame (Display *xdisplay);
|
||||
int meta_core_get_grab_button (Display *xdisplay);
|
||||
|
||||
MetaGrabOp meta_core_frame_has_grab (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
gint *device_id,
|
||||
gint *button_ret);
|
||||
Window meta_core_get_frame (Display *xdisplay,
|
||||
Window client_xwindow);
|
||||
|
||||
void meta_core_grab_buttons (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
|
||||
void meta_core_set_screen_cursor (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
int device_id,
|
||||
MetaCursor cursor);
|
||||
|
||||
void meta_core_select_events (Display *xdisplay,
|
||||
Window xwindow,
|
||||
gint evmask,
|
||||
gboolean preserve_old_mask);
|
||||
|
||||
void meta_core_set_screen_cursor (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
MetaCursor cursor);
|
||||
|
||||
/* Used because we ignore EnterNotify when a window is unmapped that
|
||||
* really shouldn't cause focus changes, by comparing the event serial
|
||||
|
@ -1,69 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Keyboard device abstraction */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "device-keyboard.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaDeviceKeyboard,
|
||||
meta_device_keyboard,
|
||||
META_TYPE_DEVICE)
|
||||
|
||||
static void
|
||||
meta_device_keyboard_class_init (MetaDeviceKeyboardClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_init (MetaDeviceKeyboard *keyboard)
|
||||
{
|
||||
}
|
||||
|
||||
Window
|
||||
meta_device_keyboard_get_focus_window (MetaDeviceKeyboard *keyboard)
|
||||
{
|
||||
MetaDeviceKeyboardClass *klass;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_KEYBOARD (keyboard), None);
|
||||
|
||||
klass = META_DEVICE_KEYBOARD_GET_CLASS (keyboard);
|
||||
|
||||
if (!klass->get_focus_window)
|
||||
return None;
|
||||
|
||||
return (klass->get_focus_window) (keyboard);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_keyboard_set_focus_window (MetaDeviceKeyboard *keyboard,
|
||||
Window xwindow,
|
||||
Time timestamp)
|
||||
{
|
||||
MetaDeviceKeyboardClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_KEYBOARD (keyboard));
|
||||
|
||||
klass = META_DEVICE_KEYBOARD_GET_CLASS (keyboard);
|
||||
|
||||
if (klass->set_focus_window)
|
||||
(klass->set_focus_window) (keyboard, xwindow, timestamp);
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file device-keyboard.h Keyboard device abstraction
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the internal abstraction of keyboard devices so
|
||||
* XInput2/core events can be handled similarly.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_KEYBOARD_H
|
||||
#define META_DEVICE_KEYBOARD_H
|
||||
|
||||
#include "display-private.h"
|
||||
#include "device-private.h"
|
||||
|
||||
#define META_TYPE_DEVICE_KEYBOARD (meta_device_keyboard_get_type ())
|
||||
#define META_DEVICE_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_KEYBOARD, MetaDeviceKeyboard))
|
||||
#define META_DEVICE_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_KEYBOARD, MetaDeviceKeyboardClass))
|
||||
#define META_IS_DEVICE_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_KEYBOARD))
|
||||
#define META_IS_DEVICE_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_KEYBOARD))
|
||||
#define META_DEVICE_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_KEYBOARD, MetaDeviceKeyboardClass))
|
||||
|
||||
typedef struct _MetaDeviceKeyboard MetaDeviceKeyboard;
|
||||
typedef struct _MetaDeviceKeyboardClass MetaDeviceKeyboardClass;
|
||||
|
||||
struct _MetaDeviceKeyboard
|
||||
{
|
||||
MetaDevice parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDeviceKeyboardClass
|
||||
{
|
||||
MetaDeviceClass parent_instance;
|
||||
|
||||
Window (* get_focus_window) (MetaDeviceKeyboard *keyboard);
|
||||
void (* set_focus_window) (MetaDeviceKeyboard *keyboard,
|
||||
Window xwindow,
|
||||
Time timestamp);
|
||||
};
|
||||
|
||||
GType meta_device_keyboard_get_type (void) G_GNUC_CONST;
|
||||
|
||||
Window meta_device_keyboard_get_focus_window (MetaDeviceKeyboard *keyboard);
|
||||
void meta_device_keyboard_set_focus_window (MetaDeviceKeyboard *keyboard,
|
||||
Window xwindow,
|
||||
Time timestamp);
|
||||
|
||||
|
||||
#endif /* META_DEVICE_KEYBOARD_H */
|
@ -1,134 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Input device map, core protocol implementation */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "device-map-core.h"
|
||||
#include "devices-core.h"
|
||||
|
||||
G_DEFINE_TYPE (MetaDeviceMapCore, meta_device_map_core, META_TYPE_DEVICE_MAP)
|
||||
|
||||
static gboolean
|
||||
meta_device_map_core_grab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers,
|
||||
gboolean sync)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
gint retval;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
retval = XGrabKey (display->xdisplay, keycode, modifiers,
|
||||
xwindow, True,
|
||||
GrabModeAsync, /* Never care about the other device */
|
||||
(sync) ? GrabModeSync : GrabModeAsync);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_core_ungrab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
XUngrabKey (display->xdisplay, keycode, modifiers, xwindow);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_device_map_core_grab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers,
|
||||
guint evmask,
|
||||
gboolean sync)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
gint retval;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
retval = XGrabButton (display->xdisplay, n_button,
|
||||
modifiers, xwindow, False,
|
||||
evmask,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
GrabModeAsync, /* Never care about the other device */
|
||||
None, None);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_core_ungrab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
XUngrabButton (display->xdisplay, n_button, modifiers, xwindow);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_core_constructed (GObject *object)
|
||||
{
|
||||
MetaDeviceMap *device_map = META_DEVICE_MAP (object);
|
||||
MetaDevice *pointer, *keyboard;
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
|
||||
/* Insert core devices */
|
||||
pointer = meta_device_pointer_core_new (display);
|
||||
meta_device_map_add_device (device_map, pointer);
|
||||
|
||||
keyboard = meta_device_keyboard_core_new (display);
|
||||
meta_device_map_add_device (device_map, keyboard);
|
||||
|
||||
meta_device_pair_devices (pointer, keyboard);
|
||||
|
||||
g_object_unref (pointer);
|
||||
g_object_unref (keyboard);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_core_class_init (MetaDeviceMapCoreClass *klass)
|
||||
{
|
||||
MetaDeviceMapClass *device_map_class = META_DEVICE_MAP_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->constructed = meta_device_map_core_constructed;
|
||||
|
||||
device_map_class->grab_key = meta_device_map_core_grab_key;
|
||||
device_map_class->ungrab_key = meta_device_map_core_ungrab_key;
|
||||
device_map_class->grab_button = meta_device_map_core_grab_button;
|
||||
device_map_class->ungrab_button = meta_device_map_core_ungrab_button;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_core_init (MetaDeviceMapCore *device_map)
|
||||
{
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file device-map-core.h device map for core devices
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the core protocol implementation of the device map
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_MAP_CORE_H
|
||||
#define META_DEVICE_MAP_CORE_H
|
||||
|
||||
typedef struct _MetaDeviceMapCore MetaDeviceMapCore;
|
||||
typedef struct _MetaDeviceMapCoreClass MetaDeviceMapCoreClass;
|
||||
|
||||
#include "device-map-private.h"
|
||||
|
||||
#define META_TYPE_DEVICE_MAP_CORE (meta_device_map_core_get_type ())
|
||||
#define META_DEVICE_MAP_CORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_MAP_CORE, MetaDeviceMapCore))
|
||||
#define META_DEVICE_MAP_CORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_MAP_CORE, MetaDeviceMapCoreClass))
|
||||
#define META_IS_DEVICE_MAP_CORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_MAP_CORE))
|
||||
#define META_IS_DEVICE_MAP_CORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_MAP_CORE))
|
||||
#define META_DEVICE_MAP_CORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_MAP_CORE, MetaDeviceMapCoreClass))
|
||||
|
||||
struct _MetaDeviceMapCore
|
||||
{
|
||||
MetaDeviceMap parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDeviceMapCoreClass
|
||||
{
|
||||
MetaDeviceMapClass parent_class;
|
||||
};
|
||||
|
||||
GType meta_device_map_core_get_type (void) G_GNUC_CONST;
|
||||
|
||||
#endif /* META_DEVICE_MAP_CORE_H */
|
@ -1,111 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file device-map.h object containing input devices
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the device map, used to find out the device behind
|
||||
* XInput2/core events.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_MAP_PRIVATE_H
|
||||
#define META_DEVICE_MAP_PRIVATE_H
|
||||
|
||||
#include <meta/device-map.h>
|
||||
#include <meta/device.h>
|
||||
#include "display-private.h"
|
||||
#include "device-private.h"
|
||||
|
||||
/* Device IDs for Virtual Core Pointer/Keyboard,
|
||||
* use only in case of emergency.
|
||||
*/
|
||||
#define META_CORE_POINTER_ID 2
|
||||
#define META_CORE_KEYBOARD_ID 3
|
||||
|
||||
struct _MetaDeviceMap
|
||||
{
|
||||
GObject parent_instance;
|
||||
gpointer priv;
|
||||
};
|
||||
|
||||
struct _MetaDeviceMapClass
|
||||
{
|
||||
GObjectClass parent_instance;
|
||||
|
||||
void (* device_added) (MetaDeviceMap *device_map,
|
||||
MetaDevice *device);
|
||||
void (* device_removed) (MetaDeviceMap *device_map,
|
||||
MetaDevice *device);
|
||||
|
||||
gboolean (* grab_key) (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers,
|
||||
gboolean sync);
|
||||
void (* ungrab_key) (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers);
|
||||
|
||||
gboolean (* grab_button) (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers,
|
||||
guint evmask,
|
||||
gboolean sync);
|
||||
void (* ungrab_button) (MetaDeviceMap *pointer,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers);
|
||||
};
|
||||
|
||||
GType meta_device_map_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaDeviceMap * meta_device_map_new (MetaDisplay *display,
|
||||
gboolean force_core);
|
||||
|
||||
void meta_device_map_add_device (MetaDeviceMap *device_map,
|
||||
MetaDevice *device);
|
||||
void meta_device_map_remove_device (MetaDeviceMap *device_map,
|
||||
MetaDevice *device);
|
||||
|
||||
gboolean meta_device_map_grab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers,
|
||||
gboolean sync);
|
||||
void meta_device_map_ungrab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers);
|
||||
gboolean meta_device_map_grab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers,
|
||||
guint evmask,
|
||||
gboolean sync);
|
||||
void meta_device_map_ungrab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers);
|
||||
|
||||
#endif /* META_DEVICE_MAP_PRIVATE_H */
|
@ -1,269 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Input device map, XInput2 implementation */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "device-map-xi2.h"
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include "devices-xi2.h"
|
||||
|
||||
#define XINPUT2_VERSION_MAJOR 2
|
||||
#define XINPUT2_VERSION_MINOR 0
|
||||
|
||||
G_DEFINE_TYPE (MetaDeviceMapXI2, meta_device_map_xi2, META_TYPE_DEVICE_MAP)
|
||||
|
||||
static gboolean
|
||||
meta_device_map_xi2_grab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers,
|
||||
gboolean sync)
|
||||
{
|
||||
XIGrabModifiers mods = { modifiers, 0 };
|
||||
MetaDisplay *display;
|
||||
XIEventMask mask;
|
||||
gint retval;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
|
||||
mask.deviceid = XIAllMasterDevices;
|
||||
mask.mask = meta_device_xi2_translate_event_mask (KeyPressMask |
|
||||
KeyReleaseMask,
|
||||
&mask.mask_len);
|
||||
/* FIXME: Doesn't seem to work with
|
||||
* XIAllMasterDevices, use the VCK
|
||||
* at the moment
|
||||
*/
|
||||
retval = XIGrabKeycode (display->xdisplay,
|
||||
META_CORE_KEYBOARD_ID,
|
||||
keycode, xwindow,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
GrabModeAsync, /* Never care about the other device */
|
||||
True, &mask, 1, &mods);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_xi2_ungrab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers)
|
||||
{
|
||||
XIGrabModifiers mods = { modifiers, 0 };
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
XIUngrabKeycode (display->xdisplay,
|
||||
META_CORE_KEYBOARD_ID,
|
||||
keycode, xwindow,
|
||||
1, &mods);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_device_map_xi2_grab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers,
|
||||
guint evmask,
|
||||
gboolean sync)
|
||||
{
|
||||
XIGrabModifiers mods = { modifiers, 0 };
|
||||
XIEventMask mask;
|
||||
MetaDisplay *display;
|
||||
int retval;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
|
||||
mask.deviceid = XIAllMasterDevices;
|
||||
mask.mask = meta_device_xi2_translate_event_mask (evmask, &mask.mask_len);
|
||||
|
||||
retval = XIGrabButton (display->xdisplay,
|
||||
XIAllMasterDevices,
|
||||
n_button, xwindow, None,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
GrabModeAsync, /* Never care about the other device */
|
||||
False, &mask, 1, &mods);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_xi2_ungrab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers)
|
||||
{
|
||||
XIGrabModifiers mods = { modifiers, 0 };
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
XIUngrabButton (display->xdisplay,
|
||||
META_CORE_POINTER_ID,
|
||||
//XIAllMasterDevices,
|
||||
n_button, xwindow, 1, &mods);
|
||||
}
|
||||
|
||||
static void
|
||||
add_device_from_info (MetaDeviceMap *device_map,
|
||||
gint use,
|
||||
gint device_id)
|
||||
{
|
||||
MetaDevice *device;
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
|
||||
if (use == XIMasterPointer)
|
||||
device = meta_device_pointer_xi2_new (display, device_id);
|
||||
else if (use == XIMasterKeyboard)
|
||||
device = meta_device_keyboard_xi2_new (display, device_id);
|
||||
|
||||
if (device)
|
||||
{
|
||||
meta_device_map_add_device (device_map, device);
|
||||
g_object_unref (device);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pair_devices (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaDevice *device1, *device2;
|
||||
MetaDeviceMap *device_map;
|
||||
|
||||
device_map = user_data;
|
||||
device1 = meta_device_map_lookup (device_map, GPOINTER_TO_INT (key));
|
||||
device2 = meta_device_map_lookup (device_map, GPOINTER_TO_INT (value));
|
||||
|
||||
meta_device_pair_devices (device1, device2);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_xi2_constructed (GObject *object)
|
||||
{
|
||||
MetaDeviceMap *device_map = META_DEVICE_MAP (object);
|
||||
MetaDisplay *display;
|
||||
XIDeviceInfo *info;
|
||||
GHashTable *pairs;
|
||||
int n_devices, i;
|
||||
|
||||
display = meta_device_map_get_display (device_map);
|
||||
|
||||
/* We're only interested in master devices,
|
||||
* detached slave devices are left for applications
|
||||
* to handle.
|
||||
*/
|
||||
info = XIQueryDevice (display->xdisplay, XIAllMasterDevices, &n_devices);
|
||||
pairs = g_hash_table_new (NULL, NULL);
|
||||
|
||||
for (i = 0; i < n_devices; i++)
|
||||
{
|
||||
add_device_from_info (device_map, info[i].use, info[i].deviceid);
|
||||
g_hash_table_insert (pairs,
|
||||
GINT_TO_POINTER (info[i].deviceid),
|
||||
GINT_TO_POINTER (info[i].attachment));
|
||||
}
|
||||
|
||||
g_hash_table_foreach (pairs, pair_devices, device_map);
|
||||
g_hash_table_destroy (pairs);
|
||||
|
||||
XIFreeDeviceInfo (info);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_xi2_class_init (MetaDeviceMapXI2Class *klass)
|
||||
{
|
||||
MetaDeviceMapClass *device_map_class = META_DEVICE_MAP_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->constructed = meta_device_map_xi2_constructed;
|
||||
|
||||
device_map_class->grab_key = meta_device_map_xi2_grab_key;
|
||||
device_map_class->ungrab_key = meta_device_map_xi2_ungrab_key;
|
||||
device_map_class->grab_button = meta_device_map_xi2_grab_button;
|
||||
device_map_class->ungrab_button = meta_device_map_xi2_ungrab_button;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_xi2_init (MetaDeviceMapXI2 *device_map)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_device_map_xi2_handle_hierarchy_event (MetaDeviceMapXI2 *device_map,
|
||||
XEvent *ev)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_map_get_display (META_DEVICE_MAP (device_map));
|
||||
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIHierarchyEvent *xev;
|
||||
GHashTable *pairs;
|
||||
gint i;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIHierarchyEvent *) ev->xcookie.data;
|
||||
|
||||
if (xev->evtype != XI_HierarchyChanged)
|
||||
return FALSE;
|
||||
|
||||
pairs = g_hash_table_new (NULL, NULL);
|
||||
|
||||
for (i = 0; i < xev->num_info; i++)
|
||||
{
|
||||
if (xev->info[i].flags & XIMasterAdded)
|
||||
{
|
||||
add_device_from_info (META_DEVICE_MAP (device_map),
|
||||
xev->info[i].use,
|
||||
xev->info[i].deviceid);
|
||||
g_hash_table_insert (pairs,
|
||||
GINT_TO_POINTER (xev->info[i].deviceid),
|
||||
GINT_TO_POINTER (xev->info[i].attachment));
|
||||
}
|
||||
else if (xev->info[i].flags & XIMasterRemoved)
|
||||
{
|
||||
MetaDevice *device;
|
||||
|
||||
device = meta_device_map_lookup (META_DEVICE_MAP (device_map),
|
||||
xev->info[i].deviceid);
|
||||
|
||||
if (device)
|
||||
meta_device_map_remove_device (META_DEVICE_MAP (device_map),
|
||||
device);
|
||||
}
|
||||
}
|
||||
|
||||
g_hash_table_foreach (pairs, pair_devices, device_map);
|
||||
g_hash_table_destroy (pairs);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file device-map-xi2.h device map for XInput2 devices
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the XInput2 implementation of the device map
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_MAP_XI2_H
|
||||
#define META_DEVICE_MAP_XI2_H
|
||||
|
||||
typedef struct _MetaDeviceMapXI2 MetaDeviceMapXI2;
|
||||
typedef struct _MetaDeviceMapXI2Class MetaDeviceMapXI2Class;
|
||||
|
||||
#include "device-map-private.h"
|
||||
|
||||
#define META_TYPE_DEVICE_MAP_XI2 (meta_device_map_xi2_get_type ())
|
||||
#define META_DEVICE_MAP_XI2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_MAP_XI2, MetaDeviceMapXI2))
|
||||
#define META_DEVICE_MAP_XI2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_MAP_XI2, MetaDeviceMapXI2Class))
|
||||
#define META_IS_DEVICE_MAP_XI2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_MAP_XI2))
|
||||
#define META_IS_DEVICE_MAP_XI2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_MAP_XI2))
|
||||
#define META_DEVICE_MAP_XI2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_MAP_XI2, MetaDeviceMapXI2Class))
|
||||
|
||||
struct _MetaDeviceMapXI2
|
||||
{
|
||||
MetaDeviceMap parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDeviceMapXI2Class
|
||||
{
|
||||
MetaDeviceMapClass parent_class;
|
||||
};
|
||||
|
||||
GType meta_device_map_xi2_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean meta_device_map_xi2_handle_hierarchy_event (MetaDeviceMapXI2 *device_map,
|
||||
XEvent *ev);
|
||||
|
||||
#endif /* META_DEVICE_MAP_XI2_H */
|
@ -1,390 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Input device map */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "device-map-private.h"
|
||||
#include "device-map-core.h"
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include "device-map-xi2.h"
|
||||
|
||||
#define XINPUT2_VERSION_MAJOR 2
|
||||
#define XINPUT2_VERSION_MINOR 0
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MetaDeviceMap, meta_device_map, G_TYPE_OBJECT)
|
||||
|
||||
typedef struct MetaDeviceMapPrivate MetaDeviceMapPrivate;
|
||||
|
||||
struct MetaDeviceMapPrivate
|
||||
{
|
||||
MetaDisplay *display;
|
||||
GHashTable *devices;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_DISPLAY
|
||||
};
|
||||
|
||||
enum {
|
||||
DEVICE_ADDED,
|
||||
DEVICE_REMOVED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static void
|
||||
meta_device_map_get_property (GObject *object,
|
||||
guint param_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
priv = META_DEVICE_MAP (object)->priv;
|
||||
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_DISPLAY:
|
||||
g_value_set_object (value, priv->display);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_set_property (GObject *object,
|
||||
guint param_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
priv = META_DEVICE_MAP (object)->priv;
|
||||
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_DISPLAY:
|
||||
priv->display = g_value_get_object (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_finalize (GObject *object)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
GHashTableIter iter;
|
||||
MetaDevice *device;
|
||||
|
||||
priv = META_DEVICE_MAP (object)->priv;
|
||||
g_hash_table_iter_init (&iter, priv->devices);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &device))
|
||||
{
|
||||
/* Detach the device */
|
||||
g_hash_table_iter_steal (&iter);
|
||||
|
||||
g_signal_emit (object, signals[DEVICE_REMOVED], 0, device);
|
||||
g_object_unref (device);
|
||||
}
|
||||
|
||||
g_hash_table_destroy (priv->devices);
|
||||
G_OBJECT_CLASS (meta_device_map_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_class_init (MetaDeviceMapClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->get_property = meta_device_map_get_property;
|
||||
object_class->set_property = meta_device_map_set_property;
|
||||
object_class->finalize = meta_device_map_finalize;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DISPLAY,
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"Display",
|
||||
META_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
signals[DEVICE_ADDED] =
|
||||
g_signal_new ("device-added",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1, META_TYPE_DEVICE);
|
||||
signals[DEVICE_REMOVED] =
|
||||
g_signal_new ("device-removed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1, META_TYPE_DEVICE);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (MetaDeviceMapPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_map_init (MetaDeviceMap *device_map)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
priv = device_map->priv = G_TYPE_INSTANCE_GET_PRIVATE (device_map,
|
||||
META_TYPE_DEVICE_MAP,
|
||||
MetaDeviceMapPrivate);
|
||||
priv->devices = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) g_object_unref);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_map_add_device (MetaDeviceMap *device_map,
|
||||
MetaDevice *device)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
priv = device_map->priv;
|
||||
g_hash_table_insert (priv->devices,
|
||||
GINT_TO_POINTER (meta_device_get_id (device)),
|
||||
g_object_ref (device));
|
||||
|
||||
g_signal_emit (device_map, signals[DEVICE_ADDED], 0, device);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_map_remove_device (MetaDeviceMap *device_map,
|
||||
MetaDevice *device)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
priv = device_map->priv;
|
||||
|
||||
if (g_hash_table_steal (priv->devices,
|
||||
GINT_TO_POINTER (meta_device_get_id (device))))
|
||||
{
|
||||
g_signal_emit (device_map, signals[DEVICE_REMOVED], 0, device);
|
||||
g_object_unref (device);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
|
||||
static gboolean
|
||||
initialize_xinput (MetaDisplay *display)
|
||||
{
|
||||
int major, minor, opcode;
|
||||
int unused;
|
||||
|
||||
if (!XQueryExtension (display->xdisplay,
|
||||
"XInputExtension",
|
||||
&opcode, &unused, &unused))
|
||||
return FALSE;
|
||||
|
||||
major = XINPUT2_VERSION_MAJOR;
|
||||
minor = XINPUT2_VERSION_MINOR;
|
||||
|
||||
XIQueryVersion (display->xdisplay, &major, &minor);
|
||||
|
||||
if (major == XINPUT2_VERSION_MAJOR &&
|
||||
minor == XINPUT2_VERSION_MINOR)
|
||||
{
|
||||
display->have_xinput2 = TRUE;
|
||||
display->xinput2_opcode = opcode;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
|
||||
MetaDeviceMap *
|
||||
meta_device_map_new (MetaDisplay *display,
|
||||
gboolean force_core)
|
||||
{
|
||||
GType type = META_TYPE_DEVICE_MAP_CORE;
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (!force_core &&
|
||||
initialize_xinput (display))
|
||||
type = META_TYPE_DEVICE_MAP_XI2;
|
||||
#endif
|
||||
|
||||
return g_object_new (type,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_device_map_lookup:
|
||||
* @device_map: a #MetaDeviceMap
|
||||
* @device_id: ID for a device
|
||||
*
|
||||
* returns the device corresponding to @device_id
|
||||
*
|
||||
* Returns: (transfer none): (allow-none): The matching device, or %NULL.
|
||||
**/
|
||||
MetaDevice *
|
||||
meta_device_map_lookup (MetaDeviceMap *device_map,
|
||||
gint device_id)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_MAP (device_map), NULL);
|
||||
|
||||
priv = device_map->priv;
|
||||
return g_hash_table_lookup (priv->devices,
|
||||
GINT_TO_POINTER (device_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_device_map_get_display:
|
||||
* @device_map: a #MetaDeviceMap
|
||||
*
|
||||
* Returns the #MetaDisplay to which @device_map belongs to.
|
||||
*
|
||||
* Returns: (transfer none): The #MetaDisplay.
|
||||
**/
|
||||
MetaDisplay *
|
||||
meta_device_map_get_display (MetaDeviceMap *device_map)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_MAP (device_map), NULL);
|
||||
|
||||
priv = device_map->priv;
|
||||
return priv->display;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_device_map_list_devices:
|
||||
* @device_map: a #MetaDeviceMap
|
||||
*
|
||||
* Returns the list of devices that @device_map holds.
|
||||
*
|
||||
* Returns: (element-type Meta.Device) (transfer container): the list
|
||||
* of devices, the contained objects are owned by @device_map
|
||||
* and should not be unref'ed. The list must be freed with
|
||||
* g_list_free().
|
||||
**/
|
||||
GList *
|
||||
meta_device_map_list_devices (MetaDeviceMap *device_map)
|
||||
{
|
||||
MetaDeviceMapPrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_MAP (device_map), NULL);
|
||||
|
||||
priv = device_map->priv;
|
||||
return g_hash_table_get_values (priv->devices);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_device_map_grab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers,
|
||||
gboolean sync)
|
||||
{
|
||||
MetaDeviceMapClass *klass;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_MAP (device_map), FALSE);
|
||||
g_return_val_if_fail (xwindow != None, FALSE);
|
||||
|
||||
klass = META_DEVICE_MAP_GET_CLASS (device_map);
|
||||
|
||||
if (!klass->grab_key)
|
||||
return FALSE;
|
||||
|
||||
return (klass->grab_key) (device_map, xwindow, keycode, modifiers, sync);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_map_ungrab_key (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint keycode,
|
||||
guint modifiers)
|
||||
{
|
||||
MetaDeviceMapClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_MAP (device_map));
|
||||
g_return_if_fail (xwindow != None);
|
||||
|
||||
klass = META_DEVICE_MAP_GET_CLASS (device_map);
|
||||
|
||||
if (klass->ungrab_key)
|
||||
(klass->ungrab_key) (device_map, xwindow, keycode, modifiers);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_device_map_grab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers,
|
||||
guint evmask,
|
||||
gboolean sync)
|
||||
{
|
||||
MetaDeviceMapClass *klass;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_MAP (device_map), FALSE);
|
||||
g_return_val_if_fail (xwindow != None, FALSE);
|
||||
|
||||
klass = META_DEVICE_MAP_GET_CLASS (device_map);
|
||||
|
||||
if (!klass->grab_button)
|
||||
return FALSE;
|
||||
|
||||
return (klass->grab_button) (device_map, xwindow, n_button,
|
||||
modifiers, evmask, sync);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_map_ungrab_button (MetaDeviceMap *device_map,
|
||||
Window xwindow,
|
||||
guint n_button,
|
||||
guint modifiers)
|
||||
{
|
||||
MetaDeviceMapClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_MAP (device_map));
|
||||
g_return_if_fail (xwindow != None);
|
||||
|
||||
klass = META_DEVICE_MAP_GET_CLASS (device_map);
|
||||
|
||||
if (klass->ungrab_button)
|
||||
(klass->ungrab_button) (device_map, xwindow, n_button, modifiers);
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Pointer device abstraction */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "device-pointer.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaDevicePointer,
|
||||
meta_device_pointer,
|
||||
META_TYPE_DEVICE)
|
||||
|
||||
static void
|
||||
meta_device_pointer_class_init (MetaDevicePointerClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_init (MetaDevicePointer *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_pointer_warp (MetaDevicePointer *pointer,
|
||||
MetaScreen *screen,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
MetaDevicePointerClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_POINTER (pointer));
|
||||
g_return_if_fail (META_IS_SCREEN (screen));
|
||||
|
||||
klass = META_DEVICE_POINTER_GET_CLASS (pointer);
|
||||
|
||||
if (klass->warp)
|
||||
(klass->warp) (pointer, screen, x, y);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_pointer_set_window_cursor (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaDevicePointerClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE_POINTER (pointer));
|
||||
g_return_if_fail (xwindow != None);
|
||||
|
||||
klass = META_DEVICE_POINTER_GET_CLASS (pointer);
|
||||
|
||||
if (klass->set_window_cursor)
|
||||
(klass->set_window_cursor) (pointer, xwindow, cursor);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_device_pointer_query_position (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
Window *root_ret,
|
||||
Window *child_ret,
|
||||
gint *root_x_ret,
|
||||
gint *root_y_ret,
|
||||
gint *x_ret,
|
||||
gint *y_ret,
|
||||
guint *mask_ret)
|
||||
{
|
||||
MetaDevicePointerClass *klass;
|
||||
gint root_x, root_y, x, y;
|
||||
Window root, child;
|
||||
gboolean retval;
|
||||
guint mask;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE_POINTER (pointer), FALSE);
|
||||
g_return_val_if_fail (xwindow != None, FALSE);
|
||||
|
||||
klass = META_DEVICE_POINTER_GET_CLASS (pointer);
|
||||
|
||||
if (!klass->query_position)
|
||||
return FALSE;
|
||||
|
||||
retval = (klass->query_position) (pointer, xwindow, &root, &child,
|
||||
&root_x, &root_y, &x, &y, &mask);
|
||||
|
||||
if (root_ret)
|
||||
*root_ret = root;
|
||||
|
||||
if (child_ret)
|
||||
*child_ret = child;
|
||||
|
||||
if (root_x_ret)
|
||||
*root_x_ret = root_x;
|
||||
|
||||
if (root_y_ret)
|
||||
*root_y_ret = root_y;
|
||||
|
||||
if (x_ret)
|
||||
*x_ret = x;
|
||||
|
||||
if (y_ret)
|
||||
*y_ret = y;
|
||||
|
||||
if (mask_ret)
|
||||
*mask_ret = mask;
|
||||
|
||||
return retval;
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file device-pointer.h Pointer device abstraction
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the internal abstraction of pointer devices so
|
||||
* XInput2/core events can be handled similarly.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_POINTER_H
|
||||
#define META_DEVICE_POINTER_H
|
||||
|
||||
#include "display-private.h"
|
||||
#include <meta/screen.h>
|
||||
#include "device-private.h"
|
||||
|
||||
#define META_TYPE_DEVICE_POINTER (meta_device_pointer_get_type ())
|
||||
#define META_DEVICE_POINTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_POINTER, MetaDevicePointer))
|
||||
#define META_DEVICE_POINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_POINTER, MetaDevicePointerClass))
|
||||
#define META_IS_DEVICE_POINTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_POINTER))
|
||||
#define META_IS_DEVICE_POINTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_POINTER))
|
||||
#define META_DEVICE_POINTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_POINTER, MetaDevicePointerClass))
|
||||
|
||||
typedef struct _MetaDevicePointer MetaDevicePointer;
|
||||
typedef struct _MetaDevicePointerClass MetaDevicePointerClass;
|
||||
|
||||
struct _MetaDevicePointer
|
||||
{
|
||||
MetaDevice parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDevicePointerClass
|
||||
{
|
||||
MetaDeviceClass parent_instance;
|
||||
|
||||
void (* warp) (MetaDevicePointer *pointer,
|
||||
MetaScreen *screen,
|
||||
gint x,
|
||||
gint y);
|
||||
|
||||
void (* set_window_cursor) (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
MetaCursor cursor);
|
||||
gboolean (* query_position) (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
Window *root,
|
||||
Window *child,
|
||||
gint *root_x,
|
||||
gint *root_y,
|
||||
gint *x,
|
||||
gint *y,
|
||||
guint *mask);
|
||||
};
|
||||
|
||||
GType meta_device_pointer_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void meta_device_pointer_warp (MetaDevicePointer *pointer,
|
||||
MetaScreen *screen,
|
||||
gint x,
|
||||
gint y);
|
||||
void meta_device_pointer_set_window_cursor (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
MetaCursor cursor);
|
||||
|
||||
gboolean meta_device_pointer_query_position (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
Window *root,
|
||||
Window *child,
|
||||
gint *root_x,
|
||||
gint *root_y,
|
||||
gint *x,
|
||||
gint *y,
|
||||
guint *mask);
|
||||
|
||||
#endif /* META_DEVICE_POINTER_H */
|
@ -1,80 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file device.h Input device abstraction
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the internal abstraction of input devices so
|
||||
* XInput2/core events can be handled similarly.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_PRIVATE_H
|
||||
#define META_DEVICE_PRIVATE_H
|
||||
|
||||
#include <meta/device.h>
|
||||
#include "display-private.h"
|
||||
|
||||
struct _MetaDevice
|
||||
{
|
||||
GObject parent_instance;
|
||||
gpointer priv;
|
||||
};
|
||||
|
||||
struct _MetaDeviceClass
|
||||
{
|
||||
GObjectClass parent_instance;
|
||||
|
||||
void (* allow_events) (MetaDevice *device,
|
||||
int mode,
|
||||
Time time);
|
||||
|
||||
gboolean (* grab) (MetaDevice *device,
|
||||
Window xwindow,
|
||||
guint evmask,
|
||||
MetaCursor cursor,
|
||||
gboolean owner_events,
|
||||
gboolean sync,
|
||||
Time time);
|
||||
void (* ungrab) (MetaDevice *device,
|
||||
Time time);
|
||||
};
|
||||
|
||||
GType meta_device_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void meta_device_allow_events (MetaDevice *device,
|
||||
int mode,
|
||||
Time time);
|
||||
|
||||
gboolean meta_device_grab (MetaDevice *device,
|
||||
Window xwindow,
|
||||
guint evmask,
|
||||
MetaCursor cursor,
|
||||
gboolean owner_events,
|
||||
gboolean sync,
|
||||
Time time);
|
||||
void meta_device_ungrab (MetaDevice *device,
|
||||
Time time);
|
||||
|
||||
void meta_device_pair_devices (MetaDevice *device,
|
||||
MetaDevice *other_device);
|
||||
|
||||
#endif /* META_DEVICE_PRIVATE_H */
|
@ -1,270 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Input device abstraction */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "device-private.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaDevice, meta_device, G_TYPE_OBJECT)
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_DEVICE_ID,
|
||||
PROP_DISPLAY,
|
||||
PROP_PAIRED_DEVICE
|
||||
};
|
||||
|
||||
typedef struct MetaDevicePrivate MetaDevicePrivate;
|
||||
|
||||
struct MetaDevicePrivate
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaDevice *paired_device;
|
||||
gint device_id;
|
||||
};
|
||||
|
||||
static void
|
||||
meta_device_get_property (GObject *object,
|
||||
guint param_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_DEVICE_ID:
|
||||
g_value_set_int (value,
|
||||
meta_device_get_id (META_DEVICE (object)));
|
||||
break;
|
||||
case PROP_DISPLAY:
|
||||
g_value_set_object (value,
|
||||
meta_device_get_display (META_DEVICE (object)));
|
||||
break;
|
||||
case PROP_PAIRED_DEVICE:
|
||||
g_value_set_object (value,
|
||||
meta_device_get_paired_device (META_DEVICE (object)));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_set_property (GObject *object,
|
||||
guint param_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MetaDevicePrivate *priv = META_DEVICE (object)->priv;
|
||||
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_DEVICE_ID:
|
||||
priv->device_id = g_value_get_int (value);
|
||||
break;
|
||||
case PROP_DISPLAY:
|
||||
priv->display = g_value_get_object (value);
|
||||
break;
|
||||
case PROP_PAIRED_DEVICE:
|
||||
meta_device_pair_devices (META_DEVICE (object),
|
||||
g_value_get_object (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_class_init (MetaDeviceClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->get_property = meta_device_get_property;
|
||||
object_class->set_property = meta_device_set_property;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DEVICE_ID,
|
||||
g_param_spec_int ("device-id",
|
||||
"Device ID",
|
||||
"Device ID",
|
||||
2, G_MAXINT, 2,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DISPLAY,
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"Display",
|
||||
META_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PAIRED_DEVICE,
|
||||
g_param_spec_object ("paired-device",
|
||||
"Paired device",
|
||||
"Paired device",
|
||||
META_TYPE_DEVICE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_type_class_add_private (klass, sizeof (MetaDevicePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_init (MetaDevice *device)
|
||||
{
|
||||
device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device,
|
||||
META_TYPE_DEVICE,
|
||||
MetaDevicePrivate);
|
||||
}
|
||||
|
||||
int
|
||||
meta_device_get_id (MetaDevice *device)
|
||||
{
|
||||
MetaDevicePrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE (device), 0);
|
||||
|
||||
priv = device->priv;
|
||||
return priv->device_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_device_get_display:
|
||||
* @device: a #MetaDevice
|
||||
*
|
||||
* Returns the #MetaDisplay to which the device belongs
|
||||
*
|
||||
* Returns: (transfer none): the #MetaDisplay to which the device belongs
|
||||
**/
|
||||
MetaDisplay *
|
||||
meta_device_get_display (MetaDevice *device)
|
||||
{
|
||||
MetaDevicePrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE (device), NULL);
|
||||
|
||||
priv = device->priv;
|
||||
return priv->display;
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_allow_events (MetaDevice *device,
|
||||
int mode,
|
||||
Time time)
|
||||
{
|
||||
MetaDeviceClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE (device));
|
||||
|
||||
klass = META_DEVICE_GET_CLASS (device);
|
||||
|
||||
if (klass->allow_events)
|
||||
(klass->allow_events) (device, mode, time);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_device_grab (MetaDevice *device,
|
||||
Window xwindow,
|
||||
guint evmask,
|
||||
MetaCursor cursor,
|
||||
gboolean owner_events,
|
||||
gboolean sync,
|
||||
Time time)
|
||||
{
|
||||
MetaDeviceClass *klass;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE (device), FALSE);
|
||||
g_return_val_if_fail (xwindow != None, FALSE);
|
||||
|
||||
klass = META_DEVICE_GET_CLASS (device);
|
||||
|
||||
if (!klass->grab)
|
||||
return FALSE;
|
||||
|
||||
return (klass->grab) (device, xwindow, evmask, cursor,
|
||||
owner_events, sync, time);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_ungrab (MetaDevice *device,
|
||||
Time time)
|
||||
{
|
||||
MetaDeviceClass *klass;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE (device));
|
||||
|
||||
klass = META_DEVICE_GET_CLASS (device);
|
||||
|
||||
if (klass->ungrab)
|
||||
(klass->ungrab) (device, time);
|
||||
}
|
||||
|
||||
void
|
||||
meta_device_pair_devices (MetaDevice *device,
|
||||
MetaDevice *other_device)
|
||||
{
|
||||
MetaDevicePrivate *priv1, *priv2;
|
||||
|
||||
g_return_if_fail (META_IS_DEVICE (device));
|
||||
g_return_if_fail (META_IS_DEVICE (other_device));
|
||||
|
||||
priv1 = device->priv;
|
||||
priv2 = other_device->priv;
|
||||
|
||||
/* Consider safe multiple calls
|
||||
* on already paired devices
|
||||
*/
|
||||
if (priv1->paired_device != NULL &&
|
||||
priv2->paired_device != NULL &&
|
||||
priv1->paired_device == other_device &&
|
||||
priv2->paired_device == device)
|
||||
return;
|
||||
|
||||
g_return_if_fail (priv1->paired_device == NULL);
|
||||
g_return_if_fail (priv2->paired_device == NULL);
|
||||
|
||||
priv1->paired_device = g_object_ref (other_device);
|
||||
priv2->paired_device = g_object_ref (device);
|
||||
|
||||
g_object_notify (G_OBJECT (device), "paired-device");
|
||||
g_object_notify (G_OBJECT (other_device), "paired-device");
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_device_get_paired_device:
|
||||
* @device: a #MetaDevice
|
||||
*
|
||||
* Returns the paired device. Devices come in keyboard/pointer pairs.
|
||||
*
|
||||
* Returns: (transfer none): The paired device.
|
||||
**/
|
||||
MetaDevice *
|
||||
meta_device_get_paired_device (MetaDevice *device)
|
||||
{
|
||||
MetaDevicePrivate *priv;
|
||||
|
||||
g_return_val_if_fail (META_IS_DEVICE (device), NULL);
|
||||
|
||||
priv = device->priv;
|
||||
return priv->paired_device;
|
||||
}
|
@ -1,256 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Core input devices implementation */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "screen-private.h"
|
||||
#include "devices-core.h"
|
||||
#include "device-map-private.h"
|
||||
|
||||
/* Common functions */
|
||||
static void
|
||||
meta_device_core_common_allow_events (MetaDevice *device,
|
||||
int mode,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
XAllowEvents (display->xdisplay, mode, time);
|
||||
}
|
||||
|
||||
/* Core pointer */
|
||||
|
||||
G_DEFINE_TYPE (MetaDevicePointerCore,
|
||||
meta_device_pointer_core,
|
||||
META_TYPE_DEVICE_POINTER)
|
||||
|
||||
static gboolean
|
||||
meta_device_pointer_core_grab (MetaDevice *device,
|
||||
Window xwindow,
|
||||
guint evmask,
|
||||
MetaCursor cursor,
|
||||
gboolean owner_events,
|
||||
gboolean sync,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Cursor xcursor;
|
||||
int retval;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
xcursor = meta_display_create_x_cursor (display, cursor);
|
||||
|
||||
retval = XGrabPointer (display->xdisplay,
|
||||
xwindow, owner_events,
|
||||
evmask,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
None, xcursor, time);
|
||||
|
||||
if (xcursor != None)
|
||||
XFreeCursor (display->xdisplay, xcursor);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_core_ungrab (MetaDevice *device,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
XUngrabPointer (display->xdisplay, time);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_core_warp (MetaDevicePointer *pointer,
|
||||
MetaScreen *screen,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (pointer));
|
||||
XWarpPointer (display->xdisplay,
|
||||
None, screen->xroot,
|
||||
0, 0, 0, 0, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_core_set_window_cursor (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Cursor xcursor;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (pointer));
|
||||
xcursor = meta_display_create_x_cursor (display, cursor);
|
||||
|
||||
XDefineCursor (display->xdisplay, xwindow, xcursor);
|
||||
|
||||
if (xcursor != None)
|
||||
XFreeCursor (display->xdisplay, xcursor);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_device_pointer_core_query_position (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
Window *root,
|
||||
Window *child,
|
||||
gint *root_x,
|
||||
gint *root_y,
|
||||
gint *x,
|
||||
gint *y,
|
||||
guint *mask)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (pointer));
|
||||
return XQueryPointer (display->xdisplay, xwindow,
|
||||
root, child, root_x, root_y,
|
||||
x, y, mask);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_core_class_init (MetaDevicePointerCoreClass *klass)
|
||||
{
|
||||
MetaDevicePointerClass *pointer_class = META_DEVICE_POINTER_CLASS (klass);
|
||||
MetaDeviceClass *device_class = META_DEVICE_CLASS (klass);
|
||||
|
||||
device_class->allow_events = meta_device_core_common_allow_events;
|
||||
device_class->grab = meta_device_pointer_core_grab;
|
||||
device_class->ungrab = meta_device_pointer_core_ungrab;
|
||||
|
||||
pointer_class->warp = meta_device_pointer_core_warp;
|
||||
pointer_class->set_window_cursor = meta_device_pointer_core_set_window_cursor;
|
||||
pointer_class->query_position = meta_device_pointer_core_query_position;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_core_init (MetaDevicePointerCore *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
MetaDevice *
|
||||
meta_device_pointer_core_new (MetaDisplay *display)
|
||||
{
|
||||
return g_object_new (META_TYPE_DEVICE_POINTER_CORE,
|
||||
"device-id", META_CORE_POINTER_ID,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* Core Keyboard */
|
||||
|
||||
G_DEFINE_TYPE (MetaDeviceKeyboardCore,
|
||||
meta_device_keyboard_core,
|
||||
META_TYPE_DEVICE_KEYBOARD)
|
||||
|
||||
static gboolean
|
||||
meta_device_keyboard_core_grab (MetaDevice *device,
|
||||
Window xwindow,
|
||||
guint evmask,
|
||||
MetaCursor cursor,
|
||||
gboolean owner_events,
|
||||
gboolean sync,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
gint retval;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
retval = XGrabKeyboard (display->xdisplay, xwindow, owner_events,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
time);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_core_ungrab (MetaDevice *device,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
XUngrabKeyboard (display->xdisplay, time);
|
||||
}
|
||||
|
||||
static Window
|
||||
meta_device_keyboard_core_get_focus_window (MetaDeviceKeyboard *keyboard)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Window xwindow;
|
||||
int unused;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (keyboard));
|
||||
XGetInputFocus (display->xdisplay, &xwindow, &unused);
|
||||
|
||||
return xwindow;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_core_set_focus_window (MetaDeviceKeyboard *keyboard,
|
||||
Window xwindow,
|
||||
Time timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (keyboard));
|
||||
XSetInputFocus (display->xdisplay,
|
||||
xwindow,
|
||||
RevertToPointerRoot,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_core_class_init (MetaDeviceKeyboardCoreClass *klass)
|
||||
{
|
||||
MetaDeviceKeyboardClass *keyboard_class = META_DEVICE_KEYBOARD_CLASS (klass);
|
||||
MetaDeviceClass *device_class = META_DEVICE_CLASS (klass);
|
||||
|
||||
keyboard_class->get_focus_window = meta_device_keyboard_core_get_focus_window;
|
||||
keyboard_class->set_focus_window = meta_device_keyboard_core_set_focus_window;
|
||||
|
||||
device_class->allow_events = meta_device_core_common_allow_events;
|
||||
device_class->grab = meta_device_keyboard_core_grab;
|
||||
device_class->ungrab = meta_device_keyboard_core_ungrab;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_core_init (MetaDeviceKeyboardCore *keyboard)
|
||||
{
|
||||
}
|
||||
|
||||
MetaDevice *
|
||||
meta_device_keyboard_core_new (MetaDisplay *display)
|
||||
{
|
||||
return g_object_new (META_TYPE_DEVICE_KEYBOARD_CORE,
|
||||
"device-id", META_CORE_KEYBOARD_ID,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file devices-core.h Core input devices implementation
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the core X protocol implementation of input devices.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICES_CORE_H
|
||||
#define META_DEVICES_CORE_H
|
||||
|
||||
#include "device-pointer.h"
|
||||
#include "device-keyboard.h"
|
||||
|
||||
/* Pointer */
|
||||
#define META_TYPE_DEVICE_POINTER_CORE (meta_device_pointer_core_get_type ())
|
||||
#define META_DEVICE_POINTER_CORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_POINTER_CORE, MetaDevicePointerCore))
|
||||
#define META_DEVICE_POINTER_CORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_POINTER_CORE, MetaDevicePointerCoreClass))
|
||||
#define META_IS_DEVICE_POINTER_CORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_POINTER_CORE))
|
||||
#define META_IS_DEVICE_POINTER_CORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_POINTER_CORE))
|
||||
#define META_DEVICE_POINTER_CORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_POINTER_CORE, MetaDevicePointerCoreClass))
|
||||
|
||||
typedef struct _MetaDevicePointerCore MetaDevicePointerCore;
|
||||
typedef struct _MetaDevicePointerCoreClass MetaDevicePointerCoreClass;
|
||||
|
||||
struct _MetaDevicePointerCore
|
||||
{
|
||||
MetaDevicePointer parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDevicePointerCoreClass
|
||||
{
|
||||
MetaDevicePointerClass parent_class;
|
||||
};
|
||||
|
||||
GType meta_device_pointer_core_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaDevice *meta_device_pointer_core_new (MetaDisplay *display);
|
||||
|
||||
/* Keyboard */
|
||||
#define META_TYPE_DEVICE_KEYBOARD_CORE (meta_device_keyboard_core_get_type ())
|
||||
#define META_DEVICE_KEYBOARD_CORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_KEYBOARD_CORE, MetaDeviceKeyboardCore))
|
||||
#define META_DEVICE_KEYBOARD_CORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_KEYBOARD_CORE, MetaDeviceKeyboardCoreClass))
|
||||
#define META_IS_DEVICE_KEYBOARD_CORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_KEYBOARD_CORE))
|
||||
#define META_IS_DEVICE_KEYBOARD_CORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_KEYBOARD_CORE))
|
||||
#define META_DEVICE_KEYBOARD_CORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_KEYBOARD_CORE, MetaDeviceKeyboardCoreClass))
|
||||
|
||||
typedef struct _MetaDeviceKeyboardCore MetaDeviceKeyboardCore;
|
||||
typedef struct _MetaDeviceKeyboardCoreClass MetaDeviceKeyboardCoreClass;
|
||||
|
||||
struct _MetaDeviceKeyboardCore
|
||||
{
|
||||
MetaDeviceKeyboard parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDeviceKeyboardCoreClass
|
||||
{
|
||||
MetaDeviceKeyboardClass parent_class;
|
||||
};
|
||||
|
||||
GType meta_device_keyboard_core_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaDevice *meta_device_keyboard_core_new (MetaDisplay *display);
|
||||
|
||||
#endif /* META_DEVICES_CORE_H */
|
@ -1,343 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* XInput2 devices implementation */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "devices-xi2.h"
|
||||
#include "display-private.h"
|
||||
#include "screen-private.h"
|
||||
#include <X11/extensions/XInput2.h>
|
||||
|
||||
/* Common functions */
|
||||
static void
|
||||
meta_device_xi2_common_allow_events (MetaDevice *device,
|
||||
int mode,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
gint device_id;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
device_id = meta_device_get_id (device);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case AsyncPointer:
|
||||
case AsyncKeyboard:
|
||||
mode = XIAsyncDevice;
|
||||
break;
|
||||
case SyncPointer:
|
||||
case SyncKeyboard:
|
||||
mode = XISyncDevice;
|
||||
break;
|
||||
case ReplayPointer:
|
||||
case ReplayKeyboard:
|
||||
mode = XIReplayDevice;
|
||||
break;
|
||||
case AsyncBoth:
|
||||
mode = XIAsyncPair;
|
||||
break;
|
||||
case SyncBoth:
|
||||
mode = XISyncPair;
|
||||
break;
|
||||
}
|
||||
|
||||
XIAllowEvents (display->xdisplay, device_id, mode, time);
|
||||
}
|
||||
|
||||
guchar *
|
||||
meta_device_xi2_translate_event_mask (guint evmask,
|
||||
gint *len)
|
||||
{
|
||||
guchar *mask;
|
||||
|
||||
*len = XIMaskLen (XI_LASTEVENT);
|
||||
mask = g_new0 (guchar, *len);
|
||||
|
||||
if (evmask & KeyPressMask)
|
||||
XISetMask (mask, XI_KeyPress);
|
||||
if (evmask & KeyReleaseMask)
|
||||
XISetMask (mask, XI_KeyRelease);
|
||||
if (evmask & ButtonPressMask)
|
||||
XISetMask (mask, XI_ButtonPress);
|
||||
if (evmask & ButtonReleaseMask)
|
||||
XISetMask (mask, XI_ButtonRelease);
|
||||
if (evmask & EnterWindowMask)
|
||||
XISetMask (mask, XI_Enter);
|
||||
if (evmask & LeaveWindowMask)
|
||||
XISetMask (mask, XI_Leave);
|
||||
|
||||
/* No motion hints in XI2 at the moment... */
|
||||
if (evmask & PointerMotionMask ||
|
||||
evmask & PointerMotionHintMask)
|
||||
XISetMask (mask, XI_Motion);
|
||||
|
||||
if (evmask & FocusChangeMask)
|
||||
{
|
||||
XISetMask (mask, XI_FocusIn);
|
||||
XISetMask (mask, XI_FocusOut);
|
||||
}
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_device_xi2_common_grab (MetaDevice *device,
|
||||
Window xwindow,
|
||||
guint evmask,
|
||||
MetaCursor cursor,
|
||||
gboolean owner_events,
|
||||
gboolean sync,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
XIEventMask mask;
|
||||
gint device_id, retval;
|
||||
Cursor xcursor;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
device_id = meta_device_get_id (device);
|
||||
xcursor = meta_display_create_x_cursor (display, cursor);
|
||||
|
||||
mask.deviceid = device_id;
|
||||
mask.mask = meta_device_xi2_translate_event_mask (evmask, &mask.mask_len);
|
||||
|
||||
retval = XIGrabDevice (display->xdisplay,
|
||||
device_id, xwindow,
|
||||
time, xcursor,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
(sync) ? GrabModeSync : GrabModeAsync,
|
||||
owner_events, &mask);
|
||||
|
||||
if (xcursor != None)
|
||||
XFreeCursor (display->xdisplay, xcursor);
|
||||
|
||||
return (retval == Success);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_xi2_common_ungrab (MetaDevice *device,
|
||||
Time time)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
gint device_id;
|
||||
|
||||
display = meta_device_get_display (device);
|
||||
device_id = meta_device_get_id (device);
|
||||
|
||||
XIUngrabDevice (display->xdisplay, device_id, time);
|
||||
}
|
||||
|
||||
/* Pointer */
|
||||
|
||||
G_DEFINE_TYPE (MetaDevicePointerXI2,
|
||||
meta_device_pointer_xi2,
|
||||
META_TYPE_DEVICE_POINTER)
|
||||
|
||||
static void
|
||||
meta_device_pointer_xi2_warp (MetaDevicePointer *pointer,
|
||||
MetaScreen *screen,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
int device_id;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (pointer));
|
||||
device_id = meta_device_get_id (META_DEVICE (pointer));
|
||||
|
||||
XIWarpPointer (display->xdisplay,
|
||||
device_id,
|
||||
None, screen->xroot,
|
||||
0, 0, 0, 0, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_xi2_set_window_cursor (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Cursor xcursor;
|
||||
int device_id;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (pointer));
|
||||
device_id = meta_device_get_id (META_DEVICE (pointer));
|
||||
xcursor = meta_display_create_x_cursor (display, cursor);
|
||||
|
||||
if (xcursor != None)
|
||||
{
|
||||
XIDefineCursor (display->xdisplay, device_id, xwindow, xcursor);
|
||||
XFreeCursor (display->xdisplay, xcursor);
|
||||
}
|
||||
else
|
||||
XIUndefineCursor (display->xdisplay, device_id, xwindow);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_device_pointer_xi2_query_position (MetaDevicePointer *pointer,
|
||||
Window xwindow,
|
||||
Window *root_ret,
|
||||
Window *child_ret,
|
||||
gint *root_x_ret,
|
||||
gint *root_y_ret,
|
||||
gint *x_ret,
|
||||
gint *y_ret,
|
||||
guint *mask_ret)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
XIModifierState mods;
|
||||
XIGroupState group_unused;
|
||||
XIButtonState buttons;
|
||||
gdouble root_x, root_y, x, y;
|
||||
int device_id;
|
||||
gboolean retval;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (pointer));
|
||||
device_id = meta_device_get_id (META_DEVICE (pointer));
|
||||
|
||||
retval = XIQueryPointer (display->xdisplay,
|
||||
device_id, xwindow,
|
||||
root_ret, child_ret,
|
||||
&root_x, &root_y, &x, &y,
|
||||
&buttons, &mods,
|
||||
&group_unused);
|
||||
if (mask_ret)
|
||||
{
|
||||
*mask_ret = mods.effective;
|
||||
|
||||
if (XIMaskIsSet (buttons.mask, 1))
|
||||
*mask_ret |= Button1Mask;
|
||||
else if (XIMaskIsSet (buttons.mask, 2))
|
||||
*mask_ret |= Button2Mask;
|
||||
else if (XIMaskIsSet (buttons.mask, 3))
|
||||
*mask_ret |= Button3Mask;
|
||||
}
|
||||
|
||||
if (root_x_ret)
|
||||
*root_x_ret = (int) root_x;
|
||||
|
||||
if (root_y_ret)
|
||||
*root_y_ret = (int) root_y;
|
||||
|
||||
if (x_ret)
|
||||
*x_ret = (int) x;
|
||||
|
||||
if (y_ret)
|
||||
*y_ret = (int) y;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_xi2_class_init (MetaDevicePointerXI2Class *klass)
|
||||
{
|
||||
MetaDevicePointerClass *pointer_class = META_DEVICE_POINTER_CLASS (klass);
|
||||
MetaDeviceClass *device_class = META_DEVICE_CLASS (klass);
|
||||
|
||||
device_class->allow_events = meta_device_xi2_common_allow_events;
|
||||
device_class->grab = meta_device_xi2_common_grab;
|
||||
device_class->ungrab = meta_device_xi2_common_ungrab;
|
||||
|
||||
pointer_class->warp = meta_device_pointer_xi2_warp;
|
||||
pointer_class->set_window_cursor = meta_device_pointer_xi2_set_window_cursor;
|
||||
pointer_class->query_position = meta_device_pointer_xi2_query_position;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_pointer_xi2_init (MetaDevicePointerXI2 *pointer)
|
||||
{
|
||||
}
|
||||
|
||||
MetaDevice *
|
||||
meta_device_pointer_xi2_new (MetaDisplay *display,
|
||||
gint device_id)
|
||||
{
|
||||
return g_object_new (META_TYPE_DEVICE_POINTER_XI2,
|
||||
"device-id", device_id,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/* Keyboard */
|
||||
|
||||
G_DEFINE_TYPE (MetaDeviceKeyboardXI2,
|
||||
meta_device_keyboard_xi2,
|
||||
META_TYPE_DEVICE_KEYBOARD)
|
||||
|
||||
static Window
|
||||
meta_device_keyboard_xi2_get_focus_window (MetaDeviceKeyboard *keyboard)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Window xwindow;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (keyboard));
|
||||
XIGetFocus (display->xdisplay,
|
||||
meta_device_get_id (META_DEVICE (keyboard)),
|
||||
&xwindow);
|
||||
|
||||
return xwindow;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_xi2_set_focus_window (MetaDeviceKeyboard *keyboard,
|
||||
Window xwindow,
|
||||
Time timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_device_get_display (META_DEVICE (keyboard));
|
||||
|
||||
XISetFocus (display->xdisplay,
|
||||
meta_device_get_id (META_DEVICE (keyboard)),
|
||||
xwindow,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_xi2_class_init (MetaDeviceKeyboardXI2Class *klass)
|
||||
{
|
||||
MetaDeviceKeyboardClass *keyboard_class = META_DEVICE_KEYBOARD_CLASS (klass);
|
||||
MetaDeviceClass *device_class = META_DEVICE_CLASS (klass);
|
||||
|
||||
keyboard_class->get_focus_window = meta_device_keyboard_xi2_get_focus_window;
|
||||
keyboard_class->set_focus_window = meta_device_keyboard_xi2_set_focus_window;
|
||||
|
||||
device_class->allow_events = meta_device_xi2_common_allow_events;
|
||||
device_class->grab = meta_device_xi2_common_grab;
|
||||
device_class->ungrab = meta_device_xi2_common_ungrab;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_device_keyboard_xi2_init (MetaDeviceKeyboardXI2 *keyboard)
|
||||
{
|
||||
}
|
||||
|
||||
MetaDevice *
|
||||
meta_device_keyboard_xi2_new (MetaDisplay *display,
|
||||
gint device_id)
|
||||
{
|
||||
return g_object_new (META_TYPE_DEVICE_KEYBOARD_XI2,
|
||||
"device-id", device_id,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file devices-xi2.h XInput2 input devices implementation
|
||||
*
|
||||
* Input devices.
|
||||
* This file contains the XInput2 implementation of input devices.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICES_XI2_H
|
||||
#define META_DEVICES_XI2_H
|
||||
|
||||
#include "device-pointer.h"
|
||||
#include "device-keyboard.h"
|
||||
|
||||
/* Pointer */
|
||||
#define META_TYPE_DEVICE_POINTER_XI2 (meta_device_pointer_xi2_get_type ())
|
||||
#define META_DEVICE_POINTER_XI2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_POINTER_XI2, MetaDevicePointerXI2))
|
||||
#define META_DEVICE_POINTER_XI2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_POINTER_XI2, MetaDevicePointerXI2Class))
|
||||
#define META_IS_DEVICE_POINTER_XI2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_POINTER_XI2))
|
||||
#define META_IS_DEVICE_POINTER_XI2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_POINTER_XI2))
|
||||
#define META_DEVICE_POINTER_XI2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_POINTER_XI2, MetaDevicePointerXI2Class))
|
||||
|
||||
typedef struct _MetaDevicePointerXI2 MetaDevicePointerXI2;
|
||||
typedef struct _MetaDevicePointerXI2Class MetaDevicePointerXI2Class;
|
||||
|
||||
struct _MetaDevicePointerXI2
|
||||
{
|
||||
MetaDevicePointer parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDevicePointerXI2Class
|
||||
{
|
||||
MetaDevicePointerClass parent_class;
|
||||
};
|
||||
|
||||
GType meta_device_pointer_xi2_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaDevice *meta_device_pointer_xi2_new (MetaDisplay *display,
|
||||
gint device_id);
|
||||
|
||||
/* Keyboard */
|
||||
#define META_TYPE_DEVICE_KEYBOARD_XI2 (meta_device_keyboard_xi2_get_type ())
|
||||
#define META_DEVICE_KEYBOARD_XI2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_KEYBOARD_XI2, MetaDeviceKeyboardXI2))
|
||||
#define META_DEVICE_KEYBOARD_XI2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_KEYBOARD_XI2, MetaDeviceKeyboardXI2Class))
|
||||
#define META_IS_DEVICE_KEYBOARD_XI2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_KEYBOARD_XI2))
|
||||
#define META_IS_DEVICE_KEYBOARD_XI2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_KEYBOARD_XI2))
|
||||
#define META_DEVICE_KEYBOARD_XI2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_KEYBOARD_XI2, MetaDeviceKeyboardXI2Class))
|
||||
|
||||
typedef struct _MetaDeviceKeyboardXI2 MetaDeviceKeyboardXI2;
|
||||
typedef struct _MetaDeviceKeyboardXI2Class MetaDeviceKeyboardXI2Class;
|
||||
|
||||
struct _MetaDeviceKeyboardXI2
|
||||
{
|
||||
MetaDeviceKeyboard parent_instance;
|
||||
};
|
||||
|
||||
struct _MetaDeviceKeyboardXI2Class
|
||||
{
|
||||
MetaDeviceKeyboardClass parent_class;
|
||||
};
|
||||
|
||||
GType meta_device_keyboard_xi2_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaDevice *meta_device_keyboard_xi2_new (MetaDisplay *display,
|
||||
gint device_id);
|
||||
|
||||
/* Helper function for translating event masks */
|
||||
guchar * meta_device_xi2_translate_event_mask (guint evmask,
|
||||
gint *len);
|
||||
|
||||
|
||||
#endif /* META_DEVICES_XI2_H */
|
@ -38,7 +38,6 @@
|
||||
#include <meta/boxes.h>
|
||||
#include <meta/display.h>
|
||||
#include "keybindings-private.h"
|
||||
#include "device-map-private.h"
|
||||
#include <meta/prefs.h>
|
||||
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
@ -57,9 +56,6 @@ typedef struct _MetaWindowPropHooks MetaWindowPropHooks;
|
||||
|
||||
typedef struct MetaEdgeResistanceData MetaEdgeResistanceData;
|
||||
|
||||
typedef struct _MetaGrabInfo MetaGrabInfo;
|
||||
typedef struct _MetaFocusInfo MetaFocusInfo;
|
||||
|
||||
typedef void (* MetaWindowPingFunc) (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
guint32 timestamp,
|
||||
@ -88,65 +84,6 @@ typedef enum {
|
||||
META_TILE_MAXIMIZED
|
||||
} MetaTileMode;
|
||||
|
||||
struct _MetaGrabInfo
|
||||
{
|
||||
MetaDevice *grab_pointer;
|
||||
MetaDevice *grab_keyboard;
|
||||
|
||||
MetaGrabOp grab_op;
|
||||
MetaScreen *grab_screen;
|
||||
MetaWindow *grab_window;
|
||||
Window grab_xwindow;
|
||||
int grab_button;
|
||||
int grab_anchor_root_x;
|
||||
int grab_anchor_root_y;
|
||||
MetaRectangle grab_anchor_window_pos;
|
||||
MetaTileMode grab_tile_mode;
|
||||
int grab_latest_motion_x;
|
||||
int grab_latest_motion_y;
|
||||
gulong grab_mask;
|
||||
guint grab_have_pointer : 1;
|
||||
guint grab_have_keyboard : 1;
|
||||
guint grab_frame_action : 1;
|
||||
/* During a resize operation, the directions in which we've broken
|
||||
* out of the initial maximization state */
|
||||
guint grab_resize_unmaximize : 2; /* MetaMaximizeFlags */
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
int grab_initial_x, grab_initial_y; /* These are only relevant for */
|
||||
gboolean grab_threshold_movement_reached; /* raise_on_click == FALSE. */
|
||||
MetaResizePopup *grab_resize_popup;
|
||||
GTimeVal grab_last_moveresize_time;
|
||||
guint32 grab_motion_notify_time;
|
||||
GList* grab_old_window_stacking;
|
||||
unsigned int grab_last_user_action_was_snap;
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
/* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
|
||||
XSyncAlarm grab_sync_request_alarm;
|
||||
#endif
|
||||
int grab_resize_timeout_id;
|
||||
};
|
||||
|
||||
struct _MetaFocusInfo
|
||||
{
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
*/
|
||||
MetaWindow *focus_window;
|
||||
|
||||
/* window we are expecting a FocusIn event for or the current focus
|
||||
* window if we are not expecting any FocusIn/FocusOut events; not
|
||||
* perfect because applications can call XSetInputFocus directly.
|
||||
* (It could also be messed up if a timestamp later than current
|
||||
* time is sent to meta_display_set_input_focus_window, though that
|
||||
* would be a programming error). See bug 154598 for more info.
|
||||
*/
|
||||
MetaWindow *expected_focus_window;
|
||||
|
||||
/* last timestamp passed to XSetInputFocus */
|
||||
guint32 last_focus_time;
|
||||
};
|
||||
|
||||
struct _MetaDisplay
|
||||
{
|
||||
GObject parent_instance;
|
||||
@ -165,8 +102,22 @@ struct _MetaDisplay
|
||||
#include <meta/atomnames.h>
|
||||
#undef item
|
||||
|
||||
/* keyboard -> MetaFocusInfo hashtable */
|
||||
GHashTable *focus_info;
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
*/
|
||||
MetaWindow *focus_window;
|
||||
|
||||
/* window we are expecting a FocusIn event for or the current focus
|
||||
* window if we are not expecting any FocusIn/FocusOut events; not
|
||||
* perfect because applications can call XSetInputFocus directly.
|
||||
* (It could also be messed up if a timestamp later than current
|
||||
* time is sent to meta_display_set_input_focus_window, though that
|
||||
* would be a programming error). See bug 154598 for more info.
|
||||
*/
|
||||
MetaWindow *expected_focus_window;
|
||||
|
||||
/* last timestamp passed to XSetInputFocus */
|
||||
guint32 last_focus_time;
|
||||
|
||||
/* last user interaction time in any app */
|
||||
guint32 last_user_time;
|
||||
@ -226,11 +177,34 @@ struct _MetaDisplay
|
||||
/* Alt+click button grabs */
|
||||
unsigned int window_grab_modifiers;
|
||||
|
||||
/* per-device current window operation */
|
||||
GHashTable *current_grabs;
|
||||
|
||||
/* per-screen edge resistance cache */
|
||||
GHashTable *edge_resistance_info;
|
||||
/* current window operation */
|
||||
MetaGrabOp grab_op;
|
||||
MetaScreen *grab_screen;
|
||||
MetaWindow *grab_window;
|
||||
Window grab_xwindow;
|
||||
int grab_button;
|
||||
int grab_anchor_root_x;
|
||||
int grab_anchor_root_y;
|
||||
MetaRectangle grab_anchor_window_pos;
|
||||
MetaTileMode grab_tile_mode;
|
||||
int grab_latest_motion_x;
|
||||
int grab_latest_motion_y;
|
||||
gulong grab_mask;
|
||||
guint grab_have_pointer : 1;
|
||||
guint grab_have_keyboard : 1;
|
||||
guint grab_frame_action : 1;
|
||||
/* During a resize operation, the directions in which we've broken
|
||||
* out of the initial maximization state */
|
||||
guint grab_resize_unmaximize : 2; /* MetaMaximizeFlags */
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
int grab_initial_x, grab_initial_y; /* These are only relevant for */
|
||||
gboolean grab_threshold_movement_reached; /* raise_on_click == FALSE. */
|
||||
MetaResizePopup *grab_resize_popup;
|
||||
GTimeVal grab_last_moveresize_time;
|
||||
guint32 grab_motion_notify_time;
|
||||
GList* grab_old_window_stacking;
|
||||
MetaEdgeResistanceData *grab_edge_resistance_data;
|
||||
unsigned int grab_last_user_action_was_snap;
|
||||
|
||||
/* we use property updates as sentinels for certain window focus events
|
||||
* to avoid some race conditions on EnterNotify events
|
||||
@ -241,6 +215,11 @@ struct _MetaDisplay
|
||||
int xkb_base_event_type;
|
||||
guint32 last_bell_time;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
/* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
|
||||
XSyncAlarm grab_sync_request_alarm;
|
||||
#endif
|
||||
int grab_resize_timeout_id;
|
||||
|
||||
/* Keybindings stuff */
|
||||
MetaKeyBinding *key_bindings;
|
||||
@ -287,9 +266,6 @@ struct _MetaDisplay
|
||||
/* Managed by compositor.c */
|
||||
MetaCompositor *compositor;
|
||||
|
||||
/* Managed by device-map.c */
|
||||
MetaDeviceMap *device_map;
|
||||
|
||||
int render_event_base;
|
||||
int render_error_base;
|
||||
|
||||
@ -313,12 +289,6 @@ struct _MetaDisplay
|
||||
int shape_event_base;
|
||||
int shape_error_base;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
int xinput2_opcode;
|
||||
unsigned int have_xinput2 : 1;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
unsigned int have_xsync : 1;
|
||||
#define META_DISPLAY_HAS_XSYNC(display) ((display)->have_xsync)
|
||||
@ -408,14 +378,12 @@ Cursor meta_display_create_x_cursor (MetaDisplay *display,
|
||||
|
||||
void meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaDevice *device,
|
||||
MetaGrabOp op,
|
||||
gboolean change_pointer,
|
||||
Window grab_xwindow,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_check_threshold_reached (MetaDisplay *display,
|
||||
MetaDevice *device,
|
||||
int x,
|
||||
int y);
|
||||
void meta_display_grab_window_buttons (MetaDisplay *display,
|
||||
@ -429,8 +397,7 @@ void meta_display_ungrab_focus_window_button (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
|
||||
/* Next function is defined in edge-resistance.c */
|
||||
void meta_display_cleanup_edges (MetaDisplay *display,
|
||||
MetaScreen *screen);
|
||||
void meta_display_cleanup_edges (MetaDisplay *display);
|
||||
|
||||
/* make a request to ensure the event serial has changed */
|
||||
void meta_display_increment_event_serial (MetaDisplay *display);
|
||||
@ -478,15 +445,4 @@ void meta_display_overlay_key_activate (MetaDisplay *display);
|
||||
/* In above-tab-keycode.c */
|
||||
guint meta_display_get_above_tab_keycode (MetaDisplay *display);
|
||||
|
||||
MetaGrabInfo * meta_display_create_grab_info (MetaDisplay *display,
|
||||
MetaDevice *device);
|
||||
void meta_display_remove_grab_info (MetaDisplay *display,
|
||||
MetaDevice *device);
|
||||
|
||||
MetaGrabInfo * meta_display_get_grab_info (MetaDisplay *display,
|
||||
MetaDevice *device);
|
||||
MetaFocusInfo * meta_display_get_focus_info (MetaDisplay *display,
|
||||
MetaDevice *device);
|
||||
|
||||
|
||||
#endif
|
||||
|
2882
src/core/display.c
2882
src/core/display.c
File diff suppressed because it is too large
Load Diff
@ -30,12 +30,12 @@
|
||||
/* A simple macro for whether a given window's edges are potentially
|
||||
* relevant for resistance/snapping during a move/resize operation
|
||||
*/
|
||||
#define WINDOW_EDGES_RELEVANT(window, display, screen) \
|
||||
meta_window_should_be_showing (window) && \
|
||||
window->screen == screen && \
|
||||
window->cur_grab == NULL && \
|
||||
window->type != META_WINDOW_DESKTOP && \
|
||||
window->type != META_WINDOW_MENU && \
|
||||
#define WINDOW_EDGES_RELEVANT(window, display) \
|
||||
meta_window_should_be_showing (window) && \
|
||||
window->screen == display->grab_screen && \
|
||||
window != display->grab_window && \
|
||||
window->type != META_WINDOW_DESKTOP && \
|
||||
window->type != META_WINDOW_MENU && \
|
||||
window->type != META_WINDOW_SPLASHSCREEN
|
||||
|
||||
struct ResistanceDataForAnEdge
|
||||
@ -44,9 +44,8 @@ struct ResistanceDataForAnEdge
|
||||
guint timeout_id;
|
||||
int timeout_edge_pos;
|
||||
gboolean timeout_over;
|
||||
MetaEdgeResistanceFunc timeout_func;
|
||||
GSourceFunc timeout_func;
|
||||
MetaWindow *window;
|
||||
MetaDevice *device;
|
||||
int keyboard_buildup;
|
||||
};
|
||||
typedef struct ResistanceDataForAnEdge ResistanceDataForAnEdge;
|
||||
@ -64,9 +63,7 @@ struct MetaEdgeResistanceData
|
||||
ResistanceDataForAnEdge bottom_data;
|
||||
};
|
||||
|
||||
static MetaEdgeResistanceData *
|
||||
compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
MetaScreen *screen);
|
||||
static void compute_resistance_and_snapping_edges (MetaDisplay *display);
|
||||
|
||||
/* !WARNING!: this function can return invalid indices (namely, either -1 or
|
||||
* edges->len); this is by design, but you need to remember this.
|
||||
@ -321,22 +318,20 @@ edge_resistance_timeout (gpointer data)
|
||||
|
||||
resistance_data->timeout_over = TRUE;
|
||||
resistance_data->timeout_id = 0;
|
||||
(*resistance_data->timeout_func) (resistance_data->window,
|
||||
resistance_data->device);
|
||||
(*resistance_data->timeout_func)(resistance_data->window);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
apply_edge_resistance (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
int old_pos,
|
||||
int new_pos,
|
||||
const MetaRectangle *old_rect,
|
||||
const MetaRectangle *new_rect,
|
||||
GArray *edges,
|
||||
ResistanceDataForAnEdge *resistance_data,
|
||||
MetaEdgeResistanceFunc timeout_func,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean xdir,
|
||||
gboolean keyboard_op)
|
||||
{
|
||||
@ -450,7 +445,6 @@ apply_edge_resistance (MetaWindow *window,
|
||||
resistance_data->timeout_over = FALSE;
|
||||
resistance_data->timeout_func = timeout_func;
|
||||
resistance_data->window = window;
|
||||
resistance_data->device = device;
|
||||
}
|
||||
if (!resistance_data->timeout_over &&
|
||||
timeout_length_ms != 0)
|
||||
@ -539,28 +533,29 @@ apply_edge_snapping (int old_pos,
|
||||
* a proposed new position (ignoring edge resistance/snapping), and then
|
||||
* applies edge resistance to EACH edge (separately) updating new_outer.
|
||||
* It returns true if new_outer is modified, false otherwise.
|
||||
*
|
||||
* display->grab_edge_resistance_data MUST already be setup or calling this
|
||||
* function will cause a crash.
|
||||
*/
|
||||
static gboolean
|
||||
apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
const MetaRectangle *old_outer,
|
||||
MetaRectangle *new_outer,
|
||||
MetaEdgeResistanceFunc timeout_func,
|
||||
gboolean auto_snap,
|
||||
gboolean keyboard_op,
|
||||
gboolean is_resize)
|
||||
apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
const MetaRectangle *old_outer,
|
||||
MetaRectangle *new_outer,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean auto_snap,
|
||||
gboolean keyboard_op,
|
||||
gboolean is_resize)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
MetaRectangle modified_rect;
|
||||
gboolean modified;
|
||||
int new_left, new_right, new_top, new_bottom;
|
||||
|
||||
edge_data = g_hash_table_lookup (display->edge_resistance_info,
|
||||
window->screen);
|
||||
if (display->grab_edge_resistance_data == NULL)
|
||||
compute_resistance_and_snapping_edges (display);
|
||||
|
||||
if (!edge_data)
|
||||
edge_data = compute_resistance_and_snapping_edges (display, window->screen);
|
||||
edge_data = display->grab_edge_resistance_data;
|
||||
|
||||
if (auto_snap)
|
||||
{
|
||||
@ -606,7 +601,7 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
if (!is_resize || window->size_hints.width_inc == 1)
|
||||
{
|
||||
/* Now, apply the normal horizontal edge resistance */
|
||||
new_left = apply_edge_resistance (window, device,
|
||||
new_left = apply_edge_resistance (window,
|
||||
BOX_LEFT (*old_outer),
|
||||
BOX_LEFT (*new_outer),
|
||||
old_outer,
|
||||
@ -616,7 +611,7 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_right = apply_edge_resistance (window, device,
|
||||
new_right = apply_edge_resistance (window,
|
||||
BOX_RIGHT (*old_outer),
|
||||
BOX_RIGHT (*new_outer),
|
||||
old_outer,
|
||||
@ -635,7 +630,7 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
/* Same for vertical resizes... */
|
||||
if (!is_resize || window->size_hints.height_inc == 1)
|
||||
{
|
||||
new_top = apply_edge_resistance (window, device,
|
||||
new_top = apply_edge_resistance (window,
|
||||
BOX_TOP (*old_outer),
|
||||
BOX_TOP (*new_outer),
|
||||
old_outer,
|
||||
@ -645,7 +640,7 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
new_bottom = apply_edge_resistance (window, device,
|
||||
new_bottom = apply_edge_resistance (window,
|
||||
BOX_BOTTOM (*old_outer),
|
||||
BOX_BOTTOM (*new_outer),
|
||||
old_outer,
|
||||
@ -674,20 +669,15 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_cleanup_edges (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
meta_display_cleanup_edges (MetaDisplay *display)
|
||||
{
|
||||
guint i,j;
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
MetaEdgeResistanceData *edge_data = display->grab_edge_resistance_data;
|
||||
GHashTable *edges_to_be_freed;
|
||||
|
||||
edge_data = g_hash_table_lookup (display->edge_resistance_info, screen);
|
||||
|
||||
if (edge_data == NULL) /* Not currently cached */
|
||||
return;
|
||||
|
||||
g_hash_table_steal (display->edge_resistance_info, screen);
|
||||
|
||||
/* We first need to clean out any window edges */
|
||||
edges_to_be_freed = g_hash_table_new_full (g_direct_hash, g_direct_equal,
|
||||
g_free, NULL);
|
||||
@ -760,7 +750,8 @@ meta_display_cleanup_edges (MetaDisplay *display,
|
||||
edge_data->bottom_data.timeout_id != 0)
|
||||
g_source_remove (edge_data->bottom_data.timeout_id);
|
||||
|
||||
g_free (edge_data);
|
||||
g_free (display->grab_edge_resistance_data);
|
||||
display->grab_edge_resistance_data = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -772,9 +763,8 @@ stupid_sort_requiring_extra_pointer_dereference (gconstpointer a,
|
||||
return meta_rectangle_edge_cmp_ignore_type (*a_edge, *b_edge);
|
||||
}
|
||||
|
||||
static MetaEdgeResistanceData *
|
||||
static void
|
||||
cache_edges (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
GList *window_edges,
|
||||
GList *monitor_edges,
|
||||
GList *screen_edges)
|
||||
@ -858,8 +848,9 @@ cache_edges (MetaDisplay *display,
|
||||
/*
|
||||
* 2nd: Allocate the edges
|
||||
*/
|
||||
edge_data = g_new0 (MetaEdgeResistanceData, 1);
|
||||
|
||||
g_assert (display->grab_edge_resistance_data == NULL);
|
||||
display->grab_edge_resistance_data = g_new0 (MetaEdgeResistanceData, 1);
|
||||
edge_data = display->grab_edge_resistance_data;
|
||||
edge_data->left_edges = g_array_sized_new (FALSE,
|
||||
FALSE,
|
||||
sizeof(MetaEdge*),
|
||||
@ -926,21 +917,21 @@ cache_edges (MetaDisplay *display,
|
||||
* avoided this sort by sticking them into the array with some simple
|
||||
* merging of the lists).
|
||||
*/
|
||||
g_array_sort (edge_data->left_edges,
|
||||
g_array_sort (display->grab_edge_resistance_data->left_edges,
|
||||
stupid_sort_requiring_extra_pointer_dereference);
|
||||
g_array_sort (edge_data->right_edges,
|
||||
g_array_sort (display->grab_edge_resistance_data->right_edges,
|
||||
stupid_sort_requiring_extra_pointer_dereference);
|
||||
g_array_sort (edge_data->top_edges,
|
||||
g_array_sort (display->grab_edge_resistance_data->top_edges,
|
||||
stupid_sort_requiring_extra_pointer_dereference);
|
||||
g_array_sort (edge_data->bottom_edges,
|
||||
g_array_sort (display->grab_edge_resistance_data->bottom_edges,
|
||||
stupid_sort_requiring_extra_pointer_dereference);
|
||||
|
||||
return edge_data;
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_grab_edge_resistance_data (MetaEdgeResistanceData *edge_data)
|
||||
initialize_grab_edge_resistance_data (MetaDisplay *display)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data = display->grab_edge_resistance_data;
|
||||
|
||||
edge_data->left_data.timeout_setup = FALSE;
|
||||
edge_data->right_data.timeout_setup = FALSE;
|
||||
edge_data->top_data.timeout_setup = FALSE;
|
||||
@ -952,9 +943,8 @@ initialize_grab_edge_resistance_data (MetaEdgeResistanceData *edge_data)
|
||||
edge_data->bottom_data.keyboard_buildup = 0;
|
||||
}
|
||||
|
||||
static MetaEdgeResistanceData *
|
||||
compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
static void
|
||||
compute_resistance_and_snapping_edges (MetaDisplay *display)
|
||||
{
|
||||
GList *stacked_windows;
|
||||
GList *cur_window_iter;
|
||||
@ -966,17 +956,18 @@ compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
* in the layer that we are working on
|
||||
*/
|
||||
GSList *rem_windows, *rem_win_stacking;
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
|
||||
g_assert (display->grab_window != NULL);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Computing edges to resist-movement or snap-to for screen %s.\n",
|
||||
screen->screen_name);
|
||||
"Computing edges to resist-movement or snap-to for %s.\n",
|
||||
display->grab_window->desc);
|
||||
|
||||
/*
|
||||
* 1st: Get the list of relevant windows, from bottom to top
|
||||
*/
|
||||
stacked_windows =
|
||||
meta_stack_list_windows (screen->stack, screen->active_workspace);
|
||||
meta_stack_list_windows (display->grab_screen->stack,
|
||||
display->grab_screen->active_workspace);
|
||||
|
||||
/*
|
||||
* 2nd: we need to separate that stacked list into a list of windows that
|
||||
@ -990,7 +981,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
while (cur_window_iter != NULL)
|
||||
{
|
||||
MetaWindow *cur_window = cur_window_iter->data;
|
||||
if (WINDOW_EDGES_RELEVANT (cur_window, display, screen))
|
||||
if (WINDOW_EDGES_RELEVANT (cur_window, display))
|
||||
{
|
||||
MetaRectangle *new_rect;
|
||||
new_rect = g_new (MetaRectangle, 1);
|
||||
@ -1025,7 +1016,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
* resistance (note that dock edges are considered screen edges
|
||||
* which are handled separately
|
||||
*/
|
||||
if (WINDOW_EDGES_RELEVANT (cur_window, display, screen) &&
|
||||
if (WINDOW_EDGES_RELEVANT (cur_window, display) &&
|
||||
cur_window->type != META_WINDOW_DOCK)
|
||||
{
|
||||
GList *new_edges;
|
||||
@ -1037,7 +1028,7 @@ compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
* by other windows or DOCKS, but that's handled below).
|
||||
*/
|
||||
meta_rectangle_intersect (&cur_rect,
|
||||
&screen->rect,
|
||||
&display->grab_screen->rect,
|
||||
&reduced);
|
||||
|
||||
new_edges = NULL;
|
||||
@ -1132,36 +1123,32 @@ compute_resistance_and_snapping_edges (MetaDisplay *display,
|
||||
* monitor edges in an array for quick access. Free the edges since
|
||||
* they've been cached elsewhere.
|
||||
*/
|
||||
edge_data = cache_edges (display, screen,
|
||||
edges,
|
||||
screen->active_workspace->monitor_edges,
|
||||
screen->active_workspace->screen_edges);
|
||||
cache_edges (display,
|
||||
edges,
|
||||
display->grab_screen->active_workspace->monitor_edges,
|
||||
display->grab_screen->active_workspace->screen_edges);
|
||||
g_list_free (edges);
|
||||
|
||||
/*
|
||||
* 6th: Initialize the resistance timeouts and buildups
|
||||
*/
|
||||
initialize_grab_edge_resistance_data (edge_data);
|
||||
|
||||
return edge_data;
|
||||
initialize_grab_edge_resistance_data (display);
|
||||
}
|
||||
|
||||
/* Note that old_[xy] and new_[xy] are with respect to inner positions of
|
||||
* the window.
|
||||
*/
|
||||
void
|
||||
meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
int old_x,
|
||||
int old_y,
|
||||
int *new_x,
|
||||
int *new_y,
|
||||
MetaEdgeResistanceFunc timeout_func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op)
|
||||
meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
int old_x,
|
||||
int old_y,
|
||||
int *new_x,
|
||||
int *new_y,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op)
|
||||
{
|
||||
MetaRectangle old_outer, proposed_outer, new_outer;
|
||||
MetaGrabInfo *grab_info;
|
||||
gboolean is_resize;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_outer);
|
||||
@ -1171,14 +1158,10 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
proposed_outer.y += (*new_y - old_y);
|
||||
new_outer = proposed_outer;
|
||||
|
||||
grab_info = meta_display_get_grab_info (window->display, device);
|
||||
g_assert (grab_info != NULL);
|
||||
|
||||
grab_info->grab_last_user_action_was_snap = snap;
|
||||
window->display->grab_last_user_action_was_snap = snap;
|
||||
is_resize = FALSE;
|
||||
if (apply_edge_resistance_to_each_side (window->display,
|
||||
window,
|
||||
device,
|
||||
&old_outer,
|
||||
&new_outer,
|
||||
timeout_func,
|
||||
@ -1240,20 +1223,18 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
* sizes of the inner window.
|
||||
*/
|
||||
void
|
||||
meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
int old_width,
|
||||
int old_height,
|
||||
int *new_width,
|
||||
int *new_height,
|
||||
int gravity,
|
||||
MetaEdgeResistanceFunc timeout_func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op)
|
||||
meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
int old_width,
|
||||
int old_height,
|
||||
int *new_width,
|
||||
int *new_height,
|
||||
int gravity,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op)
|
||||
{
|
||||
MetaRectangle old_outer, new_outer;
|
||||
int proposed_outer_width, proposed_outer_height;
|
||||
MetaGrabInfo *grab_info;
|
||||
gboolean is_resize;
|
||||
|
||||
meta_window_get_outer_rect (window, &old_outer);
|
||||
@ -1265,14 +1246,10 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
proposed_outer_width,
|
||||
proposed_outer_height);
|
||||
|
||||
grab_info = meta_display_get_grab_info (window->display, device);
|
||||
g_assert (grab_info != NULL);
|
||||
|
||||
grab_info->grab_last_user_action_was_snap = snap;
|
||||
window->display->grab_last_user_action_was_snap = snap;
|
||||
is_resize = TRUE;
|
||||
if (apply_edge_resistance_to_each_side (window->display,
|
||||
window,
|
||||
device,
|
||||
&old_outer,
|
||||
&new_outer,
|
||||
timeout_func,
|
||||
|
@ -26,28 +26,23 @@
|
||||
|
||||
#include "window-private.h"
|
||||
|
||||
typedef gboolean (* MetaEdgeResistanceFunc) (MetaWindow *window,
|
||||
MetaDevice *device);
|
||||
|
||||
void meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
int old_x,
|
||||
int old_y,
|
||||
int *new_x,
|
||||
int *new_y,
|
||||
MetaEdgeResistanceFunc func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op);
|
||||
void meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
int old_width,
|
||||
int old_height,
|
||||
int *new_width,
|
||||
int *new_height,
|
||||
int gravity,
|
||||
MetaEdgeResistanceFunc func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op);
|
||||
void meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
int old_x,
|
||||
int old_y,
|
||||
int *new_x,
|
||||
int *new_y,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op);
|
||||
void meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
int old_width,
|
||||
int old_height,
|
||||
int *new_width,
|
||||
int *new_height,
|
||||
int gravity,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean snap,
|
||||
gboolean is_keyboard_op);
|
||||
|
||||
#endif /* META_EDGE_RESISTANCE_H */
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "bell.h"
|
||||
#include <meta/errors.h>
|
||||
#include "keybindings-private.h"
|
||||
#include "device-pointer.h"
|
||||
|
||||
#include <X11/extensions/Xrender.h>
|
||||
|
||||
@ -65,7 +64,7 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
frame->child_y = 0;
|
||||
frame->bottom_height = 0;
|
||||
frame->right_width = 0;
|
||||
frame->cursors = g_hash_table_new (NULL, NULL);
|
||||
frame->current_cursor = 0;
|
||||
|
||||
frame->mapped = FALSE;
|
||||
frame->need_reapply_frame_shape = TRUE;
|
||||
@ -230,10 +229,9 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
|
||||
/* Move keybindings to window instead of frame */
|
||||
meta_window_grab_keys (window);
|
||||
|
||||
g_hash_table_destroy (frame->cursors);
|
||||
|
||||
g_free (frame);
|
||||
|
||||
|
||||
/* Put our state back where it should be */
|
||||
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
@ -247,12 +245,6 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
|
||||
flags = 0;
|
||||
|
||||
/* Disallow frame operations
|
||||
* while the popup menu is open.
|
||||
*/
|
||||
if (frame->window->menu)
|
||||
return flags;
|
||||
|
||||
if (frame->window->border_only)
|
||||
{
|
||||
; /* FIXME this may disable the _function_ as well as decor
|
||||
@ -408,7 +400,8 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
||||
/* If we're interactively resizing the frame, repaint
|
||||
* it immediately so we don't start to lag.
|
||||
*/
|
||||
if (frame->window->cur_grab != NULL)
|
||||
if (frame->window->display->grab_window ==
|
||||
frame->window)
|
||||
meta_ui_repaint_frame (frame->window->screen->ui,
|
||||
frame->xwindow);
|
||||
}
|
||||
@ -433,22 +426,22 @@ meta_frame_queue_draw (MetaFrame *frame)
|
||||
}
|
||||
|
||||
void
|
||||
meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaDevice *pointer,
|
||||
MetaCursor cursor)
|
||||
meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaCursor old_cursor;
|
||||
|
||||
old_cursor = GPOINTER_TO_UINT (g_hash_table_lookup (frame->cursors, pointer));
|
||||
|
||||
if (cursor == old_cursor)
|
||||
Cursor xcursor;
|
||||
if (cursor == frame->current_cursor)
|
||||
return;
|
||||
|
||||
g_hash_table_insert (frame->cursors, pointer,
|
||||
GUINT_TO_POINTER (cursor));
|
||||
meta_device_pointer_set_window_cursor (META_DEVICE_POINTER (pointer),
|
||||
frame->xwindow, cursor);
|
||||
XFlush (frame->window->display->xdisplay);
|
||||
frame->current_cursor = cursor;
|
||||
if (cursor == META_CURSOR_DEFAULT)
|
||||
XUndefineCursor (frame->window->display->xdisplay, frame->xwindow);
|
||||
else
|
||||
{
|
||||
xcursor = meta_display_create_x_cursor (frame->window->display, cursor);
|
||||
XDefineCursor (frame->window->display->xdisplay, frame->xwindow, xcursor);
|
||||
XFlush (frame->window->display->xdisplay);
|
||||
XFreeCursor (frame->window->display->xdisplay, xcursor);
|
||||
}
|
||||
}
|
||||
|
||||
Window
|
||||
|
@ -45,7 +45,7 @@ struct _MetaFrame
|
||||
/* reparent window */
|
||||
Window xwindow;
|
||||
|
||||
GHashTable *cursors;
|
||||
MetaCursor current_cursor;
|
||||
|
||||
/* This rect is trusted info from where we put the
|
||||
* frame, not the result of ConfigureNotify
|
||||
@ -80,8 +80,7 @@ gboolean meta_frame_sync_to_window (MetaFrame *frame,
|
||||
|
||||
cairo_region_t *meta_frame_get_frame_bounds (MetaFrame *frame);
|
||||
|
||||
void meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaDevice *pointer,
|
||||
void meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaCursor cursor);
|
||||
|
||||
#endif
|
||||
|
@ -1,677 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* XEvent utility methods */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "input-events.h"
|
||||
#include "devices-core.h"
|
||||
#include "device-map-private.h"
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#endif
|
||||
|
||||
/* Quite a hack: normalizes XI2 events to their
|
||||
* core event equivalent, so most code is shared
|
||||
* for both implementations, code handling input
|
||||
* events should use the helper functions so
|
||||
* the actual event is treated correctly.
|
||||
*/
|
||||
gboolean
|
||||
meta_input_event_get_type (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *ev_type)
|
||||
{
|
||||
guint type = 0; /* Silence gcc */
|
||||
gboolean retval = TRUE;
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (display->have_xinput2 &&
|
||||
ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
/* NB: GDK event filters already have generic events
|
||||
* allocated, so no need to do XGetEventData() on our own
|
||||
*/
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (xev->evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
type = MotionNotify;
|
||||
break;
|
||||
case XI_ButtonPress:
|
||||
type = ButtonPress;
|
||||
break;
|
||||
case XI_ButtonRelease:
|
||||
type = ButtonRelease;
|
||||
break;
|
||||
case XI_KeyPress:
|
||||
type = KeyPress;
|
||||
break;
|
||||
case XI_KeyRelease:
|
||||
type = KeyRelease;
|
||||
break;
|
||||
case XI_FocusIn:
|
||||
type = FocusIn;
|
||||
break;
|
||||
case XI_FocusOut:
|
||||
type = FocusOut;
|
||||
break;
|
||||
case XI_Enter:
|
||||
type = EnterNotify;
|
||||
break;
|
||||
case XI_Leave:
|
||||
type = LeaveNotify;
|
||||
break;
|
||||
default:
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
switch (ev->type)
|
||||
{
|
||||
case MotionNotify:
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
case FocusIn:
|
||||
case FocusOut:
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
type = ev->type;
|
||||
break;
|
||||
default:
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (retval)
|
||||
{
|
||||
if (ev_type)
|
||||
*ev_type = type;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_input_event_is_type (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint ev_type)
|
||||
{
|
||||
guint type;
|
||||
|
||||
if (!meta_input_event_get_type (display, ev, &type))
|
||||
return FALSE;
|
||||
|
||||
return (type == ev_type);
|
||||
}
|
||||
|
||||
Window
|
||||
meta_input_event_get_window (MetaDisplay *display,
|
||||
XEvent *ev)
|
||||
{
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
/* GDK event filters already have generic events allocated */
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (xev->evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
return ((XIDeviceEvent *) xev)->event;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
return ((XIEnterEvent *) xev)->event;
|
||||
default:
|
||||
return None;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
return ev->xany.window;
|
||||
}
|
||||
|
||||
Window
|
||||
meta_input_event_get_root_window (MetaDisplay *display,
|
||||
XEvent *ev)
|
||||
{
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (xev->evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
return ((XIDeviceEvent *) xev)->root;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
return ((XIEnterEvent *) xev)->root;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
switch (ev->type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
return ev->xkey.root;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
return ev->xbutton.root;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
return ev->xcrossing.root;
|
||||
case MotionNotify:
|
||||
return ev->xbutton.root;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return None;
|
||||
}
|
||||
|
||||
Time
|
||||
meta_input_event_get_time (MetaDisplay *display,
|
||||
XEvent *ev)
|
||||
{
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (xev->evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
return ((XIDeviceEvent *) xev)->time;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
return ((XIEnterEvent *) xev)->time;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
switch (ev->type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
return ev->xkey.time;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
return ev->xbutton.time;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
return ev->xcrossing.time;
|
||||
case MotionNotify:
|
||||
return ev->xmotion.time;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return CurrentTime;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_input_event_get_coordinates (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
gdouble *x_ret,
|
||||
gdouble *y_ret,
|
||||
gdouble *x_root_ret,
|
||||
gdouble *y_root_ret)
|
||||
{
|
||||
gdouble x, y, x_root, y_root;
|
||||
gboolean retval = TRUE;
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (xev->evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
{
|
||||
XIDeviceEvent *event = (XIDeviceEvent *) xev;
|
||||
|
||||
x = event->event_x;
|
||||
y = event->event_y;
|
||||
x_root = event->root_x;
|
||||
y_root = event->root_y;
|
||||
}
|
||||
|
||||
break;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
{
|
||||
XIEnterEvent *event = (XIEnterEvent *) xev;
|
||||
|
||||
x = event->event_x;
|
||||
y = event->event_y;
|
||||
x_root = event->root_x;
|
||||
y_root = event->root_y;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
switch (ev->type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
x = ev->xkey.x;
|
||||
y = ev->xkey.y;
|
||||
x_root = ev->xkey.x_root;
|
||||
y_root = ev->xkey.y_root;
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
x = ev->xbutton.x;
|
||||
y = ev->xbutton.y;
|
||||
x_root = ev->xbutton.x_root;
|
||||
y_root = ev->xbutton.y_root;
|
||||
break;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
x = ev->xcrossing.x;
|
||||
y = ev->xcrossing.y;
|
||||
x_root = ev->xcrossing.x_root;
|
||||
y_root = ev->xcrossing.y_root;
|
||||
break;
|
||||
case MotionNotify:
|
||||
x = ev->xmotion.x;
|
||||
y = ev->xmotion.y;
|
||||
x_root = ev->xmotion.x_root;
|
||||
y_root = ev->xmotion.y_root;
|
||||
break;
|
||||
default:
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (retval)
|
||||
{
|
||||
if (x_ret)
|
||||
*x_ret = x;
|
||||
|
||||
if (y_ret)
|
||||
*y_ret = y;
|
||||
|
||||
if (x_root_ret)
|
||||
*x_root_ret = x_root;
|
||||
|
||||
if (y_root_ret)
|
||||
*y_root_ret = y_root;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_input_event_get_state (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *state)
|
||||
{
|
||||
gboolean retval = TRUE;
|
||||
guint s;
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (xev->evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
s = ((XIDeviceEvent *) xev)->mods.effective;
|
||||
break;
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
s = ((XIDeviceEvent *) xev)->mods.effective;
|
||||
break;
|
||||
default:
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
switch (ev->type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
s = ev->xkey.state;
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
s = ev->xbutton.state;
|
||||
break;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
s = ev->xcrossing.state;
|
||||
break;
|
||||
case MotionNotify:
|
||||
s = ev->xmotion.state;
|
||||
break;
|
||||
default:
|
||||
retval = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (retval && state)
|
||||
*state = s;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_input_event_get_keycode (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *keycode)
|
||||
{
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
if (xev->evtype == XI_KeyPress ||
|
||||
xev->evtype == XI_KeyRelease)
|
||||
{
|
||||
if (keycode)
|
||||
{
|
||||
/* The detail field contains keycode for key events */
|
||||
*keycode = ((XIDeviceEvent *) xev)->detail;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
if (ev->type == KeyPress ||
|
||||
ev->type == KeyRelease)
|
||||
{
|
||||
if (keycode)
|
||||
*keycode = ev->xkey.keycode;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_input_event_get_button (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *button)
|
||||
{
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
if (xev->evtype == XI_ButtonPress ||
|
||||
xev->evtype == XI_ButtonRelease)
|
||||
{
|
||||
if (button)
|
||||
{
|
||||
/* The detail field contains
|
||||
* button number for button events
|
||||
*/
|
||||
*button = ((XIDeviceEvent *) xev)->detail;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
if (ev->type == ButtonPress ||
|
||||
ev->type == ButtonRelease)
|
||||
{
|
||||
if (button)
|
||||
*button = ev->xbutton.button;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* NB: Also works for focus in/out events */
|
||||
gboolean
|
||||
meta_input_event_get_crossing_details (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *mode_out,
|
||||
guint *detail_out)
|
||||
{
|
||||
gboolean retval = TRUE;
|
||||
guint mode, detail;
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
if (xev->evtype == XI_Enter ||
|
||||
xev->evtype == XI_Leave ||
|
||||
xev->evtype == XI_FocusIn ||
|
||||
xev->evtype == XI_FocusOut)
|
||||
{
|
||||
mode = ((XIEnterEvent *) xev)->mode;
|
||||
detail = ((XIEnterEvent *) xev)->detail;
|
||||
}
|
||||
else
|
||||
retval = FALSE;
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_XINPUT2 */
|
||||
{
|
||||
if (ev->type == EnterNotify ||
|
||||
ev->type == LeaveNotify)
|
||||
{
|
||||
mode = ev->xcrossing.mode;
|
||||
detail = ev->xcrossing.detail;
|
||||
}
|
||||
else if (ev->type == FocusIn ||
|
||||
ev->type == FocusOut)
|
||||
{
|
||||
mode = ev->xfocus.mode;
|
||||
detail = ev->xfocus.detail;
|
||||
}
|
||||
else
|
||||
retval = FALSE;
|
||||
}
|
||||
|
||||
if (retval)
|
||||
{
|
||||
if (mode_out)
|
||||
*mode_out = mode;
|
||||
|
||||
if (detail_out)
|
||||
*detail_out = detail;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
MetaDevice *
|
||||
meta_input_event_get_device (MetaDisplay *display,
|
||||
XEvent *ev)
|
||||
{
|
||||
guint evtype;
|
||||
|
||||
if (!meta_input_event_get_type (display, ev, &evtype))
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_XINPUT2
|
||||
if (ev->type == GenericEvent &&
|
||||
ev->xcookie.extension == display->xinput2_opcode)
|
||||
{
|
||||
XIEvent *xev;
|
||||
|
||||
g_assert (display->have_xinput2 == TRUE);
|
||||
|
||||
xev = (XIEvent *) ev->xcookie.data;
|
||||
|
||||
switch (evtype)
|
||||
{
|
||||
case XI_Motion:
|
||||
case XI_ButtonPress:
|
||||
case XI_ButtonRelease:
|
||||
case XI_KeyPress:
|
||||
case XI_KeyRelease:
|
||||
return meta_device_map_lookup (display->device_map,
|
||||
((XIDeviceEvent *) xev)->deviceid);
|
||||
case XI_FocusIn:
|
||||
case XI_FocusOut:
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
return meta_device_map_lookup (display->device_map,
|
||||
((XIEnterEvent *) xev)->deviceid);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
switch (ev->type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
case FocusIn:
|
||||
case FocusOut:
|
||||
return meta_device_map_lookup (display->device_map,
|
||||
META_CORE_KEYBOARD_ID);
|
||||
default:
|
||||
/* All other events are pointers' */
|
||||
return meta_device_map_lookup (display->device_map,
|
||||
META_CORE_POINTER_ID);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/**
|
||||
* \file event.h Utility functions for handling events
|
||||
*
|
||||
* Handling events.
|
||||
* This file contains helper methods to handle events, specially
|
||||
* input events, which can be either core or XInput2.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_EVENT_H
|
||||
#define META_EVENT_H
|
||||
|
||||
#include <config.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "display-private.h"
|
||||
#include <meta/device-map.h>
|
||||
|
||||
gboolean meta_input_event_get_type (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *ev_type);
|
||||
gboolean meta_input_event_is_type (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint ev_type);
|
||||
|
||||
Window meta_input_event_get_window (MetaDisplay *display,
|
||||
XEvent *ev);
|
||||
Window meta_input_event_get_root_window (MetaDisplay *display,
|
||||
XEvent *ev);
|
||||
|
||||
Time meta_input_event_get_time (MetaDisplay *display,
|
||||
XEvent *ev);
|
||||
|
||||
gboolean meta_input_event_get_coordinates (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
gdouble *x_ret,
|
||||
gdouble *y_ret,
|
||||
gdouble *x_root_ret,
|
||||
gdouble *y_root_ret);
|
||||
|
||||
gboolean meta_input_event_get_state (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *state);
|
||||
gboolean meta_input_event_get_keycode (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *keycode);
|
||||
gboolean meta_input_event_get_button (MetaDisplay *display,
|
||||
XEvent *event,
|
||||
guint *button);
|
||||
gboolean meta_input_event_get_crossing_details (MetaDisplay *display,
|
||||
XEvent *ev,
|
||||
guint *mode_out,
|
||||
guint *detail_out);
|
||||
|
||||
MetaDevice *meta_input_event_get_device (MetaDisplay *display,
|
||||
XEvent *ev);
|
||||
|
||||
|
||||
#endif /* META_EVENT_H */
|
@ -36,18 +36,14 @@ void meta_display_shutdown_keys (MetaDisplay *display);
|
||||
void meta_screen_grab_keys (MetaScreen *screen);
|
||||
void meta_screen_ungrab_keys (MetaScreen *screen);
|
||||
gboolean meta_screen_grab_all_keys (MetaScreen *screen,
|
||||
MetaDevice *device,
|
||||
guint32 timestamp);
|
||||
void meta_screen_ungrab_all_keys (MetaScreen *screen,
|
||||
MetaDevice *device,
|
||||
void meta_screen_ungrab_all_keys (MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
void meta_window_grab_keys (MetaWindow *window);
|
||||
void meta_window_ungrab_keys (MetaWindow *window);
|
||||
gboolean meta_window_grab_all_keys (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
guint32 timestamp);
|
||||
void meta_window_ungrab_all_keys (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
guint32 timestamp);
|
||||
gboolean meta_display_process_key_event (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -311,12 +311,9 @@ static GSourceFuncs event_funcs = {
|
||||
static void
|
||||
meta_clutter_init (void)
|
||||
{
|
||||
if (!meta_get_use_core_devices ())
|
||||
clutter_x11_enable_xinput ();
|
||||
|
||||
clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
||||
clutter_x11_disable_event_retrieval ();
|
||||
|
||||
|
||||
if (CLUTTER_INIT_SUCCESS == clutter_init (NULL, NULL))
|
||||
{
|
||||
GSource *source = g_source_new (&event_funcs, sizeof (GSource));
|
||||
@ -427,8 +424,6 @@ meta_init (void)
|
||||
meta_set_verbose (TRUE);
|
||||
if (g_getenv ("MUTTER_DEBUG"))
|
||||
meta_set_debugging (TRUE);
|
||||
if (g_getenv ("MUTTER_USE_CORE_DEVICES"))
|
||||
meta_set_use_core_devices (TRUE);
|
||||
|
||||
if (g_get_home_dir ())
|
||||
if (chdir (g_get_home_dir ()) < 0)
|
||||
|
@ -90,7 +90,6 @@ northwestcmp (gconstpointer a, gconstpointer b)
|
||||
|
||||
static void
|
||||
find_next_cascade (MetaWindow *window,
|
||||
MetaDevice *pointer,
|
||||
MetaFrameGeometry *fgeom,
|
||||
/* visible windows on relevant workspaces */
|
||||
GList *windows,
|
||||
@ -137,7 +136,7 @@ find_next_cascade (MetaWindow *window,
|
||||
* of NW corner of window frame.
|
||||
*/
|
||||
|
||||
current = meta_screen_get_current_monitor (window->screen, pointer);
|
||||
current = meta_screen_get_current_monitor (window->screen);
|
||||
meta_window_get_work_area_for_monitor (window, current->number, &work_area);
|
||||
|
||||
cascade_x = MAX (0, work_area.x);
|
||||
@ -355,17 +354,10 @@ avoid_being_obscured_as_second_modal_dialog (MetaWindow *window,
|
||||
* know about the modal-to-the-main-window part.
|
||||
*/
|
||||
|
||||
MetaWindow *focus_window = NULL;
|
||||
MetaFocusInfo *focus_info;
|
||||
MetaWindow *focus_window;
|
||||
MetaRectangle overlap;
|
||||
MetaDevice *pointer, *keyboard;
|
||||
|
||||
pointer = meta_window_guess_grab_pointer (window);
|
||||
keyboard = meta_device_get_paired_device (pointer);
|
||||
focus_info = meta_display_get_focus_info (window->display, keyboard);
|
||||
|
||||
if (focus_window)
|
||||
focus_window = focus_info->focus_window;
|
||||
focus_window = window->display->focus_window;
|
||||
|
||||
if (window->denied_focus_and_not_transient &&
|
||||
window->wm_state_modal && /* FIXME: Maybe do this for all transients? */
|
||||
@ -668,7 +660,6 @@ meta_window_place (MetaWindow *window,
|
||||
{
|
||||
GList *windows;
|
||||
const MetaMonitorInfo *xi;
|
||||
MetaDevice *pointer, *keyboard;
|
||||
|
||||
/* frame member variables should NEVER be used in here, only
|
||||
* MetaFrameGeometry. But remember fgeom == NULL
|
||||
@ -680,9 +671,7 @@ meta_window_place (MetaWindow *window,
|
||||
meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc);
|
||||
|
||||
windows = NULL;
|
||||
pointer = meta_window_guess_grab_pointer (window);
|
||||
keyboard = meta_device_get_paired_device (pointer);
|
||||
|
||||
|
||||
switch (window->type)
|
||||
{
|
||||
/* Run placement algorithm on these. */
|
||||
@ -826,7 +815,7 @@ meta_window_place (MetaWindow *window,
|
||||
int w, h;
|
||||
|
||||
/* Warning, this function is a round trip! */
|
||||
xi = meta_screen_get_current_monitor (window->screen, pointer);
|
||||
xi = meta_screen_get_current_monitor (window->screen);
|
||||
|
||||
w = xi->rect.width;
|
||||
h = xi->rect.height;
|
||||
@ -871,8 +860,8 @@ meta_window_place (MetaWindow *window,
|
||||
}
|
||||
|
||||
/* Warning, this is a round trip! */
|
||||
xi = meta_screen_get_current_monitor (window->screen, pointer);
|
||||
|
||||
xi = meta_screen_get_current_monitor (window->screen);
|
||||
|
||||
/* "Origin" placement algorithm */
|
||||
x = xi->rect.x;
|
||||
y = xi->rect.y;
|
||||
@ -910,8 +899,8 @@ meta_window_place (MetaWindow *window,
|
||||
/* If no placement has been done, revert to cascade to avoid
|
||||
* fully overlapping window (e.g. starting multiple terminals)
|
||||
* */
|
||||
if (x == xi->rect.x && y == xi->rect.y)
|
||||
find_next_cascade (window, pointer, fgeom, windows, x, y, &x, &y);
|
||||
if (x == xi->rect.x && y == xi->rect.y)
|
||||
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
|
||||
|
||||
done_check_denied_focus:
|
||||
/* If the window is being denied focus and isn't a transient of the
|
||||
@ -924,12 +913,8 @@ meta_window_place (MetaWindow *window,
|
||||
gboolean found_fit;
|
||||
MetaWindow *focus_window;
|
||||
MetaRectangle overlap;
|
||||
MetaFocusInfo *focus_info;
|
||||
|
||||
focus_info = meta_display_get_focus_info (window->display, keyboard);
|
||||
g_assert (focus_info != NULL);
|
||||
|
||||
focus_window = focus_info->focus_window;
|
||||
focus_window = window->display->focus_window;
|
||||
g_assert (focus_window != NULL);
|
||||
|
||||
/* No need to do anything if the window doesn't overlap at all */
|
||||
|
@ -1679,6 +1679,7 @@ button_layout_handler (MetaPreference pref,
|
||||
if (string_value)
|
||||
sides = g_strsplit (string_value, ":", 2);
|
||||
|
||||
i = 0;
|
||||
if (sides != NULL && sides[0] != NULL)
|
||||
{
|
||||
char **buttons;
|
||||
@ -1733,12 +1734,13 @@ button_layout_handler (MetaPreference pref,
|
||||
++b;
|
||||
}
|
||||
|
||||
new_layout.left_buttons[i] = META_BUTTON_FUNCTION_LAST;
|
||||
new_layout.left_buttons_has_spacer[i] = FALSE;
|
||||
|
||||
g_strfreev (buttons);
|
||||
}
|
||||
|
||||
new_layout.left_buttons[i] = META_BUTTON_FUNCTION_LAST;
|
||||
new_layout.left_buttons_has_spacer[i] = FALSE;
|
||||
|
||||
i = 0;
|
||||
if (sides != NULL && sides[0] != NULL && sides[1] != NULL)
|
||||
{
|
||||
char **buttons;
|
||||
@ -1792,12 +1794,12 @@ button_layout_handler (MetaPreference pref,
|
||||
++b;
|
||||
}
|
||||
|
||||
new_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
|
||||
new_layout.right_buttons_has_spacer[i] = FALSE;
|
||||
|
||||
g_strfreev (buttons);
|
||||
}
|
||||
|
||||
new_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
|
||||
new_layout.right_buttons_has_spacer[i] = FALSE;
|
||||
|
||||
g_strfreev (sides);
|
||||
|
||||
/* Invert the button layout for RTL languages */
|
||||
|
@ -90,8 +90,7 @@ struct _MetaScreen
|
||||
MetaStack *stack;
|
||||
MetaStackTracker *stack_tracker;
|
||||
|
||||
/* per-pointer cursors */
|
||||
GHashTable *cursors;
|
||||
MetaCursor current_cursor;
|
||||
|
||||
Window flash_window;
|
||||
|
||||
@ -159,10 +158,8 @@ void meta_screen_queue_frame_redraws (MetaScreen *scree
|
||||
void meta_screen_queue_window_resizes (MetaScreen *screen);
|
||||
|
||||
void meta_screen_set_cursor (MetaScreen *screen,
|
||||
MetaDevice *pointer,
|
||||
MetaCursor cursor);
|
||||
void meta_screen_update_cursor (MetaScreen *screen,
|
||||
MetaDevice *pointer);
|
||||
void meta_screen_update_cursor (MetaScreen *screen);
|
||||
|
||||
void meta_screen_tab_popup_create (MetaScreen *screen,
|
||||
MetaTabList list_type,
|
||||
@ -185,11 +182,9 @@ void meta_screen_tile_preview_update (MetaScreen *screen,
|
||||
void meta_screen_tile_preview_hide (MetaScreen *screen);
|
||||
|
||||
MetaWindow* meta_screen_get_mouse_window (MetaScreen *screen,
|
||||
MetaDevice *pointer,
|
||||
MetaWindow *not_this_one);
|
||||
|
||||
const MetaMonitorInfo* meta_screen_get_current_monitor (MetaScreen *screen,
|
||||
MetaDevice *pointer);
|
||||
const MetaMonitorInfo* meta_screen_get_current_monitor (MetaScreen *screen);
|
||||
const MetaMonitorInfo* meta_screen_get_monitor_for_rect (MetaScreen *screen,
|
||||
MetaRectangle *rect);
|
||||
const MetaMonitorInfo* meta_screen_get_monitor_for_window (MetaScreen *screen,
|
||||
|
@ -37,12 +37,10 @@
|
||||
#include "workspace-private.h"
|
||||
#include "keybindings-private.h"
|
||||
#include "stack.h"
|
||||
#include "core.h"
|
||||
#include "xprops.h"
|
||||
#include <meta/compositor.h>
|
||||
#include "mutter-marshal.h"
|
||||
#include "mutter-enum-types.h"
|
||||
#include "device-pointer.h"
|
||||
|
||||
#ifdef HAVE_SOLARIS_XINERAMA
|
||||
#include <X11/extensions/xinerama.h>
|
||||
@ -634,6 +632,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
MetaScreen *screen;
|
||||
Window xroot;
|
||||
Display *xdisplay;
|
||||
XWindowAttributes attr;
|
||||
Window new_wm_sn_owner;
|
||||
Window current_wm_sn_owner;
|
||||
gboolean replace_current_wm;
|
||||
@ -748,15 +747,15 @@ meta_screen_new (MetaDisplay *display,
|
||||
/* We need to or with the existing event mask since
|
||||
* gtk+ may be interested in other events.
|
||||
*/
|
||||
meta_core_select_events (xdisplay, xroot,
|
||||
(SubstructureRedirectMask | SubstructureNotifyMask |
|
||||
ColormapChangeMask | PropertyChangeMask |
|
||||
LeaveWindowMask | EnterWindowMask |
|
||||
KeyPressMask | KeyReleaseMask |
|
||||
FocusChangeMask | StructureNotifyMask |
|
||||
ExposureMask),
|
||||
TRUE);
|
||||
|
||||
XGetWindowAttributes (xdisplay, xroot, &attr);
|
||||
XSelectInput (xdisplay,
|
||||
xroot,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask |
|
||||
ColormapChangeMask | PropertyChangeMask |
|
||||
LeaveWindowMask | EnterWindowMask |
|
||||
KeyPressMask | KeyReleaseMask |
|
||||
FocusChangeMask | StructureNotifyMask |
|
||||
ExposureMask | attr.your_event_mask);
|
||||
if (meta_error_trap_pop_with_return (display) != Success)
|
||||
{
|
||||
meta_warning (_("Screen %d on display \"%s\" already has a window manager\n"),
|
||||
@ -778,10 +777,10 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->rect.x = screen->rect.y = 0;
|
||||
screen->rect.width = WidthOfScreen (screen->xscreen);
|
||||
screen->rect.height = HeightOfScreen (screen->xscreen);
|
||||
screen->current_cursor = -1; /* invalid/unset */
|
||||
screen->default_xvisual = DefaultVisualOfScreen (screen->xscreen);
|
||||
screen->default_depth = DefaultDepthOfScreen (screen->xscreen);
|
||||
screen->flash_window = None;
|
||||
screen->cursors = g_hash_table_new (NULL, NULL);
|
||||
|
||||
screen->wm_sn_selection_window = new_wm_sn_owner;
|
||||
screen->wm_sn_atom = wm_sn_atom;
|
||||
@ -806,6 +805,8 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->last_monitor_index = 0;
|
||||
|
||||
reload_monitor_infos (screen);
|
||||
|
||||
meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
|
||||
|
||||
/* Handle creating a no_focus_window for this screen */
|
||||
screen->no_focus_window =
|
||||
@ -940,10 +941,7 @@ meta_screen_free (MetaScreen *screen,
|
||||
meta_stack_tracker_free (screen->stack_tracker);
|
||||
|
||||
meta_error_trap_push_with_return (screen->display);
|
||||
meta_core_select_events (screen->display->xdisplay,
|
||||
screen->xroot, NoEventMask,
|
||||
FALSE);
|
||||
|
||||
XSelectInput (screen->display->xdisplay, screen->xroot, 0);
|
||||
if (meta_error_trap_pop_with_return (screen->display) != Success)
|
||||
meta_warning (_("Could not release screen %d on display \"%s\"\n"),
|
||||
screen->number, screen->display->name);
|
||||
@ -967,8 +965,6 @@ meta_screen_free (MetaScreen *screen,
|
||||
|
||||
g_free (screen->screen_name);
|
||||
|
||||
g_hash_table_destroy (screen->cursors);
|
||||
|
||||
g_object_unref (screen);
|
||||
|
||||
XFlush (display->xdisplay);
|
||||
@ -1582,33 +1578,31 @@ update_focus_mode (MetaScreen *screen)
|
||||
|
||||
void
|
||||
meta_screen_set_cursor (MetaScreen *screen,
|
||||
MetaDevice *pointer,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaCursor old_cursor;
|
||||
Cursor xcursor;
|
||||
|
||||
old_cursor = GPOINTER_TO_UINT (g_hash_table_lookup (screen->cursors, pointer));
|
||||
|
||||
if (cursor == old_cursor)
|
||||
if (cursor == screen->current_cursor)
|
||||
return;
|
||||
|
||||
g_hash_table_insert (screen->cursors, pointer,
|
||||
GUINT_TO_POINTER (cursor));
|
||||
|
||||
meta_screen_update_cursor (screen, pointer);
|
||||
screen->current_cursor = cursor;
|
||||
|
||||
xcursor = meta_display_create_x_cursor (screen->display, cursor);
|
||||
XDefineCursor (screen->display->xdisplay, screen->xroot, xcursor);
|
||||
XFlush (screen->display->xdisplay);
|
||||
XFreeCursor (screen->display->xdisplay, xcursor);
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_update_cursor (MetaScreen *screen,
|
||||
MetaDevice *pointer)
|
||||
meta_screen_update_cursor (MetaScreen *screen)
|
||||
{
|
||||
MetaCursor cursor;
|
||||
Cursor xcursor;
|
||||
|
||||
cursor = GPOINTER_TO_UINT (g_hash_table_lookup (screen->cursors, pointer));
|
||||
meta_device_pointer_set_window_cursor (META_DEVICE_POINTER (pointer),
|
||||
screen->xroot,
|
||||
cursor);
|
||||
xcursor = meta_display_create_x_cursor (screen->display,
|
||||
screen->current_cursor);
|
||||
XDefineCursor (screen->display->xdisplay, screen->xroot, xcursor);
|
||||
XFlush (screen->display->xdisplay);
|
||||
XFreeCursor (screen->display->xdisplay, xcursor);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1862,21 +1856,9 @@ static gboolean
|
||||
meta_screen_tile_preview_update_timeout (gpointer data)
|
||||
{
|
||||
MetaScreen *screen = data;
|
||||
MetaWindow *window = NULL;
|
||||
MetaWindow *window = screen->display->grab_window;
|
||||
gboolean composited = screen->display->compositor != NULL;
|
||||
gboolean needs_preview = FALSE;
|
||||
MetaGrabInfo *grab_info;
|
||||
MetaDevice *pointer = NULL;
|
||||
GHashTableIter iter;
|
||||
|
||||
/* FIXME: we're just handling the first grab we find */
|
||||
g_hash_table_iter_init (&iter, screen->display->current_grabs);
|
||||
|
||||
if (g_hash_table_iter_next (&iter, NULL, (gpointer *) &grab_info))
|
||||
{
|
||||
window = grab_info->grab_window;
|
||||
pointer = grab_info->grab_pointer;
|
||||
}
|
||||
|
||||
screen->tile_preview_timeout_id = 0;
|
||||
|
||||
@ -1919,8 +1901,8 @@ meta_screen_tile_preview_update_timeout (gpointer data)
|
||||
{
|
||||
MetaRectangle tile_rect;
|
||||
|
||||
meta_window_get_current_tile_area (window, pointer, &tile_rect);
|
||||
meta_tile_preview_show (screen->tile_preview, pointer, &tile_rect);
|
||||
meta_window_get_current_tile_area (window, &tile_rect);
|
||||
meta_tile_preview_show (screen->tile_preview, &tile_rect);
|
||||
}
|
||||
else
|
||||
meta_tile_preview_hide (screen->tile_preview);
|
||||
@ -1965,23 +1947,28 @@ meta_screen_tile_preview_hide (MetaScreen *screen)
|
||||
|
||||
MetaWindow*
|
||||
meta_screen_get_mouse_window (MetaScreen *screen,
|
||||
MetaDevice *pointer,
|
||||
MetaWindow *not_this_one)
|
||||
{
|
||||
MetaWindow *window;
|
||||
Window root_return, child_return;
|
||||
int root_x_return, root_y_return;
|
||||
|
||||
int win_x_return, win_y_return;
|
||||
unsigned int mask_return;
|
||||
|
||||
if (not_this_one)
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing mouse window excluding %s\n", not_this_one->desc);
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
meta_device_pointer_query_position (META_DEVICE_POINTER (pointer),
|
||||
screen->xroot,
|
||||
NULL, NULL,
|
||||
&root_x_return,
|
||||
&root_y_return,
|
||||
NULL, NULL, NULL);
|
||||
XQueryPointer (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
&root_return,
|
||||
&child_return,
|
||||
&root_x_return,
|
||||
&root_y_return,
|
||||
&win_x_return,
|
||||
&win_y_return,
|
||||
&mask_return);
|
||||
meta_error_trap_pop (screen->display);
|
||||
|
||||
window = meta_stack_get_default_focus_window_at_point (screen->stack,
|
||||
@ -2077,7 +2064,6 @@ meta_screen_get_natural_monitor_list (MetaScreen *screen,
|
||||
const MetaMonitorInfo* current;
|
||||
const MetaMonitorInfo* tmp;
|
||||
GQueue* monitor_queue;
|
||||
MetaDevice *pointer;
|
||||
int* visited;
|
||||
int cur = 0;
|
||||
int i;
|
||||
@ -2085,9 +2071,6 @@ meta_screen_get_natural_monitor_list (MetaScreen *screen,
|
||||
*n_monitors = screen->n_monitor_infos;
|
||||
*monitors_list = g_new (int, screen->n_monitor_infos);
|
||||
|
||||
pointer = meta_device_map_lookup (screen->display->device_map,
|
||||
META_CORE_POINTER_ID);
|
||||
|
||||
/* we calculate a natural ordering by which to choose monitors for
|
||||
* window placement. We start at the current monitor, and perform
|
||||
* a breadth-first search of the monitors starting from that
|
||||
@ -2102,7 +2085,7 @@ meta_screen_get_natural_monitor_list (MetaScreen *screen,
|
||||
visited[i] = FALSE;
|
||||
}
|
||||
|
||||
current = meta_screen_get_current_monitor (screen, pointer);
|
||||
current = meta_screen_get_current_monitor (screen);
|
||||
monitor_queue = g_queue_new ();
|
||||
g_queue_push_tail (monitor_queue, (gpointer) current);
|
||||
visited[current->number] = TRUE;
|
||||
@ -2169,8 +2152,7 @@ meta_screen_get_natural_monitor_list (MetaScreen *screen,
|
||||
}
|
||||
|
||||
const MetaMonitorInfo*
|
||||
meta_screen_get_current_monitor (MetaScreen *screen,
|
||||
MetaDevice *pointer)
|
||||
meta_screen_get_current_monitor (MetaScreen *screen)
|
||||
{
|
||||
if (screen->n_monitor_infos == 1)
|
||||
return &screen->monitor_infos[0];
|
||||
@ -2180,18 +2162,24 @@ meta_screen_get_current_monitor (MetaScreen *screen,
|
||||
|
||||
if (screen->display->monitor_cache_invalidated)
|
||||
{
|
||||
Window root_return, child_return;
|
||||
int win_x_return, win_y_return;
|
||||
unsigned int mask_return;
|
||||
int i;
|
||||
MetaRectangle pointer_position;
|
||||
|
||||
screen->display->monitor_cache_invalidated = FALSE;
|
||||
|
||||
pointer_position.width = pointer_position.height = 1;
|
||||
meta_device_pointer_query_position (META_DEVICE_POINTER (pointer),
|
||||
screen->xroot,
|
||||
NULL, NULL,
|
||||
&pointer_position.x,
|
||||
&pointer_position.y,
|
||||
NULL, NULL, NULL);
|
||||
XQueryPointer (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
&root_return,
|
||||
&child_return,
|
||||
&pointer_position.x,
|
||||
&pointer_position.y,
|
||||
&win_x_return,
|
||||
&win_y_return,
|
||||
&mask_return);
|
||||
|
||||
screen->last_monitor_index = 0;
|
||||
for (i = 0; i < screen->n_monitor_infos; i++)
|
||||
@ -3058,22 +3046,17 @@ static gboolean startup_sequence_timeout (void *data);
|
||||
static void
|
||||
update_startup_feedback (MetaScreen *screen)
|
||||
{
|
||||
MetaDevice *pointer;
|
||||
|
||||
pointer = meta_device_map_lookup (screen->display->device_map,
|
||||
META_CORE_POINTER_ID);
|
||||
|
||||
if (screen->startup_sequences != NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Setting busy cursor\n");
|
||||
meta_screen_set_cursor (screen, pointer, META_CURSOR_BUSY);
|
||||
meta_screen_set_cursor (screen, META_CURSOR_BUSY);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Setting default cursor\n");
|
||||
meta_screen_set_cursor (screen, pointer, META_CURSOR_DEFAULT);
|
||||
meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,23 +211,13 @@ meta_stack_thaw (MetaStack *stack)
|
||||
stack_sync_to_server (stack);
|
||||
}
|
||||
|
||||
typedef struct _FocusedForeachData FocusedForeachData;
|
||||
|
||||
struct _FocusedForeachData
|
||||
{
|
||||
MetaWindow *window;
|
||||
gboolean focused_transient;
|
||||
};
|
||||
|
||||
static gboolean
|
||||
is_focused_foreach (MetaWindow *window,
|
||||
void *data)
|
||||
{
|
||||
FocusedForeachData *focused_data = data;
|
||||
|
||||
if (window == focused_data->window)
|
||||
if (window == window->display->expected_focus_window)
|
||||
{
|
||||
focused_data->focused_transient = TRUE;
|
||||
*((gboolean*) data) = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
@ -250,9 +240,6 @@ get_standalone_layer (MetaWindow *window)
|
||||
{
|
||||
MetaStackLayer layer;
|
||||
gboolean focused_transient = FALSE;
|
||||
MetaFocusInfo *focus_info;
|
||||
MetaDevice *keyboard;
|
||||
FocusedForeachData focused_data = { 0 };
|
||||
|
||||
switch (window->type)
|
||||
{
|
||||
@ -276,30 +263,20 @@ get_standalone_layer (MetaWindow *window)
|
||||
case META_WINDOW_OVERRIDE_OTHER:
|
||||
layer = META_LAYER_OVERRIDE_REDIRECT;
|
||||
break;
|
||||
default:
|
||||
/* FIXME: How about other keyboards? should
|
||||
* we allow fullscreen for non-VCP/K anyway?
|
||||
*/
|
||||
keyboard = meta_device_map_lookup (window->display->device_map,
|
||||
META_CORE_KEYBOARD_ID);
|
||||
|
||||
focus_info = meta_display_get_focus_info (window->display, keyboard);
|
||||
focused_data.window = focus_info->expected_focus_window;
|
||||
|
||||
default:
|
||||
meta_window_foreach_transient (window,
|
||||
is_focused_foreach,
|
||||
&focused_data);
|
||||
&focused_transient);
|
||||
|
||||
if (window->wm_state_below)
|
||||
layer = META_LAYER_BOTTOM;
|
||||
else if (window->fullscreen &&
|
||||
(focused_transient ||
|
||||
!focus_info ||
|
||||
window == focus_info->expected_focus_window ||
|
||||
focus_info->expected_focus_window == NULL ||
|
||||
(focus_info->expected_focus_window != NULL &&
|
||||
window == window->display->expected_focus_window ||
|
||||
window->display->expected_focus_window == NULL ||
|
||||
(window->display->expected_focus_window != NULL &&
|
||||
windows_on_different_monitor (window,
|
||||
focus_info->expected_focus_window))))
|
||||
window->display->expected_focus_window))))
|
||||
layer = META_LAYER_FULLSCREEN;
|
||||
else if (window->wm_state_above)
|
||||
layer = META_LAYER_TOP;
|
||||
|
@ -81,7 +81,6 @@ meta_print_backtrace (void)
|
||||
static gint verbose_topics = 0;
|
||||
static gboolean is_debugging = FALSE;
|
||||
static gboolean replace_current = FALSE;
|
||||
static gboolean use_core_devices = FALSE;
|
||||
static int no_prefix = 0;
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
@ -210,18 +209,6 @@ meta_set_debugging (gboolean setting)
|
||||
is_debugging = setting;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_get_use_core_devices (void)
|
||||
{
|
||||
return use_core_devices;
|
||||
}
|
||||
|
||||
void
|
||||
meta_set_use_core_devices (gboolean setting)
|
||||
{
|
||||
use_core_devices = setting;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_get_replace_current_wm (void)
|
||||
{
|
||||
@ -721,6 +708,7 @@ static guint last_later_id = 0;
|
||||
typedef struct
|
||||
{
|
||||
guint id;
|
||||
guint ref_count;
|
||||
MetaLaterType when;
|
||||
GSourceFunc func;
|
||||
gpointer data;
|
||||
@ -736,14 +724,30 @@ static guint later_repaint_func = 0;
|
||||
|
||||
static void ensure_later_repaint_func (void);
|
||||
|
||||
static void
|
||||
unref_later (MetaLater *later)
|
||||
{
|
||||
if (--later->ref_count == 0)
|
||||
{
|
||||
if (later->notify)
|
||||
{
|
||||
later->notify (later->data);
|
||||
later->notify = NULL;
|
||||
}
|
||||
g_slice_free (MetaLater, later);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_later (MetaLater *later)
|
||||
{
|
||||
if (later->source)
|
||||
g_source_remove (later->source);
|
||||
if (later->notify)
|
||||
later->notify (later->data);
|
||||
g_slice_free (MetaLater, later);
|
||||
{
|
||||
g_source_remove (later->source);
|
||||
later->source = 0;
|
||||
}
|
||||
later->func = NULL;
|
||||
unref_later (later);
|
||||
}
|
||||
|
||||
/* Used to sort the list of laters with the highest priority
|
||||
@ -759,34 +763,41 @@ compare_laters (gconstpointer a,
|
||||
static gboolean
|
||||
run_repaint_laters (gpointer data)
|
||||
{
|
||||
GSList *old_laters = laters;
|
||||
GSList *laters_copy;
|
||||
GSList *l;
|
||||
gboolean keep_timeline_running = FALSE;
|
||||
laters = NULL;
|
||||
|
||||
for (l = old_laters; l; l = l->next)
|
||||
laters_copy = NULL;
|
||||
for (l = laters; l; l = l->next)
|
||||
{
|
||||
MetaLater *later = l->data;
|
||||
if (later->source == 0 ||
|
||||
(later->when <= META_LATER_BEFORE_REDRAW && !later->run_once))
|
||||
{
|
||||
if (later->func (later->data))
|
||||
{
|
||||
if (later->source == 0)
|
||||
keep_timeline_running = TRUE;
|
||||
laters = g_slist_insert_sorted (laters, later, compare_laters);
|
||||
}
|
||||
else
|
||||
destroy_later (later);
|
||||
later->ref_count++;
|
||||
laters_copy = g_slist_prepend (laters_copy, later);
|
||||
}
|
||||
}
|
||||
laters_copy = g_slist_reverse (laters_copy);
|
||||
|
||||
for (l = laters_copy; l; l = l->next)
|
||||
{
|
||||
MetaLater *later = l->data;
|
||||
|
||||
if (later->func && later->func (later->data))
|
||||
{
|
||||
if (later->source == 0)
|
||||
keep_timeline_running = TRUE;
|
||||
}
|
||||
else
|
||||
laters = g_slist_insert_sorted (laters, later, compare_laters);
|
||||
meta_later_remove (later->id);
|
||||
unref_later (later);
|
||||
}
|
||||
|
||||
if (!keep_timeline_running)
|
||||
clutter_timeline_stop (later_timeline);
|
||||
|
||||
g_slist_free (old_laters);
|
||||
g_slist_free (laters_copy);
|
||||
|
||||
/* Just keep the repaint func around - it's cheap if the list is empty */
|
||||
return TRUE;
|
||||
@ -813,9 +824,7 @@ call_idle_later (gpointer data)
|
||||
|
||||
if (!later->func (later->data))
|
||||
{
|
||||
laters = g_slist_remove (laters, later);
|
||||
later->source = 0;
|
||||
destroy_later (later);
|
||||
meta_later_remove (later->id);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
@ -851,6 +860,7 @@ meta_later_add (MetaLaterType when,
|
||||
MetaLater *later = g_slice_new0 (MetaLater);
|
||||
|
||||
later->id = ++last_later_id;
|
||||
later->ref_count = 1;
|
||||
later->when = when;
|
||||
later->func = func;
|
||||
later->data = data;
|
||||
|
@ -107,10 +107,6 @@ struct _MetaWindow
|
||||
Window xgroup_leader;
|
||||
Window xclient_leader;
|
||||
|
||||
/* window menu if any, and the pointer that popped it up */
|
||||
MetaWindowMenu *menu;
|
||||
MetaDevice *menu_device;
|
||||
|
||||
/* Initial workspace property */
|
||||
int initial_workspace;
|
||||
|
||||
@ -322,12 +318,6 @@ struct _MetaWindow
|
||||
/* if TRUE, application is buggy and SYNC resizing is turned off */
|
||||
guint disable_sync : 1;
|
||||
|
||||
/* if TRUE, window didn't yet get the FocusIn for window->focus_keyboard */
|
||||
guint expecting_focus_in : 1;
|
||||
|
||||
/* Keyboard currently owning the window focus, or NULL */
|
||||
MetaDevice *focus_keyboard;
|
||||
|
||||
/* if non-NULL, the bounds of the window frame */
|
||||
cairo_region_t *frame_bounds;
|
||||
|
||||
@ -405,12 +395,6 @@ struct _MetaWindow
|
||||
|
||||
/* Focused window that is (directly or indirectly) attached to this one */
|
||||
MetaWindow *attached_focus_window;
|
||||
|
||||
/* Current grab op for this window, or NULL */
|
||||
MetaGrabInfo *cur_grab;
|
||||
|
||||
/* Focus info if the window is focused, or NULL */
|
||||
MetaFocusInfo *cur_focus;
|
||||
};
|
||||
|
||||
struct _MetaWindowClass
|
||||
@ -580,7 +564,6 @@ void meta_window_set_current_workspace_hint (MetaWindow *window);
|
||||
unsigned long meta_window_get_net_wm_desktop (MetaWindow *window);
|
||||
|
||||
void meta_window_show_menu (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
@ -609,7 +592,6 @@ void meta_window_get_work_area_all_monitors (MetaWindow *window,
|
||||
MetaRectangle *area);
|
||||
|
||||
void meta_window_get_current_tile_area (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
MetaRectangle *tile_area);
|
||||
|
||||
|
||||
@ -631,16 +613,13 @@ void meta_window_free_delete_dialog (MetaWindow *window);
|
||||
|
||||
|
||||
void meta_window_begin_grab_op (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
MetaGrabOp op,
|
||||
gboolean frame_action,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_window_update_keyboard_resize (MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
gboolean update_cursor);
|
||||
void meta_window_update_keyboard_move (MetaWindow *window,
|
||||
MetaDevice *device);
|
||||
void meta_window_update_keyboard_move (MetaWindow *window);
|
||||
|
||||
void meta_window_update_layer (MetaWindow *window);
|
||||
|
||||
@ -662,13 +641,6 @@ void meta_window_update_monitor (MetaWindow *window);
|
||||
void meta_window_update_on_all_workspaces (MetaWindow *window);
|
||||
|
||||
void meta_window_propagate_focus_appearance (MetaWindow *window,
|
||||
MetaDevice *keyboard,
|
||||
gboolean focused);
|
||||
|
||||
void meta_window_set_client_pointer (MetaWindow *window,
|
||||
MetaDevice *pointer);
|
||||
MetaDevice * meta_window_get_client_pointer (MetaWindow *window);
|
||||
|
||||
MetaDevice * meta_window_guess_grab_pointer (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@ -1471,9 +1471,7 @@ reload_transient_for (MetaWindow *window,
|
||||
MetaWindow *parent = NULL;
|
||||
|
||||
if (meta_window_appears_focused (window) && window->xtransient_for != None)
|
||||
meta_window_propagate_focus_appearance (window,
|
||||
window->focus_keyboard,
|
||||
FALSE);
|
||||
meta_window_propagate_focus_appearance (window, FALSE);
|
||||
|
||||
window->xtransient_for = None;
|
||||
|
||||
@ -1539,9 +1537,7 @@ reload_transient_for (MetaWindow *window,
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
|
||||
if (meta_window_appears_focused (window) && window->xtransient_for != None)
|
||||
meta_window_propagate_focus_appearance (window,
|
||||
window->focus_keyboard,
|
||||
TRUE);
|
||||
meta_window_propagate_focus_appearance (window, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -85,7 +85,6 @@ GList* meta_workspace_get_onmonitor_region (MetaWorkspace *workspace,
|
||||
int which_monitor);
|
||||
|
||||
void meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
MetaDevice *pointer,
|
||||
MetaWindow *not_this_one,
|
||||
guint32 timestamp);
|
||||
|
||||
|
@ -538,9 +538,7 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
MetaWorkspaceLayout layout1, layout2;
|
||||
gint num_workspaces, current_space, new_space;
|
||||
MetaMotionDirection direction;
|
||||
MetaGrabInfo *grab_info;
|
||||
GHashTableIter iter;
|
||||
|
||||
|
||||
meta_verbose ("Activating workspace %d\n",
|
||||
meta_workspace_index (workspace));
|
||||
|
||||
@ -549,7 +547,7 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
|
||||
/* Free any cached pointers to the workspaces's edges from
|
||||
* a current resize or move operation */
|
||||
meta_display_cleanup_edges (workspace->screen->display, workspace->screen);
|
||||
meta_display_cleanup_edges (workspace->screen->display);
|
||||
|
||||
if (workspace->screen->active_workspace)
|
||||
workspace_switch_sound (workspace->screen->active_workspace, workspace);
|
||||
@ -572,22 +570,10 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
return;
|
||||
|
||||
move_window = NULL;
|
||||
|
||||
/* FIXME: not quite multidevice friendly, but the whole
|
||||
* "move window to another workspace" isn't.
|
||||
*/
|
||||
g_hash_table_iter_init (&iter, workspace->screen->display->current_grabs);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &grab_info))
|
||||
{
|
||||
if (grab_info->grab_op == META_GRAB_OP_MOVING ||
|
||||
grab_info->grab_op == META_GRAB_OP_KEYBOARD_MOVING)
|
||||
{
|
||||
move_window = grab_info->grab_window;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (workspace->screen->display->grab_op == META_GRAB_OP_MOVING ||
|
||||
workspace->screen->display->grab_op == META_GRAB_OP_KEYBOARD_MOVING)
|
||||
move_window = workspace->screen->display->grab_window;
|
||||
|
||||
if (move_window != NULL)
|
||||
{
|
||||
if (move_window->on_all_workspaces)
|
||||
@ -687,13 +673,8 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
}
|
||||
else
|
||||
{
|
||||
MetaDevice *pointer;
|
||||
|
||||
pointer = meta_device_map_lookup (screen->display->device_map,
|
||||
META_CORE_POINTER_ID);
|
||||
meta_topic (META_DEBUG_FOCUS, "Focusing default window on new workspace\n");
|
||||
meta_workspace_focus_default_window (workspace, pointer,
|
||||
NULL, timestamp);
|
||||
meta_workspace_focus_default_window (workspace, NULL, timestamp);
|
||||
}
|
||||
|
||||
/* Emit switched signal from screen.c */
|
||||
@ -793,7 +774,7 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
|
||||
/* If we are in the middle of a resize or move operation, we
|
||||
* might have cached pointers to the workspace's edges */
|
||||
if (workspace == workspace->screen->active_workspace)
|
||||
meta_display_cleanup_edges (workspace->screen->display, workspace->screen);
|
||||
meta_display_cleanup_edges (workspace->screen->display);
|
||||
|
||||
g_free (workspace->work_area_monitor);
|
||||
workspace->work_area_monitor = NULL;
|
||||
@ -1210,7 +1191,6 @@ meta_workspace_get_name (MetaWorkspace *workspace)
|
||||
|
||||
void
|
||||
meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
MetaDevice *pointer,
|
||||
MetaWindow *not_this_one,
|
||||
guint32 timestamp)
|
||||
{
|
||||
@ -1227,8 +1207,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
else
|
||||
{
|
||||
MetaWindow * window;
|
||||
window = meta_screen_get_mouse_window (workspace->screen,
|
||||
pointer, not_this_one);
|
||||
window = meta_screen_get_mouse_window (workspace->screen, not_this_one);
|
||||
if (window &&
|
||||
window->type != META_WINDOW_DOCK &&
|
||||
window->type != META_WINDOW_DESKTOP)
|
||||
|
@ -1,46 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_MAP_H
|
||||
#define META_DEVICE_MAP_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <meta/types.h>
|
||||
#include <meta/device.h>
|
||||
|
||||
#define META_TYPE_DEVICE_MAP (meta_device_map_get_type ())
|
||||
#define META_DEVICE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE_MAP, MetaDeviceMap))
|
||||
#define META_DEVICE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE_MAP, MetaDeviceMapClass))
|
||||
#define META_IS_DEVICE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE_MAP))
|
||||
#define META_IS_DEVICE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE_MAP))
|
||||
#define META_DEVICE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE_MAP, MetaDeviceMapClass))
|
||||
|
||||
typedef struct _MetaDeviceMapClass MetaDeviceMapClass;
|
||||
|
||||
GType meta_device_map_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaDevice * meta_device_map_lookup (MetaDeviceMap *device_map,
|
||||
gint device_id);
|
||||
|
||||
MetaDisplay * meta_device_map_get_display (MetaDeviceMap *device_map);
|
||||
GList * meta_device_map_list_devices (MetaDeviceMap *device_map);
|
||||
|
||||
#endif
|
@ -1,44 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2011 Carlos Garnacho
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DEVICE_H
|
||||
#define META_DEVICE_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <meta/types.h>
|
||||
|
||||
#define META_TYPE_DEVICE (meta_device_get_type ())
|
||||
#define META_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEVICE, MetaDevice))
|
||||
#define META_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DEVICE, MetaDeviceClass))
|
||||
#define META_IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DEVICE))
|
||||
#define META_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DEVICE))
|
||||
#define META_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DEVICE, MetaDeviceClass))
|
||||
|
||||
typedef struct _MetaDeviceClass MetaDeviceClass;
|
||||
|
||||
GType meta_device_get_type (void) G_GNUC_CONST;
|
||||
|
||||
int meta_device_get_id (MetaDevice *device);
|
||||
MetaDisplay *meta_device_get_display (MetaDevice *device);
|
||||
|
||||
MetaDevice * meta_device_get_paired_device (MetaDevice *device);
|
||||
|
||||
#endif
|
@ -28,7 +28,6 @@
|
||||
#include <meta/types.h>
|
||||
#include <meta/prefs.h>
|
||||
#include <meta/common.h>
|
||||
#include <meta/device-map.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -75,9 +74,6 @@ gboolean meta_display_has_shape (MetaDisplay *display);
|
||||
|
||||
MetaScreen *meta_display_screen_for_root (MetaDisplay *display,
|
||||
Window xroot);
|
||||
|
||||
MetaWindow *meta_display_get_keyboard_focus_window (MetaDisplay *display,
|
||||
MetaDevice *keyboard);
|
||||
MetaWindow *meta_display_get_focus_window (MetaDisplay *display);
|
||||
|
||||
gboolean meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display,
|
||||
@ -112,30 +108,9 @@ MetaWindow* meta_display_get_tab_current (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
GList* meta_display_get_device_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace,
|
||||
MetaDevice *device);
|
||||
|
||||
MetaWindow* meta_display_get_device_tab_next (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
gboolean backward);
|
||||
|
||||
MetaWindow* meta_display_get_device_tab_current (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace,
|
||||
MetaDevice *device);
|
||||
|
||||
gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
MetaDevice *device,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
gboolean frame_action,
|
||||
@ -145,28 +120,14 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
int root_x,
|
||||
int root_y);
|
||||
void meta_display_end_grab_op (MetaDisplay *display,
|
||||
MetaDevice *device,
|
||||
guint32 timestamp);
|
||||
|
||||
MetaGrabOp meta_display_get_grab_op (MetaDisplay *display);
|
||||
|
||||
MetaGrabOp meta_display_get_device_grab_op (MetaDisplay *display,
|
||||
MetaDevice *device);
|
||||
|
||||
MetaKeyBindingAction meta_display_get_keybinding_action (MetaDisplay *display,
|
||||
unsigned int keycode,
|
||||
unsigned long mask);
|
||||
|
||||
void meta_display_set_keyboard_focus (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
MetaDevice *keyboard,
|
||||
gboolean focus_frame,
|
||||
guint32 timestamp);
|
||||
void meta_display_unset_keyboard_focus (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaDevice *keyboard,
|
||||
guint32 timestamp);
|
||||
|
||||
/* meta_display_set_input_focus_window is like XSetInputFocus, except
|
||||
* that (a) it can't detect timestamps later than the current time,
|
||||
* since Mutter isn't part of the XServer, and thus gives erroneous
|
||||
@ -194,6 +155,4 @@ GSList *meta_display_sort_windows_by_stacking (MetaDisplay *display,
|
||||
|
||||
Window meta_display_get_leader_window (MetaDisplay *display);
|
||||
|
||||
MetaDeviceMap * meta_display_get_device_map (MetaDisplay *display);
|
||||
|
||||
#endif
|
||||
|
@ -67,10 +67,6 @@ void meta_keybindings_switch_window (MetaDisplay *display,
|
||||
MetaKeyBinding *binding);
|
||||
|
||||
|
||||
void meta_screen_ungrab_all_keys (MetaScreen *screen,
|
||||
MetaDevice *device,
|
||||
guint32 timestamp);
|
||||
gboolean meta_screen_grab_all_keys (MetaScreen *screen,
|
||||
MetaDevice *device,
|
||||
guint32 timestamp);
|
||||
void meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp);
|
||||
gboolean meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp);
|
||||
#endif
|
||||
|
@ -32,8 +32,6 @@ typedef struct _MetaFrame MetaFrame;
|
||||
typedef struct _MetaScreen MetaScreen;
|
||||
typedef struct _MetaWindow MetaWindow;
|
||||
typedef struct _MetaWorkspace MetaWorkspace;
|
||||
typedef struct _MetaDevice MetaDevice;
|
||||
typedef struct _MetaDeviceMap MetaDeviceMap;
|
||||
/**
|
||||
* MetaGroup: (skip)
|
||||
*
|
||||
|
@ -38,9 +38,6 @@ gboolean meta_is_syncing (void);
|
||||
void meta_set_syncing (gboolean setting);
|
||||
void meta_set_replace_current_wm (gboolean setting);
|
||||
|
||||
gboolean meta_get_use_core_devices (void);
|
||||
void meta_set_use_core_devices (gboolean setting);
|
||||
|
||||
void meta_debug_spew_real (const char *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
void meta_verbose_real (const char *format,
|
||||
|
172
src/ui/frames.c
172
src/ui/frames.c
@ -52,7 +52,6 @@ static void meta_frames_unmap (GtkWidget *widget);
|
||||
|
||||
static void meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
GdkDevice *device,
|
||||
MetaFrameControl control);
|
||||
static gboolean meta_frames_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
@ -314,8 +313,17 @@ meta_frames_destroy (GtkWidget *object)
|
||||
}
|
||||
g_slist_free (winlist);
|
||||
|
||||
g_object_unref (frames->normal_style);
|
||||
g_hash_table_destroy (frames->style_variants);
|
||||
if (frames->normal_style)
|
||||
{
|
||||
g_object_unref (frames->normal_style);
|
||||
frames->normal_style = NULL;
|
||||
}
|
||||
|
||||
if (frames->style_variants)
|
||||
{
|
||||
g_hash_table_destroy (frames->style_variants);
|
||||
frames->style_variants = NULL;
|
||||
}
|
||||
|
||||
GTK_WIDGET_CLASS (meta_frames_parent_class)->destroy (object);
|
||||
}
|
||||
@ -726,18 +734,10 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
||||
*/
|
||||
invalidate_all_caches (frames);
|
||||
|
||||
#if 0
|
||||
/* This function is only called when destroying the frame
|
||||
* in core/frame.c, ideally this should be done for every
|
||||
* device with a cursor on the frame, but in practical
|
||||
* effects it doesn't matter.
|
||||
*/
|
||||
|
||||
/* restore the cursor */
|
||||
meta_core_set_screen_cursor (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
frame->xwindow,
|
||||
META_CURSOR_DEFAULT);
|
||||
#endif
|
||||
|
||||
gdk_window_set_user_data (frame->window, NULL);
|
||||
|
||||
@ -1425,12 +1425,10 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
int action)
|
||||
{
|
||||
MetaFrameFlags flags;
|
||||
GdkDevice *pointer;
|
||||
Display *display;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
pointer = gdk_event_get_device ((GdkEvent *) event);
|
||||
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case META_ACTION_TITLEBAR_TOGGLE_SHADE:
|
||||
@ -1512,14 +1510,12 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
case META_ACTION_TITLEBAR_LOWER:
|
||||
meta_core_user_lower_and_unfocus (display,
|
||||
frame->xwindow,
|
||||
gdk_x11_device_get_id (pointer),
|
||||
event->time);
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_MENU:
|
||||
meta_core_show_window_menu (display,
|
||||
frame->xwindow,
|
||||
gdk_x11_device_get_id (pointer),
|
||||
event->x_root,
|
||||
event->y_root,
|
||||
event->button,
|
||||
@ -1568,9 +1564,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
MetaFrames *frames;
|
||||
MetaFrameControl control;
|
||||
Display *display;
|
||||
GdkDevice *device;
|
||||
int device_id;
|
||||
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
@ -1603,10 +1597,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
/* don't do the rest of this if on client area */
|
||||
if (control == META_FRAME_CONTROL_CLIENT_AREA)
|
||||
return FALSE; /* not on the frame, just passed through from client */
|
||||
|
||||
device = gdk_event_get_device ((GdkEvent *) event);
|
||||
device_id = gdk_x11_device_get_id (device);
|
||||
|
||||
|
||||
/* We want to shade even if we have a GrabOp, since we'll have a move grab
|
||||
* if we double click the titlebar.
|
||||
*/
|
||||
@ -1614,13 +1605,13 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
event->button == 1 &&
|
||||
event->type == GDK_2BUTTON_PRESS)
|
||||
{
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
return meta_frame_double_click_event (frame, event);
|
||||
}
|
||||
|
||||
if (meta_core_frame_has_grab (display, frame->xwindow, NULL, NULL) !=
|
||||
if (meta_core_get_grab_op (display) !=
|
||||
META_GRAB_OP_NONE)
|
||||
return FALSE; /* already up to something */
|
||||
return FALSE; /* already up to something */
|
||||
|
||||
if (event->button == 1 &&
|
||||
(control == META_FRAME_CONTROL_MAXIMIZE ||
|
||||
@ -1679,7 +1670,6 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
|
||||
meta_core_begin_grab_op (display,
|
||||
frame->xwindow,
|
||||
device_id,
|
||||
op,
|
||||
TRUE,
|
||||
TRUE,
|
||||
@ -1712,7 +1702,6 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
|
||||
meta_core_show_window_menu (display,
|
||||
frame->xwindow,
|
||||
device_id,
|
||||
rect->x + dx,
|
||||
rect->y + rect->height + dy,
|
||||
event->button,
|
||||
@ -1766,7 +1755,6 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
|
||||
meta_core_begin_grab_op (display,
|
||||
frame->xwindow,
|
||||
device_id,
|
||||
op,
|
||||
TRUE,
|
||||
TRUE,
|
||||
@ -1789,7 +1777,6 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
{
|
||||
meta_core_begin_grab_op (display,
|
||||
frame->xwindow,
|
||||
device_id,
|
||||
META_GRAB_OP_MOVING,
|
||||
TRUE,
|
||||
TRUE,
|
||||
@ -1813,28 +1800,28 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_notify_menu_hide (MetaFrames *frames,
|
||||
Window client_xwindow)
|
||||
meta_frames_notify_menu_hide (MetaFrames *frames)
|
||||
{
|
||||
Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
Window frame_xwindow;
|
||||
int device_id;
|
||||
|
||||
frame_xwindow = meta_core_get_frame (display, client_xwindow);
|
||||
|
||||
if (frame_xwindow != None &&
|
||||
meta_core_frame_has_grab (display, frame_xwindow, &device_id, NULL) ==
|
||||
if (meta_core_get_grab_op (display) ==
|
||||
META_GRAB_OP_CLICKING_MENU)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
Window grab_frame;
|
||||
|
||||
frame = meta_frames_lookup_window (frames, frame_xwindow);
|
||||
grab_frame = meta_core_get_grab_frame (display);
|
||||
|
||||
if (frame)
|
||||
if (grab_frame != None)
|
||||
{
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_MENU);
|
||||
meta_core_end_grab_op (display, device_id, CurrentTime);
|
||||
MetaUIFrame *frame;
|
||||
|
||||
frame = meta_frames_lookup_window (frames, grab_frame);
|
||||
|
||||
if (frame)
|
||||
{
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_MENU);
|
||||
meta_core_end_grab_op (display, CurrentTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1847,10 +1834,7 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
MetaFrames *frames;
|
||||
MetaGrabOp op;
|
||||
Display *display;
|
||||
int grab_button;
|
||||
GdkDevice *device;
|
||||
int device_id, grab_device_id;
|
||||
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
@ -1860,21 +1844,17 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
op = meta_core_frame_has_grab (display, frame->xwindow,
|
||||
&grab_device_id, &grab_button);
|
||||
op = meta_core_get_grab_op (display);
|
||||
|
||||
device = gdk_event_get_device ((GdkEvent *) event);
|
||||
device_id = gdk_x11_device_get_id (device);
|
||||
|
||||
if (op == META_GRAB_OP_NONE ||
|
||||
grab_device_id != device_id)
|
||||
if (op == META_GRAB_OP_NONE)
|
||||
return FALSE;
|
||||
|
||||
/* We only handle the releases we handled the presses for (things
|
||||
* involving frame controls). Window ops that don't require a
|
||||
* frame are handled in the Xlib part of the code, display.c/window.c
|
||||
*/
|
||||
if (((int) event->button) == grab_button)
|
||||
if (frame->xwindow == meta_core_get_grab_frame (display) &&
|
||||
((int) event->button) == meta_core_get_grab_button (display))
|
||||
{
|
||||
MetaFrameControl control;
|
||||
|
||||
@ -1885,8 +1865,8 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
if (control == META_FRAME_CONTROL_MINIMIZE)
|
||||
meta_core_minimize (display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
@ -1898,67 +1878,67 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
event->time);
|
||||
meta_core_maximize (display, frame->xwindow);
|
||||
}
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
if (control == META_FRAME_CONTROL_UNMAXIMIZE)
|
||||
meta_core_unmaximize (display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_DELETE:
|
||||
if (control == META_FRAME_CONTROL_DELETE)
|
||||
meta_core_delete (display, frame->xwindow, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_SHADE:
|
||||
if (control == META_FRAME_CONTROL_SHADE)
|
||||
meta_core_shade (display, frame->xwindow, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNSHADE:
|
||||
if (control == META_FRAME_CONTROL_UNSHADE)
|
||||
meta_core_unshade (display, frame->xwindow, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_ABOVE:
|
||||
if (control == META_FRAME_CONTROL_ABOVE)
|
||||
meta_core_make_above (display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNABOVE:
|
||||
if (control == META_FRAME_CONTROL_UNABOVE)
|
||||
meta_core_unmake_above (display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_STICK:
|
||||
if (control == META_FRAME_CONTROL_STICK)
|
||||
meta_core_stick (display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNSTICK:
|
||||
if (control == META_FRAME_CONTROL_UNSTICK)
|
||||
meta_core_unstick (display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (display, device_id, event->time);
|
||||
meta_core_end_grab_op (display, event->time);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1970,9 +1950,7 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
* prelit so to let the user know that it can now be pressed.
|
||||
* :)
|
||||
*/
|
||||
meta_frames_update_prelit_control (frames, frame,
|
||||
gdk_event_get_device ((GdkEvent *) event),
|
||||
control);
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1981,12 +1959,12 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
static void
|
||||
meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
GdkDevice *device,
|
||||
MetaFrameControl control)
|
||||
{
|
||||
MetaFrameControl old_control;
|
||||
MetaCursor cursor;
|
||||
|
||||
|
||||
meta_verbose ("Updating prelit control from %u to %u\n",
|
||||
frame->prelit_control, control);
|
||||
|
||||
@ -2051,7 +2029,6 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
/* set/unset the prelight cursor */
|
||||
meta_core_set_screen_cursor (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
frame->xwindow,
|
||||
gdk_x11_device_get_id (device),
|
||||
cursor);
|
||||
|
||||
switch (control)
|
||||
@ -2107,8 +2084,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
|
||||
frames->last_motion_frame = frame;
|
||||
|
||||
grab_op = meta_core_frame_has_grab (display, frame->xwindow, NULL, NULL);
|
||||
|
||||
grab_op = meta_core_get_grab_op (display);
|
||||
|
||||
switch (grab_op)
|
||||
{
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
@ -2124,9 +2101,9 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
case META_GRAB_OP_CLICKING_UNSTICK:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
gdouble x, y;
|
||||
|
||||
gdk_event_get_coords ((GdkEvent *) event, &x, &y);
|
||||
int x, y;
|
||||
|
||||
gdk_window_get_pointer (frame->window, &x, &y, NULL);
|
||||
|
||||
/* Control is set to none unless it matches
|
||||
* the current grab
|
||||
@ -2157,9 +2134,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
control = META_FRAME_CONTROL_NONE;
|
||||
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame,
|
||||
gdk_event_get_device ((GdkEvent *) event),
|
||||
control);
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
/* No tooltip while in the process of clicking */
|
||||
}
|
||||
@ -2167,15 +2142,14 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
case META_GRAB_OP_NONE:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
gdouble x, y;
|
||||
int x, y;
|
||||
|
||||
gdk_window_get_pointer (frame->window, &x, &y, NULL);
|
||||
|
||||
gdk_event_get_coords ((GdkEvent *) event, &x, &y);
|
||||
control = get_control (frames, frame, x, y);
|
||||
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame,
|
||||
gdk_event_get_device ((GdkEvent *) event),
|
||||
control);
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
queue_tip (frames);
|
||||
}
|
||||
@ -2507,6 +2481,7 @@ meta_frames_paint (MetaFrames *frames,
|
||||
GdkPixbuf *icon;
|
||||
int w, h;
|
||||
MetaButtonState button_states[META_BUTTON_TYPE_LAST];
|
||||
Window grab_frame;
|
||||
int i;
|
||||
MetaButtonLayout button_layout;
|
||||
MetaGrabOp grab_op;
|
||||
@ -2518,8 +2493,11 @@ meta_frames_paint (MetaFrames *frames,
|
||||
for (i = 0; i < META_BUTTON_TYPE_LAST; i++)
|
||||
button_states[i] = META_BUTTON_STATE_NORMAL;
|
||||
|
||||
grab_op = meta_core_frame_has_grab (display, frame->xwindow, NULL, NULL);
|
||||
|
||||
grab_frame = meta_core_get_grab_frame (display);
|
||||
grab_op = meta_core_get_grab_op (display);
|
||||
if (grab_frame != frame->xwindow)
|
||||
grab_op = META_GRAB_OP_NONE;
|
||||
|
||||
/* Set prelight state */
|
||||
switch (frame->prelit_control)
|
||||
{
|
||||
@ -2681,9 +2659,7 @@ meta_frames_enter_notify_event (GtkWidget *widget,
|
||||
return FALSE;
|
||||
|
||||
control = get_control (frames, frame, event->x, event->y);
|
||||
meta_frames_update_prelit_control (frames, frame,
|
||||
gdk_event_get_device ((GdkEvent *) event),
|
||||
control);
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -2701,9 +2677,7 @@ meta_frames_leave_notify_event (GtkWidget *widget,
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
meta_frames_update_prelit_control (frames, frame,
|
||||
gdk_event_get_device ((GdkEvent *) event),
|
||||
META_FRAME_CONTROL_NONE);
|
||||
meta_frames_update_prelit_control (frames, frame, META_FRAME_CONTROL_NONE);
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
|
@ -163,8 +163,7 @@ void meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
void meta_frames_queue_draw (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
|
||||
void meta_frames_notify_menu_hide (MetaFrames *frames,
|
||||
Window client_xwindow);
|
||||
void meta_frames_notify_menu_hide (MetaFrames *frames);
|
||||
|
||||
Window meta_frames_get_moving_frame (MetaFrames *frames);
|
||||
|
||||
|
@ -137,7 +137,7 @@ menu_closed (GtkMenu *widget,
|
||||
|
||||
menu = data;
|
||||
|
||||
meta_frames_notify_menu_hide (menu->frames, menu->client_xwindow);
|
||||
meta_frames_notify_menu_hide (menu->frames);
|
||||
(* menu->func) (menu,
|
||||
GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
menu->client_xwindow,
|
||||
@ -157,7 +157,7 @@ activate_cb (GtkWidget *menuitem, gpointer data)
|
||||
|
||||
md = data;
|
||||
|
||||
meta_frames_notify_menu_hide (md->menu->frames, md->menu->client_xwindow);
|
||||
meta_frames_notify_menu_hide (md->menu->frames);
|
||||
(* md->menu->func) (md->menu,
|
||||
GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
md->menu->client_xwindow,
|
||||
@ -498,17 +498,13 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
|
||||
void
|
||||
meta_window_menu_popup (MetaWindowMenu *menu,
|
||||
MetaDevice *device,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
guint32 timestamp)
|
||||
{
|
||||
GdkDeviceManager *device_manager;
|
||||
GdkDevice *gdkdevice;
|
||||
GdkDisplay *display;
|
||||
GdkPoint *pt;
|
||||
|
||||
|
||||
pt = g_new (GdkPoint, 1);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (menu->menu),
|
||||
@ -518,18 +514,12 @@ meta_window_menu_popup (MetaWindowMenu *menu,
|
||||
|
||||
pt->x = root_x;
|
||||
pt->y = root_y;
|
||||
|
||||
display = gtk_widget_get_display (menu->menu);
|
||||
device_manager = gdk_display_get_device_manager (display);
|
||||
gdkdevice = gdk_x11_device_manager_lookup (device_manager,
|
||||
meta_device_get_id (device));
|
||||
|
||||
gtk_menu_popup_for_device (GTK_MENU (menu->menu),
|
||||
gdkdevice,
|
||||
NULL, NULL,
|
||||
popup_position_func, pt, NULL,
|
||||
button,
|
||||
timestamp);
|
||||
|
||||
gtk_menu_popup (GTK_MENU (menu->menu),
|
||||
NULL, NULL,
|
||||
popup_position_func, pt,
|
||||
button,
|
||||
timestamp);
|
||||
|
||||
if (!gtk_widget_get_visible (menu->menu))
|
||||
meta_warning ("GtkMenu failed to grab the pointer\n");
|
||||
|
@ -25,7 +25,6 @@
|
||||
#define META_MENU_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <meta/device.h>
|
||||
#include "frames.h"
|
||||
|
||||
/* Stock icons */
|
||||
@ -53,7 +52,6 @@ MetaWindowMenu* meta_window_menu_new (MetaFrames *frames,
|
||||
MetaWindowMenuFunc func,
|
||||
gpointer data);
|
||||
void meta_window_menu_popup (MetaWindowMenu *menu,
|
||||
MetaDevice *device,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
|
@ -858,21 +858,12 @@ static WnckWindowDisplayInfo
|
||||
meta_convert_meta_to_wnck (MetaWindow *window, MetaScreen *screen)
|
||||
{
|
||||
WnckWindowDisplayInfo wnck_window;
|
||||
MetaFocusInfo *focus_info;
|
||||
GHashTableIter iter;
|
||||
|
||||
wnck_window.icon = window->icon;
|
||||
wnck_window.mini_icon = window->mini_icon;
|
||||
|
||||
wnck_window.is_active = FALSE;
|
||||
|
||||
g_hash_table_iter_init (&iter, window->display->focus_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &focus_info))
|
||||
{
|
||||
if (window == focus_info->expected_focus_window)
|
||||
wnck_window.is_active = TRUE;
|
||||
}
|
||||
if (window == window->display->expected_focus_window)
|
||||
wnck_window.is_active = TRUE;
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
|
@ -171,7 +171,6 @@ meta_tile_preview_free (MetaTilePreview *preview)
|
||||
|
||||
void
|
||||
meta_tile_preview_show (MetaTilePreview *preview,
|
||||
MetaDevice *pointer,
|
||||
MetaRectangle *tile_rect)
|
||||
{
|
||||
GdkWindow *window;
|
||||
@ -188,7 +187,6 @@ meta_tile_preview_show (MetaTilePreview *preview,
|
||||
window = gtk_widget_get_window (preview->preview_window);
|
||||
meta_core_lower_beneath_grab_window (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
GDK_WINDOW_XID (window),
|
||||
meta_device_get_id (pointer),
|
||||
gtk_get_current_event_time ());
|
||||
|
||||
old_rect.x = old_rect.y = 0;
|
||||
|
@ -24,7 +24,6 @@
|
||||
#define META_TILE_PREVIEW_H
|
||||
|
||||
#include <meta/boxes.h>
|
||||
#include <meta/device.h>
|
||||
|
||||
typedef struct _MetaTilePreview MetaTilePreview;
|
||||
|
||||
@ -32,7 +31,6 @@ MetaTilePreview *meta_tile_preview_new (int screen_number,
|
||||
gboolean composited);
|
||||
void meta_tile_preview_free (MetaTilePreview *preview);
|
||||
void meta_tile_preview_show (MetaTilePreview *preview,
|
||||
MetaDevice *pointer,
|
||||
MetaRectangle *rect);
|
||||
void meta_tile_preview_hide (MetaTilePreview *preview);
|
||||
Window meta_tile_preview_get_xwindow (MetaTilePreview *preview,
|
||||
|
118
src/ui/ui.c
118
src/ui/ui.c
@ -30,7 +30,6 @@
|
||||
#include "menu.h"
|
||||
#include "core.h"
|
||||
#include "theme-private.h"
|
||||
#include "input-events.h"
|
||||
|
||||
#include "inlinepixbufs.h"
|
||||
|
||||
@ -61,8 +60,15 @@ struct _MetaUI
|
||||
void
|
||||
meta_ui_init (void)
|
||||
{
|
||||
if (meta_get_use_core_devices ())
|
||||
gdk_disable_multidevice ();
|
||||
/* As of 2.91.7, Gdk uses XI2 by default, which conflicts with the
|
||||
* direct X calls we use - in particular, events caused by calls to
|
||||
* XGrabPointer/XGrabKeyboard are no longer understood by GDK, while
|
||||
* GDK will no longer generate the core XEvents we process.
|
||||
* So at least for now, enforce the previous behavior.
|
||||
*/
|
||||
#if GTK_CHECK_VERSION(2, 91, 7)
|
||||
gdk_disable_multidevice ();
|
||||
#endif
|
||||
|
||||
if (!gtk_init_check (NULL, NULL))
|
||||
meta_fatal ("Unable to open X display %s\n", XDisplayName (NULL));
|
||||
@ -96,30 +102,27 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
{
|
||||
GdkDisplay *gdisplay;
|
||||
GdkDeviceManager *gmanager;
|
||||
GdkDevice *gdevice;
|
||||
MetaUI *ui;
|
||||
GdkEvent *gevent;
|
||||
GdkWindow *gdk_window;
|
||||
Window window;
|
||||
MetaDisplay *display;
|
||||
MetaDevice *device;
|
||||
gdouble x, y, x_root, y_root;
|
||||
guint evtype, n_button;
|
||||
Time evtime;
|
||||
|
||||
display = meta_display_for_x_display (xevent->xany.display);
|
||||
|
||||
if (!meta_input_event_get_type (display, xevent, &evtype))
|
||||
return FALSE;
|
||||
|
||||
if (evtype != ButtonPress &&
|
||||
evtype != ButtonRelease &&
|
||||
evtype != EnterNotify &&
|
||||
evtype != LeaveNotify &&
|
||||
evtype != MotionNotify)
|
||||
return FALSE;
|
||||
|
||||
window = meta_input_event_get_window (display, xevent);
|
||||
switch (xevent->type)
|
||||
{
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
window = xevent->xbutton.window;
|
||||
break;
|
||||
case MotionNotify:
|
||||
window = xevent->xmotion.window;
|
||||
break;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
window = xevent->xcrossing.window;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gdisplay = gdk_x11_lookup_xdisplay (xevent->xany.display);
|
||||
ui = g_object_get_data (G_OBJECT (gdisplay), "meta-ui");
|
||||
@ -130,32 +133,18 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
if (gdk_window == NULL)
|
||||
return FALSE;
|
||||
|
||||
device = meta_input_event_get_device (display, xevent);
|
||||
|
||||
if (!device)
|
||||
return FALSE;
|
||||
|
||||
gmanager = gdk_display_get_device_manager (gdisplay);
|
||||
gdevice = gdk_x11_device_manager_lookup (gmanager,
|
||||
meta_device_get_id (device));
|
||||
|
||||
/* If GDK already thinks it has a grab, we better let it see events; this
|
||||
* is the menu-navigation case and events need to get sent to the appropriate
|
||||
* (client-side) subwindow for individual menu items.
|
||||
*/
|
||||
if (gdk_display_device_is_grabbed (gdisplay, gdevice))
|
||||
if (gdk_display_pointer_is_grabbed (gdisplay))
|
||||
return FALSE;
|
||||
|
||||
evtime = meta_input_event_get_time (display, xevent);
|
||||
meta_input_event_get_coordinates (display, xevent,
|
||||
&x, &y, &x_root, &y_root);
|
||||
switch (evtype)
|
||||
switch (xevent->type)
|
||||
{
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
meta_input_event_get_button (display, xevent, &n_button);
|
||||
|
||||
if (evtype == ButtonPress)
|
||||
if (xevent->type == ButtonPress)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
int double_click_time;
|
||||
@ -166,11 +155,11 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
"gtk-double-click-distance", &double_click_distance,
|
||||
NULL);
|
||||
|
||||
if (n_button == ui->button_click_number &&
|
||||
window == ui->button_click_window &&
|
||||
evtime < ui->button_click_time + double_click_time &&
|
||||
ABS ((int) x - ui->button_click_x) <= double_click_distance &&
|
||||
ABS ((int) y - ui->button_click_y) <= double_click_distance)
|
||||
if (xevent->xbutton.button == ui->button_click_number &&
|
||||
xevent->xbutton.window == ui->button_click_window &&
|
||||
xevent->xbutton.time < ui->button_click_time + double_click_time &&
|
||||
ABS (xevent->xbutton.x - ui->button_click_x) <= double_click_distance &&
|
||||
ABS (xevent->xbutton.y - ui->button_click_y) <= double_click_distance)
|
||||
{
|
||||
gevent = gdk_event_new (GDK_2BUTTON_PRESS);
|
||||
|
||||
@ -179,11 +168,11 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
else
|
||||
{
|
||||
gevent = gdk_event_new (GDK_BUTTON_PRESS);
|
||||
ui->button_click_number = n_button;
|
||||
ui->button_click_window = window;
|
||||
ui->button_click_time = evtime;
|
||||
ui->button_click_x = (int) x;
|
||||
ui->button_click_y = (int) y;
|
||||
ui->button_click_number = xevent->xbutton.button;
|
||||
ui->button_click_window = xevent->xbutton.window;
|
||||
ui->button_click_time = xevent->xbutton.time;
|
||||
ui->button_click_x = xevent->xbutton.x;
|
||||
ui->button_click_y = xevent->xbutton.y;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -192,29 +181,25 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
}
|
||||
|
||||
gevent->button.window = g_object_ref (gdk_window);
|
||||
gevent->button.button = n_button;
|
||||
gevent->button.time = evtime;
|
||||
gevent->button.x = x;
|
||||
gevent->button.y = y;
|
||||
gevent->button.x_root = x_root;
|
||||
gevent->button.y_root = y_root;
|
||||
gevent->button.button = xevent->xbutton.button;
|
||||
gevent->button.time = xevent->xbutton.time;
|
||||
gevent->button.x = xevent->xbutton.x;
|
||||
gevent->button.y = xevent->xbutton.y;
|
||||
gevent->button.x_root = xevent->xbutton.x_root;
|
||||
gevent->button.y_root = xevent->xbutton.y_root;
|
||||
|
||||
break;
|
||||
case MotionNotify:
|
||||
gevent = gdk_event_new (GDK_MOTION_NOTIFY);
|
||||
gevent->motion.type = GDK_MOTION_NOTIFY;
|
||||
gevent->motion.window = g_object_ref (gdk_window);
|
||||
gevent->motion.x = x;
|
||||
gevent->motion.y = y;
|
||||
gevent->motion.x_root = x_root;
|
||||
gevent->motion.y_root = y_root;
|
||||
break;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
gevent = gdk_event_new (evtype == EnterNotify ? GDK_ENTER_NOTIFY : GDK_LEAVE_NOTIFY);
|
||||
gevent = gdk_event_new (xevent->type == EnterNotify ? GDK_ENTER_NOTIFY : GDK_LEAVE_NOTIFY);
|
||||
gevent->crossing.window = g_object_ref (gdk_window);
|
||||
gevent->crossing.x = x;
|
||||
gevent->crossing.y = y;
|
||||
gevent->crossing.x = xevent->xcrossing.x;
|
||||
gevent->crossing.y = xevent->xcrossing.y;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
@ -222,7 +207,8 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
}
|
||||
|
||||
/* If we've gotten here, we've created the gdk_event and should send it on */
|
||||
gdk_event_set_device (gevent, gdevice);
|
||||
gmanager = gdk_display_get_device_manager (gdisplay);
|
||||
gdk_event_set_device (gevent, gdk_device_manager_get_client_pointer (gmanager));
|
||||
gtk_main_do_event (gevent);
|
||||
gdk_event_free (gevent);
|
||||
|
||||
@ -396,8 +382,7 @@ meta_ui_create_frame_window (MetaUI *ui,
|
||||
&attrs, attributes_mask);
|
||||
|
||||
gdk_window_resize (window, width, height);
|
||||
gdk_window_set_support_multidevice (window, TRUE);
|
||||
|
||||
|
||||
meta_frames_manage_window (ui->frames, GDK_WINDOW_XID (window), window);
|
||||
|
||||
return GDK_WINDOW_XID (window);
|
||||
@ -538,13 +523,12 @@ meta_ui_window_menu_new (MetaUI *ui,
|
||||
|
||||
void
|
||||
meta_ui_window_menu_popup (MetaWindowMenu *menu,
|
||||
MetaDevice *device,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_window_menu_popup (menu, device, root_x, root_y, button, timestamp);
|
||||
meta_window_menu_popup (menu, root_x, root_y, button, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
/* Don't include gtk.h or gdk.h here */
|
||||
#include <meta/common.h>
|
||||
#include <meta/device.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <cairo.h>
|
||||
@ -133,7 +132,6 @@ MetaWindowMenu* meta_ui_window_menu_new (MetaUI *ui,
|
||||
MetaWindowMenuFunc func,
|
||||
gpointer data);
|
||||
void meta_ui_window_menu_popup (MetaWindowMenu *menu,
|
||||
MetaDevice *device,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
|
Reference in New Issue
Block a user