Programming :: XGrabPointer Prevents Alt+Tab Application Switching?
Jan 30, 2010
I'm writing a game for Linux using Xlib whereby when a window becomes active it will take control of the mouse using XGrabPointer. The idea being that if the users switches applications through Alt+Tab the game will relinquish the mouse with a call to XUngrabPointer.
The game is using the FocusIn event to determine when it has been activated and needs to grab the mouse, and likewise uses the FocusOut event to release the mouse. This causes a problem because for some reason an Alt+Tab from the keyboards generates two FocusOut events and then a FocusIn event causing the game to take control and no application switching occurs.
If the game does not grab the mouse, then application switching works fine.
What is needed so that application switching can work while the game has control of the mouse?
I am running Fedora 12 on an Intel Core2 Duo machine. I am also using Compiz as the window manager.
View 1 Replies
ADVERTISEMENT
Jan 15, 2010
I have POPFile in my startup applications. I know how to automatically kill it when login out but cannot find a way to kill it if I just switch users (other than manually stopping it). It's important to kill it when using the switch users function because the new user will have access to the old user's POPFile database, have access to his email, etc, if I do not.I have a "lynx -dump http://127.0.0.1:8080/shutdown &>/dev/null" line in my /etc/gdm/PostSession/Default file that shuts down POPFile at log out. I need to do the same or something similar when switching user. Is there a way?
View 2 Replies
View Related
Aug 16, 2010
I'm looking for a script that automatically switches between all workspaces in regular intervals, e.g. 15 seconds or 1 minutes. Ideally, the user should be able to adjust the interval.
I need it for Ubuntu 10.04 LTS and GNOME 2.30.2.
View 5 Replies
View Related
Jun 8, 2011
I work with modbus protocol(MODBUS/TCP to MODBUS/RTU gateway server) and write a program for work with mbusd. when working with usb to serial adapter and cable, my program works without any problem. but when working with serial cable does not work (without usb to serial adapter) ; when mbusd is runing and i run minicom program in part initializing modem my program works and when minicom lock the serial port my program stop. when close minicom "with no rest modem" (ctrl+a and press q) modbus program and my program works without any problems.
in builder site (mbus.sourceforge.net) posted : note that currently mbusd can't operate with RS-232/RS-485 converters with direction switching by RTS pin. Use converters with automatic data direction control (i.e. Moxa Transio series).
View 1 Replies
View Related
Sep 29, 2010
I want to ask whether there is an application to program the AVR on Linux. if there is what the name of his application? and where I can get it
besides, I also want to install the supporting applications to make PCBs, in windows I used mangunakan Altium.
if for linux what is the name of his application?
View 1 Replies
View Related
Jan 3, 2009
I'm trying to package a Qt application using debuild. However, I can't figure out how to make qmake generate a correct Makefile.
The main problem is that the binary doesn't get put into ./usr/bin inside the .deb.
So dh_shlibdeps always fails and I get the following:
Code: Select alldpkg-gencontrol: warning: unknown substitution variable ${shlibs:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
The resulting debian package then has an empty "depends" field and no binary.
I used the Qt Hello World example application to start.
I changed debian/rules (generated by dh_make) so that it runs qmake as follows:
Code: Select all#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
[code]....
View 6 Replies
View Related
May 13, 2010
am using a PC104 with Linux and i need to control it with a controller that is connected via RS-232 or USB port. I need to launch one or more application some specific message come through RS-232 port. Is that doable? If yes how? I am beginner with C++ on Linux so i don't really know specif libraries. If possible i would like to use pure C and not C++.
View 4 Replies
View Related
Aug 1, 2010
I want to write an application with an interface similar to those used in non-GUI linux installation programs. It is not really a pseudo-graphic. Does anybody knows an appropriate library?
View 2 Replies
View Related
Aug 23, 2010
i need to debug a application which is using many threads. i am using eclipse with GDB debugger but it is not possible to debug it since it has a lot of different threads and i can not not debug it as wre debug in case of single thread(main) . So i would like to know, is there a way to debug such an application, if there is some tutorial that would be nice to know.
View 8 Replies
View Related
Nov 28, 2010
I'm trying to learn how to cross-compile libraries (static and shared) and executables for the Blackfin + uClinux environment.At this point, I can successfully compile a stand-alone "Hello, world" but fail when trying to add a (static) library to the mix.Here's the source code I wrote:
Code:
#========== bar.h
void mytestfunc(void);
#========== bar.c
#include <stdio.h>
[code]...
Googling for this returns talks about "name mangling", but I don't know if this is what it is, and how to change the source/command to solve it.
View 1 Replies
View Related
May 10, 2011
My users need to run an application which was build with newer GLIBC_2.11, while my system only gets GLIBC_2.4. It shows error "cannot find libc.so.6 GLIBC_2.11" whenever I run it. I cannot upgrade the system, so I have tried building Glibc 2.11 (for example:/opt/glibc-2.11) to another directory, but when I point LD_LIBRARY_PATH to /opt/glibc-2.11, I cannot run any commands because of error invalid LFS ABI. I also tried using LD_PRELOAD, but it does not work. Please help me, how can I fix this problem.
View 3 Replies
View Related
Jun 8, 2011
I'm developping a C# app in Windows using VS2010. It has one form and communicates as a client with a server.A receive thread displays incoming data while buttons and a timer send data. All workingThe form has a button that calls the below method to disconnect from the server.
Code:
public bool disconnect()
{
[code]...
View 2 Replies
View Related
Jan 2, 2010
Is there a somewhat straightforward way to get the name or pid of the application that is under the mouse's cursor? What I'm trying to do: This is just a "what if" at this point, I would like to run some script that would obtain the name/pid of any application that the mouse cursor is on, and use xte to assign different functions to different mouse buttons. For instance, assign a given button the Forward or Back function when the cursor is on a browser, but assign a scroll-left or scroll-right to the same button when it's on a spreadsheet. Is there any way to accomplish this, say, in a script that I could run at startup as a background process?
View 4 Replies
View Related
Mar 29, 2009
I never had to use anything more than -l , -lm , -c ,-o.It was only through dev documentation that I came across glib. Now I want to to compile and link a program with glib.
View 5 Replies
View Related
Mar 30, 2009
I want read the log messages to my 'c' application , i am using the fedora core 8 operating system , how to read the system log messages(syslog) through my application.
View 3 Replies
View Related
Jul 21, 2010
i have made a small program to find the md5 checksum of a string.i am using xshell to compile the program.
Code:
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <md5.h>
[Code]...
View 4 Replies
View Related
May 5, 2009
I have developed a proprietary multithreaded application using Qt library version 4.2.1 on RHEL 4 platform. The application communicates with different external interfaces using serial communication using well defined protocols. For each system I have a thread that handles data acquisition and processing, it sets an update flag which is read by the GUI thread to update GUI after specified number of seconds. The incoming data from external systems is processed and updated on GUI at certain intervals. Each system update rate on GUI is different. Generally it is 1 second. Their rate of sending data is different and is generally 1Hz, 5 Hz and 10 Hz. For systems with string data I have no issues. But some systems send raw data and I have to process every byte of the entire packet, for which I have to use for loops. Now my problem is if I keep the update rate of GUI for such systems less than a fixed number of seconds (which I have to calculate by hit and trial) the application hangs after sometime. I have tested this system exlusively by switching of all other systems and it hangs standalone.
This leads me to conclude that timing of GUI update is what is causing the application to hang. Also I read somewhere on the net that in multithreading application timers play an important role and slight variation in timing can lead to hung applications. As of now I have kept 5 seconds as the GUI update time and app runs fine. Can somebody suggest something else which might be the cause?Note that I have used mutexes, wait conditions and all necessary tools which are used in multithreading app. But it is only the timer on which I could pin down the issue.
View 6 Replies
View Related
Jun 24, 2010
1. How to use the the font in the application? Any code example?
2. How to install the font for linux?
3. How to make the installed font as the system default font?
4. How font/text is rendered in linux? Any inforamation about the font system in linux?
View 14 Replies
View Related
Sep 11, 2009
I seed a suggesting related asychron io. I'm write a program which use completion ports, but wandor how avoiding loops like for(; below...i.e I want parse proto with count in first and then computing some quantity of pieces. how that make with aio?
Code:
View 6 Replies
View Related
Jun 19, 2011
I want to develop a system that converts speech to text in C sharp in Windows 7 platform.I haven't enough idea about this one.From google that,there will be grammerbuliding.Moreover i think,there will be a problem of spelling words correctly. from where i will start or which steps i should follow to develop the system??
View 1 Replies
View Related
Jul 7, 2010
I'm trying to write a simple, console based application in linux, in c++. I know how to start in Eclipse and I have some experience in c++ from Windoze. I would like to ask, if there is some tutorial available on writing console apps. I mean, I know from using linux that there are two conventions on using parameters in command line (-v and --version for example).
View 2 Replies
View Related
Jul 8, 2011
I cannot update my system either with Update Manager nor with Synaptic. The system tries to download the updates, and then generates an error message that I have broken packages. So, I click on Fix Broken Packages, etc., and when running get the following error message:
E: /var/cache/apt/archives/libavcodec52_5%3a0.6.3-0.0_i386.deb: short read on buffer copy for backend dpkg-deb during `./usr/lib/i686/cmov/libavcodec.so.52.72.2'
This appears to me to be a system bug. I'm running the 32-bit version of Squeeze. Re-install, or ?
View 4 Replies
View Related
Aug 7, 2009
It seems today's kernel update has given a few people some difficulty - but my symptoms seem pretty unique.
* I go through GRUB normally. I 'esc' out of plymouth, and watch my services start. I get message 'mdadm: No arrays found in config file'. Don't remember seeing this before, don't have any RAID devices.
* Next, my file-system gets re-mounted in read-write mode (don't know if this is normal or not). Then, my services begin to start-up. My last service is 'crond'. All services start normally. When it gets to 'crond' the [OK] status is never reported. Visually, the screen flickers a few times, stops, then nothing happens. I can type characters though, and they do show up.
* If I then shutdown my computer by pressing the power button, the shutdown procedure begins. 'crond' shuts down successfully (indicating it started just fine), and the computer goes down normally.
* I don't believe this is an NVIDIA issue. I rescue-moded and changed my XORG.conf to the basic VESA driver to eliminate this possibility.
* Worst of all -- No older kernels work now either. They behave in the same way. When I try to boot to other run-levels, no luck either. This tempts me to think the problem might be file-system related and the re-generation of grub.conf threw something off?
View 5 Replies
View Related
Oct 7, 2010
I have a problem every time I start steam trough wine SELinux is blocking it can I switch off SELinux or do something so steam can start. I have already tried to ignore it and that doesnt work does someone know how to fix this.
View 1 Replies
View Related
May 25, 2010
"I get message ubuntu System policy prevents shutting down" when i try to turn off ubuntu ( i get similar message when i try to restart too )
Am the only user I have installed hsqldb-server ( and mb he has something to do with it )
View 5 Replies
View Related
Jun 18, 2010
Since installing Lucid, I find that the shutdown button doesn't work (does nothing) if the OpenOffice.org quickstarter is running. To shutdown I either have to kill the quickstarter or run shutdown manually from a terminal window. Hibernation doesn't work either, although suspension does.
View 7 Replies
View Related
Oct 7, 2010
I have ubuntu 10.04 and winxp dual boot and if you leave magic jack plugged in the usb ubuntu will boot up to the desk top sometimes and freeze and other times nothing. No boot at all. Also had same thing happen with linux lime 9. For some reason the the magic jack when inserted into the usb of computer revents linux form booting. I thought ubuntu was messed up but when I put linux lime on drive by it self found out the magic jack was the cause mentioned this.
View 3 Replies
View Related
Dec 17, 2010
After a stint of using Ubuntu exclusively, I'm trying to install Windows 7 again. However, when I select boot from CD/DVD in the boot menu, I just get the GRUB menu.
View 9 Replies
View Related
Aug 5, 2011
So, I've done a lot of stupid things, but this one ranks pretty high. So I'm looking at files here and there, fooling around and tweaking things if I can, but after a while, I get sick and tired of having to fiddle around because a file's owner is root. So, completely ignoring the fact I could start an x session as root, I perform the following command:
chown -hR MY-USERNAME / I'm thinking to myself, "Oh look at me, I'm so smart" until I turn off my laptop for the night and come back this morning, and ubuntu (10.10, 32 bit) says it could not change ICE authority (or something like that) and a few more error messages. Then, I boot into the recovery console, and again, not even bothering to think anything through properly, I chown everything back to root, then chown my home folder back to me. Anyway, I still get the error message, execpt now I can't alt-c to close the first windows that talks about the ICE authority file.
One of my friends has an ubuntu partition, so I can ask him about certain ownerships, but that could take a while and I don't know where to start.
View 3 Replies
View Related
Feb 4, 2011
I just installed GNAT GPS and would like it to display under Applications->Programming drop down menu. How does one do this? I have read about creating a .desktop file but tried that and it still does not appear under the menu I like. It does appear on the desktop but not because of the .desktop file.
OS: fedora 14 63-bit
CPU: CPU AMD-64
An example file (if needed) would be nice.
Also, just as a extra, has anyone found the GNAT GPS icon (.png) file?
View 1 Replies
View Related